Changeset 147499 in webkit
- Timestamp:
- Apr 2, 2013 2:24:14 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r147416 r147499 1 2013-04-02 Martin Robinson <mrobinson@igalia.com> 2 3 [GTK] Make libsecret optional 4 https://bugs.webkit.org/show_bug.cgi?id=113821 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Add a configuration option to disable credential storage and thus remove 9 the libsecret dependency. This should make it possible to build WebKit 2.x 10 on Windows again. 11 12 * Source/autotools/FindDependencies.m4: Only look for libsecret if credential storage is active. 13 * Source/autotools/PrintBuildConfiguration.m4: Print whether or not credential storage is active. 14 * Source/autotools/ReadCommandLineArguments.m4: Added an option to control credential storage. 15 * Source/autotools/SetupAutoconfHeader.m4: Expose credential storage setting to code. 16 1 17 2013-04-02 Sheriff Bot <webkit.review.bot@gmail.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r147495 r147499 1 2013-04-02 Martin Robinson <mrobinson@igalia.com> 2 3 [GTK] Make libsecret optional 4 https://bugs.webkit.org/show_bug.cgi?id=113821 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Don't try to use libsecret if credential storage is disabled. 9 10 * platform/gtk/GRefPtrGtk.cpp: Protect libsecret sections. 11 * platform/gtk/GRefPtrGtk.h: Ditto. 12 * platform/network/gtk/CredentialBackingStore.cpp: Ditto. 13 1 14 2013-04-02 Bem Jones-Bey <bjonesbe@adobe.com> 2 15 -
trunk/Source/WebCore/platform/gtk/GRefPtrGtk.cpp
r133317 r147499 21 21 #include "GRefPtrGtk.h" 22 22 23 #include <glib.h> 24 #include <gtk/gtk.h> 25 26 #if ENABLE(CREDENTIAL_STORAGE) 23 27 #define SECRET_WITH_UNSTABLE 1 24 28 #define SECRET_API_SUBJECT_TO_CHANGE 1 25 26 #include <glib.h>27 #include <gtk/gtk.h>28 29 #include <libsecret/secret.h> 30 #endif 29 31 30 32 namespace WTF { … … 43 45 } 44 46 47 #if ENABLE(CREDENTIAL_STORAGE) 45 48 template <> SecretValue* refGPtr(SecretValue* ptr) 46 49 { … … 55 58 secret_value_unref(ptr); 56 59 } 60 #endif 57 61 58 62 #ifdef GTK_API_VERSION_2 -
trunk/Source/WebCore/platform/gtk/GRefPtrGtk.h
r133317 r147499 31 31 template <> void derefGPtr(GtkTargetList* ptr); 32 32 33 #if ENABLE(CREDENTIAL_STORAGE) 33 34 template <> SecretValue* refGPtr(SecretValue* ptr); 34 35 template <> void derefGPtr(SecretValue* ptr); 36 #endif 35 37 36 38 #ifdef GTK_API_VERSION_2 -
trunk/Source/WebCore/platform/network/gtk/CredentialBackingStore.cpp
r134955 r147499 1 1 /* 2 * Copyright (C) 2012 Igalia S.L.2 * Copyright (C) 2012, 2013 Igalia S.L. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #include "CredentialBackingStore.h" 28 28 29 #if ENABLE(CREDENTIAL_STORAGE) 29 30 #define SECRET_WITH_UNSTABLE 1 30 31 #define SECRET_API_SUBJECT_TO_CHANGE 1 … … 36 37 #include <wtf/gobject/GOwnPtr.h> 37 38 #include <wtf/text/CString.h> 39 #endif 38 40 39 41 namespace WebCore { … … 45 47 } 46 48 49 #if ENABLE(CREDENTIAL_STORAGE) 47 50 static GRefPtr<GHashTable> createAttributeHashTableFromChallenge(const AuthenticationChallenge& challenge, const Credential& credential = Credential()) 48 51 { … … 96 99 callback(Credential(user, password, CredentialPersistencePermanent), data); 97 100 } 101 #endif // ENABLE(CREDENTIAL_STORAGE) 98 102 99 103 void CredentialBackingStore::credentialForChallenge(const AuthenticationChallenge& challenge, CredentialForChallengeCallback callback, void* data) 100 104 { 105 #if ENABLE(CREDENTIAL_STORAGE) 101 106 // The default flag only returns the most recent item, not all of them. 102 107 SecretSearchFlags searchFlags = static_cast<SecretSearchFlags>(SECRET_SEARCH_UNLOCK | SECRET_SEARCH_LOAD_SECRETS); … … 113 118 reinterpret_cast<GAsyncReadyCallback>(credentialForChallengeAsyncReadyCallback), 114 119 callbackData); 120 #else 121 callback(Credential(), data); 122 #endif // ENABLE(CREDENTIAL_STORAGE) 115 123 } 116 124 117 125 void CredentialBackingStore::storeCredentialsForChallenge(const AuthenticationChallenge& challenge, const Credential& credential) 118 126 { 127 #if ENABLE(CREDENTIAL_STORAGE) 119 128 CString utf8Password = credential.password().utf8(); 120 129 GRefPtr<SecretValue> newSecretValue = adoptGRef(secret_value_new(utf8Password.data(), utf8Password.length(), "text/plain")); … … 130 139 0, // callback 131 140 0); // data 141 #endif // ENABLE(CREDENTIAL_STORAGE) 132 142 } 133 143 -
trunk/Source/autotools/FindDependencies.m4
r145912 r147499 360 360 AC_SUBST([LIBSOUP_LIBS]) 361 361 362 PKG_CHECK_MODULES([LIBSECRET], [libsecret-1]) 363 AC_SUBST([LIBSECRET_CFLAGS]) 364 AC_SUBST([LIBSECRET_LIBS]) 362 if test "$enable_credential_storage" = "yes"; then 363 PKG_CHECK_MODULES([LIBSECRET], [libsecret-1]) 364 AC_SUBST([LIBSECRET_CFLAGS]) 365 AC_SUBST([LIBSECRET_LIBS]) 366 fi 365 367 366 368 # Check if FreeType/FontConfig are available. -
trunk/Source/autotools/PrintBuildConfiguration.m4
r145859 r147499 25 25 SVG support : $enable_svg 26 26 Spellcheck support : $enable_spellcheck 27 Credential storage support : $enable_credential_storage 27 28 Web Audio support : $enable_web_audio 28 29 WebGL : $enable_webgl -
trunk/Source/autotools/ReadCommandLineArguments.m4
r145859 r147499 65 65 AC_MSG_RESULT([$enable_spellcheck]) 66 66 67 AC_MSG_CHECKING([whether to enable credential storage]) 68 AC_ARG_ENABLE([credential_storage], 69 [AS_HELP_STRING([--enable-credential-storage],[enable support for credential storage using libsecret [default=yes]])], 70 [], 71 [enable_credential_storage="yes"]) 72 AC_MSG_RESULT([$enable_credential_storage]) 73 67 74 AC_ARG_ENABLE(glx, 68 75 AC_HELP_STRING([--enable-glx], [enable support for GLX [default=auto]]), -
trunk/Source/autotools/SetupAutoconfHeader.m4
r143604 r147499 116 116 fi 117 117 118 if test "$enable_credential_storage" = "yes"; then 119 AC_DEFINE([WTF_ENABLE_CREDENTIAL_STORAGE], [1], [ ]) 120 fi 118 121
Note: See TracChangeset
for help on using the changeset viewer.