Diff
Modified: trunk/ChangeLog (206730 => 206731)
--- trunk/ChangeLog 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/ChangeLog 2016-10-03 10:32:52 UTC (rev 206731)
@@ -1,3 +1,15 @@
+2016-10-03 Carlos Garcia Campos <[email protected]>
+
+ [SOUP] Cleanup persistent credential storage code
+ https://bugs.webkit.org/show_bug.cgi?id=162777
+
+ Reviewed by Alex Christensen.
+
+ Remove ENABLE(CREDENTIAL_STORAGE) build flag and replace it by USE(LIBSECRET).
+
+ * Source/cmake/OptionsGTK.cmake:
+ * Source/cmake/WebKitFeatures.cmake:
+
2016-09-29 Aaron Chu <[email protected]>
Web Inspector: AXI: linkified refs to #document and #text are not usually navigable nodes; consider delinkifying them
Modified: trunk/Source/WebCore/ChangeLog (206730 => 206731)
--- trunk/Source/WebCore/ChangeLog 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/ChangeLog 2016-10-03 10:32:52 UTC (rev 206731)
@@ -1,5 +1,43 @@
2016-10-03 Carlos Garcia Campos <[email protected]>
+ [SOUP] Cleanup persistent credential storage code
+ https://bugs.webkit.org/show_bug.cgi?id=162777
+
+ Reviewed by Alex Christensen.
+
+ We have this feature behind ENABLE_CREDENTIAL_STORAGE flag, which is confusing, because we use credential
+ storage unconditionally and this is only about persistent storage. Also the flag assumes libsecret is available,
+ and since it's only used by GTK sometimes we use GTK ifdefs instead of CREDENTIAL_STORAGE. So, I think we should
+ use USE(LIBSECRET) instead, and reduce a bit the ifdefs in common soup code. Another problem is that current
+ implementation is always used, while it should depend on the current network storage session and never used in
+ ephemeral sessions. This patch moves the code from CredentialBackingStore to NetworkStorageSessionSoup and
+ modernizes a bit.
+
+ * PlatformGTK.cmake: Remove CredentialBackingStore.cpp.
+ * platform/gtk/GRefPtrGtk.cpp: Use USE(LIBSECRET)
+ * platform/gtk/GRefPtrGtk.h:
+ * platform/network/NetworkStorageSession.h:
+ * platform/network/ResourceHandleInternal.h:
+ * platform/network/gtk/CredentialBackingStore.cpp: Removed.
+ * platform/network/gtk/CredentialBackingStore.h: Removed.
+ * platform/network/soup/NetworkStorageSessionSoup.cpp:
+ (WebCore::NetworkStorageSession::~NetworkStorageSession):
+ (WebCore::schemeFromProtectionSpaceServerType):
+ (WebCore::authTypeFromProtectionSpaceAuthenticationScheme):
+ (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage):
+ (WebCore::NetworkStorageSession::saveCredentialToPersistentStorage):
+ (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Deleted.
+ (WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::gotHeadersCallback):
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceHandle::receivedCredential):
+ (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): Deleted.
+ (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): Deleted.
+ (WebCore::ResourceHandle::receivedCancellation): Deleted.
+
+2016-10-03 Carlos Garcia Campos <[email protected]>
+
Unreviewed. Fix the build with coordinated graphics enabled after r206712.
* page/scrolling/ScrollingStateTree.cpp:
Modified: trunk/Source/WebCore/PlatformGTK.cmake (206730 => 206731)
--- trunk/Source/WebCore/PlatformGTK.cmake 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/PlatformGTK.cmake 2016-10-03 10:32:52 UTC (rev 206731)
@@ -162,8 +162,6 @@
platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp
- platform/network/gtk/CredentialBackingStore.cpp
-
platform/network/soup/AuthenticationChallengeSoup.cpp
platform/network/soup/CertificateInfo.cpp
platform/network/soup/CookieJarSoup.cpp
Modified: trunk/Source/WebCore/platform/gtk/GRefPtrGtk.cpp (206730 => 206731)
--- trunk/Source/WebCore/platform/gtk/GRefPtrGtk.cpp 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/platform/gtk/GRefPtrGtk.cpp 2016-10-03 10:32:52 UTC (rev 206731)
@@ -23,7 +23,7 @@
#include <glib.h>
#include <gtk/gtk.h>
-#if ENABLE(CREDENTIAL_STORAGE)
+#if USE(LIBSECRET)
#define SECRET_WITH_UNSTABLE 1
#define SECRET_API_SUBJECT_TO_CHANGE 1
#include <libsecret/secret.h>
@@ -44,7 +44,7 @@
gtk_target_list_unref(ptr);
}
-#if ENABLE(CREDENTIAL_STORAGE)
+#if USE(LIBSECRET)
template <> SecretValue* refGPtr(SecretValue* ptr)
{
if (ptr)
Modified: trunk/Source/WebCore/platform/gtk/GRefPtrGtk.h (206730 => 206731)
--- trunk/Source/WebCore/platform/gtk/GRefPtrGtk.h 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/platform/gtk/GRefPtrGtk.h 2016-10-03 10:32:52 UTC (rev 206731)
@@ -31,7 +31,7 @@
template <> GtkTargetList* refGPtr(GtkTargetList* ptr);
template <> void derefGPtr(GtkTargetList* ptr);
-#if ENABLE(CREDENTIAL_STORAGE)
+#if USE(LIBSECRET)
template <> SecretValue* refGPtr(SecretValue* ptr);
template <> void derefGPtr(SecretValue* ptr);
#endif
Modified: trunk/Source/WebCore/platform/network/NetworkStorageSession.h (206730 => 206731)
--- trunk/Source/WebCore/platform/network/NetworkStorageSession.h 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/platform/network/NetworkStorageSession.h 2016-10-03 10:32:52 UTC (rev 206731)
@@ -34,6 +34,11 @@
#include <wtf/RetainPtr.h>
#endif
+#if USE(SOUP)
+#include <wtf/Function.h>
+#include <wtf/glib/GRefPtr.h>
+#endif
+
namespace WebCore {
class NetworkingContext;
@@ -66,7 +71,8 @@
~NetworkStorageSession();
SoupNetworkSession& soupNetworkSession() const;
- void setSoupNetworkSession(std::unique_ptr<SoupNetworkSession>);
+ void getCredentialFromPersistentStorage(const ProtectionSpace&, Function<void (Credential&&)> completionHandler);
+ void saveCredentialToPersistentStorage(const ProtectionSpace&, const Credential&);
#else
NetworkStorageSession(SessionID, NetworkingContext*);
~NetworkStorageSession();
@@ -82,6 +88,10 @@
RetainPtr<CFURLStorageSessionRef> m_platformSession;
#elif USE(SOUP)
std::unique_ptr<SoupNetworkSession> m_session;
+#if USE(LIBSECRET)
+ Function<void (Credential&&)> m_persisentStorageCompletionHandler;
+ GRefPtr<GCancellable> m_persisentStorageCancellable;
+#endif
#else
RefPtr<NetworkingContext> m_context;
#endif
Modified: trunk/Source/WebCore/platform/network/ResourceHandleInternal.h (206730 => 206731)
--- trunk/Source/WebCore/platform/network/ResourceHandleInternal.h 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/platform/network/ResourceHandleInternal.h 2016-10-03 10:32:52 UTC (rev 206731)
@@ -178,11 +178,9 @@
int m_redirectCount;
size_t m_previousPosition;
bool m_useAuthenticationManager;
-#endif
-#if PLATFORM(GTK)
struct {
Credential credential;
- AuthenticationChallenge challenge;
+ ProtectionSpace protectionSpace;
} m_credentialDataToSaveInPersistentStore;
#endif
Modified: trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (206730 => 206731)
--- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2016-10-03 10:32:52 UTC (rev 206731)
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
* Copyright (C) 2013 University of Szeged. All rights reserved.
+ * Copyright (C) 2016 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,9 +32,19 @@
#include "ResourceHandle.h"
#include "SoupNetworkSession.h"
+#include <libsoup/soup.h>
#include <wtf/MainThread.h>
#include <wtf/NeverDestroyed.h>
+#include <wtf/glib/GUniquePtr.h>
+#if USE(LIBSECRET)
+#include "GRefPtrGtk.h"
+#include <glib/gi18n-lib.h>
+#define SECRET_WITH_UNSTABLE 1
+#define SECRET_API_SUBJECT_TO_CHANGE 1
+#include <libsecret/secret.h>
+#endif
+
namespace WebCore {
NetworkStorageSession::NetworkStorageSession(SessionID sessionID, std::unique_ptr<SoupNetworkSession> session)
@@ -44,6 +55,9 @@
NetworkStorageSession::~NetworkStorageSession()
{
+#if USE(LIBSECRET)
+ g_cancellable_cancel(m_persisentStorageCancellable.get());
+#endif
}
static std::unique_ptr<NetworkStorageSession>& defaultSession()
@@ -78,11 +92,150 @@
return m_session ? *m_session : SoupNetworkSession::defaultSession();
}
-void NetworkStorageSession::setSoupNetworkSession(std::unique_ptr<SoupNetworkSession> session)
+#if USE(LIBSECRET)
+static const char* schemeFromProtectionSpaceServerType(ProtectionSpaceServerType serverType)
{
- m_session = WTFMove(session);
+ switch (serverType) {
+ case ProtectionSpaceServerHTTP:
+ case ProtectionSpaceProxyHTTP:
+ return SOUP_URI_SCHEME_HTTP;
+ case ProtectionSpaceServerHTTPS:
+ case ProtectionSpaceProxyHTTPS:
+ return SOUP_URI_SCHEME_HTTPS;
+ case ProtectionSpaceServerFTP:
+ case ProtectionSpaceProxyFTP:
+ return SOUP_URI_SCHEME_FTP;
+ case ProtectionSpaceServerFTPS:
+ case ProtectionSpaceProxySOCKS:
+ break;
+ }
+
+ ASSERT_NOT_REACHED();
+ return SOUP_URI_SCHEME_HTTP;
}
+static const char* authTypeFromProtectionSpaceAuthenticationScheme(ProtectionSpaceAuthenticationScheme scheme)
+{
+ switch (scheme) {
+ case ProtectionSpaceAuthenticationSchemeDefault:
+ case ProtectionSpaceAuthenticationSchemeHTTPBasic:
+ return "Basic";
+ case ProtectionSpaceAuthenticationSchemeHTTPDigest:
+ return "Digest";
+ case ProtectionSpaceAuthenticationSchemeNTLM:
+ return "NTLM";
+ case ProtectionSpaceAuthenticationSchemeNegotiate:
+ return "Negotiate";
+ case ProtectionSpaceAuthenticationSchemeHTMLForm:
+ case ProtectionSpaceAuthenticationSchemeClientCertificateRequested:
+ case ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested:
+ ASSERT_NOT_REACHED();
+ break;
+ case ProtectionSpaceAuthenticationSchemeUnknown:
+ return "unknown";
+ }
+
+ ASSERT_NOT_REACHED();
+ return "unknown";
}
+#endif // USE(LIBSECRET)
+void NetworkStorageSession::getCredentialFromPersistentStorage(const ProtectionSpace& protectionSpace, Function<void (Credential&&)> completionHandler)
+{
+#if USE(LIBSECRET)
+ if (m_sessionID.isEphemeral()) {
+ completionHandler({ });
+ return;
+ }
+
+ const String& realm = protectionSpace.realm();
+ if (realm.isEmpty()) {
+ completionHandler({ });
+ return;
+ }
+
+ GRefPtr<GHashTable> attributes = adoptGRef(secret_attributes_build(SECRET_SCHEMA_COMPAT_NETWORK,
+ "domain", realm.utf8().data(),
+ "server", protectionSpace.host().utf8().data(),
+ "port", protectionSpace.port(),
+ "protocol", schemeFromProtectionSpaceServerType(protectionSpace.serverType()),
+ "authtype", authTypeFromProtectionSpaceAuthenticationScheme(protectionSpace.authenticationScheme()),
+ nullptr));
+ if (!attributes) {
+ completionHandler({ });
+ return;
+ }
+
+ m_persisentStorageCancellable = adoptGRef(g_cancellable_new());
+ m_persisentStorageCompletionHandler = WTFMove(completionHandler);
+ secret_service_search(nullptr, SECRET_SCHEMA_COMPAT_NETWORK, attributes.get(),
+ static_cast<SecretSearchFlags>(SECRET_SEARCH_UNLOCK | SECRET_SEARCH_LOAD_SECRETS), m_persisentStorageCancellable.get(),
+ [](GObject* source, GAsyncResult* result, gpointer userData) {
+ GUniqueOutPtr<GError> error;
+ GUniquePtr<GList> elements(secret_service_search_finish(SECRET_SERVICE(source), result, &error.outPtr()));
+ if (g_error_matches (error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ return;
+
+ NetworkStorageSession* session = static_cast<NetworkStorageSession*>(userData);
+ auto completionHandler = std::exchange(session->m_persisentStorageCompletionHandler, nullptr);
+ if (error || !elements || !elements->data) {
+ completionHandler({ });
+ return;
+ }
+
+ GRefPtr<SecretItem> secretItem = adoptGRef(static_cast<SecretItem*>(elements->data));
+ GRefPtr<GHashTable> attributes = adoptGRef(secret_item_get_attributes(secretItem.get()));
+ String user = String::fromUTF8(static_cast<const char*>(g_hash_table_lookup(attributes.get(), "user")));
+ if (user.isEmpty()) {
+ completionHandler({ });
+ return;
+ }
+
+ size_t length;
+ GRefPtr<SecretValue> secretValue = adoptGRef(secret_item_get_secret(secretItem.get()));
+ const char* passwordData = secret_value_get(secretValue.get(), &length);
+ completionHandler(Credential(user, String::fromUTF8(passwordData, length), CredentialPersistencePermanent));
+ }, this);
+#else
+ UNUSED_PARAM(protectionSpace);
+ completionHandler({ });
#endif
+}
+
+void NetworkStorageSession::saveCredentialToPersistentStorage(const ProtectionSpace& protectionSpace, const Credential& credential)
+{
+#if USE(LIBSECRET)
+ if (m_sessionID.isEphemeral())
+ return;
+
+ if (credential.isEmpty())
+ return;
+
+ const String& realm = protectionSpace.realm();
+ if (realm.isEmpty())
+ return;
+
+ GRefPtr<GHashTable> attributes = adoptGRef(secret_attributes_build(SECRET_SCHEMA_COMPAT_NETWORK,
+ "domain", realm.utf8().data(),
+ "server", protectionSpace.host().utf8().data(),
+ "port", protectionSpace.port(),
+ "protocol", schemeFromProtectionSpaceServerType(protectionSpace.serverType()),
+ "authtype", authTypeFromProtectionSpaceAuthenticationScheme(protectionSpace.authenticationScheme()),
+ nullptr));
+ if (!attributes)
+ return;
+
+ g_hash_table_insert(attributes.get(), g_strdup("user"), g_strdup(credential.user().utf8().data()));
+ CString utf8Password = credential.password().utf8();
+ GRefPtr<SecretValue> newSecretValue = adoptGRef(secret_value_new(utf8Password.data(), utf8Password.length(), "text/plain"));
+ secret_service_store(nullptr, SECRET_SCHEMA_COMPAT_NETWORK, attributes.get(), SECRET_COLLECTION_DEFAULT, _("WebKitGTK+ password"),
+ newSecretValue.get(), nullptr, nullptr, nullptr);
+#else
+ UNUSED_PARAM(protectionSpace);
+ UNUSED_PARAM(credential);
+#endif
+}
+
+} // namespace WebCore
+
+#endif // USE(SOUP)
Modified: trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (206730 => 206731)
--- trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp 2016-10-03 10:32:52 UTC (rev 206731)
@@ -66,10 +66,6 @@
#include "BlobData.h"
#include "BlobRegistryImpl.h"
-#if PLATFORM(GTK)
-#include "CredentialBackingStore.h"
-#endif
-
namespace WebCore {
static const size_t gDefaultReadBufferSize = 8192;
@@ -230,17 +226,15 @@
ResourceHandleInternal* d = handle->getInternal();
-#if PLATFORM(GTK)
// We are a bit more conservative with the persistent credential storage than the session store,
// since we are waiting until we know that this authentication succeeded before actually storing.
// This is because we want to avoid hitting the disk twice (once to add and once to remove) for
// incorrect credentials or polluting the keychain with invalid credentials.
- if (!isAuthenticationFailureStatusCode(message->status_code) && message->status_code < 500 && !d->m_credentialDataToSaveInPersistentStore.credential.isEmpty()) {
- credentialBackingStore().storeCredentialsForChallenge(
- d->m_credentialDataToSaveInPersistentStore.challenge,
+ if (!isAuthenticationFailureStatusCode(message->status_code) && message->status_code < 500) {
+ d->m_context->storageSession().saveCredentialToPersistentStorage(
+ d->m_credentialDataToSaveInPersistentStore.protectionSpace,
d->m_credentialDataToSaveInPersistentStore.credential);
}
-#endif
// The original response will be needed later to feed to willSendRequest in
// doRedirect() in case we are redirected. For this reason, we store it here.
@@ -970,13 +964,6 @@
gIgnoreSSLErrors = ignoreSSLErrors;
}
-#if PLATFORM(GTK)
-void getCredentialFromPersistentStoreCallback(const Credential& credential, void* data)
-{
- static_cast<ResourceHandle*>(data)->continueDidReceiveAuthenticationChallenge(credential);
-}
-#endif
-
void ResourceHandle::continueDidReceiveAuthenticationChallenge(const Credential& credentialFromPersistentStorage)
{
ASSERT(!d->m_currentWebChallenge.isNull());
@@ -1030,16 +1017,16 @@
d->m_currentWebChallenge = challenge;
soup_session_pause_message(challenge.soupSession(), challenge.soupMessage());
-#if PLATFORM(GTK)
// We could also do this before we even start the request, but that would be at the expense
// of all request latency, versus a one-time latency for the small subset of requests that
// use HTTP authentication. In the end, this doesn't matter much, because persistent credentials
// will become session credentials after the first use.
if (useCredentialStorage) {
- credentialBackingStore().credentialForChallenge(challenge, getCredentialFromPersistentStoreCallback, this);
+ d->m_context->storageSession().getCredentialFromPersistentStorage(challenge.protectionSpace(), [this, protectedThis = makeRef(*this)] (Credential&& credential) {
+ continueDidReceiveAuthenticationChallenge(WTFMove(credential));
+ });
return;
}
-#endif
continueDidReceiveAuthenticationChallenge(Credential());
}
@@ -1074,12 +1061,10 @@
if (credential.persistence() == CredentialPersistenceForSession || credential.persistence() == CredentialPersistencePermanent)
CredentialStorage::defaultCredentialStorage().set(credential, challenge.protectionSpace(), challenge.failureResponse().url());
-#if PLATFORM(GTK)
if (credential.persistence() == CredentialPersistencePermanent) {
d->m_credentialDataToSaveInPersistentStore.credential = credential;
- d->m_credentialDataToSaveInPersistentStore.challenge = challenge;
+ d->m_credentialDataToSaveInPersistentStore.protectionSpace = challenge.protectionSpace();
}
-#endif
}
ASSERT(challenge.soupSession());
Modified: trunk/Source/WebKit2/ChangeLog (206730 => 206731)
--- trunk/Source/WebKit2/ChangeLog 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebKit2/ChangeLog 2016-10-03 10:32:52 UTC (rev 206731)
@@ -1,3 +1,15 @@
+2016-10-03 Carlos Garcia Campos <[email protected]>
+
+ [SOUP] Cleanup persistent credential storage code
+ https://bugs.webkit.org/show_bug.cgi?id=162777
+
+ Reviewed by Alex Christensen.
+
+ Use USE(LIBSECRET) instead of ENABLE(CREDENTIAL_STORAGE).
+
+ * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
+ (webkit_authentication_request_can_save_credentials):
+
2016-10-02 Ryan Haddad <[email protected]>
Unreviewed, rolling out r206683.
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.cpp (206730 => 206731)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.cpp 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.cpp 2016-10-03 10:32:52 UTC (rev 206731)
@@ -161,7 +161,7 @@
{
g_return_val_if_fail(WEBKIT_IS_AUTHENTICATION_REQUEST(request), FALSE);
-#if ENABLE(CREDENTIAL_STORAGE)
+#if USE(LIBSECRET)
return !request->priv->privateBrowsingEnabled;
#else
return FALSE;
Modified: trunk/Source/cmake/OptionsGTK.cmake (206730 => 206731)
--- trunk/Source/cmake/OptionsGTK.cmake 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/cmake/OptionsGTK.cmake 2016-10-03 10:32:52 UTC (rev 206731)
@@ -87,6 +87,7 @@
WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK3_SUPPORTS_WAYLAND})
WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notification implementation." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON)
+WEBKIT_OPTION_DEFINE(USE_LIBSECRET "Whether to enable the persistent credential storage using libsecret." PUBLIC ON)
# Private options specific to the GTK+ port. Changing these options is
# completely unsupported. They are intended for use only by WebKit developers.
@@ -133,7 +134,6 @@
# without approval from a GTK+ reviewer. There must be strong reason to support
# changing the value of the option.
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS PUBLIC OFF)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CREDENTIAL_STORAGE PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ICONDATABASE PUBLIC ON)
@@ -228,10 +228,10 @@
endif ()
endif ()
-if (ENABLE_CREDENTIAL_STORAGE)
+if (USE_LIBSECRET)
find_package(Libsecret)
if (NOT LIBSECRET_FOUND)
- message(FATAL_ERROR "libsecret is needed for ENABLE_CREDENTIAL_STORAGE")
+ message(FATAL_ERROR "libsecret is needed for USE_LIBSECRET")
endif ()
endif ()
Modified: trunk/Source/cmake/WebKitFeatures.cmake (206730 => 206731)
--- trunk/Source/cmake/WebKitFeatures.cmake 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Source/cmake/WebKitFeatures.cmake 2016-10-03 10:32:52 UTC (rev 206731)
@@ -83,7 +83,6 @@
WEBKIT_OPTION_DEFINE(ENABLE_CHANNEL_MESSAGING "Toggle MessageChannel and MessagePort support" PRIVATE ON)
WEBKIT_OPTION_DEFINE(ENABLE_CONTENT_FILTERING "Toggle content filtering support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_CONTEXT_MENUS "Toggle Context Menu support" PRIVATE ON)
- WEBKIT_OPTION_DEFINE(ENABLE_CREDENTIAL_STORAGE "Toggle Credential Storage support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_CSP_NEXT "Toggle Content Security Policy 1.1 support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT "Toggle CSS3 Text support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_CSS_BOX_DECORATION_BREAK "Toggle Box Decoration break (CSS Backgrounds and Borders) support" PRIVATE ON)
Modified: trunk/Tools/ChangeLog (206730 => 206731)
--- trunk/Tools/ChangeLog 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Tools/ChangeLog 2016-10-03 10:32:52 UTC (rev 206731)
@@ -1,3 +1,15 @@
+2016-10-03 Carlos Garcia Campos <[email protected]>
+
+ [SOUP] Cleanup persistent credential storage code
+ https://bugs.webkit.org/show_bug.cgi?id=162777
+
+ Reviewed by Alex Christensen.
+
+ Use USE(LIBSECRET) instead of ENABLE(CREDENTIAL_STORAGE).
+
+ * TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp:
+ (testWebViewAuthenticationStorage):
+
2016-10-02 Darin Adler <[email protected]>
Rename ExceptionCode-based exception handling to "legacy"
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp (206730 => 206731)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp 2016-10-03 09:51:18 UTC (rev 206730)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp 2016-10-03 10:32:52 UTC (rev 206731)
@@ -195,7 +195,7 @@
// If WebKit has been compiled with libsecret, and private browsing is disabled
// then check that credentials can be saved.
-#if ENABLE(CREDENTIAL_STORAGE)
+#if USE(LIBSECRET)
webkit_settings_set_enable_private_browsing(webkit_web_view_get_settings(test->m_webView), FALSE);
test->loadURI(kServer->getURIForPath("/auth-test.html").data());
request = test->waitForAuthenticationRequest();