Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: components/os_crypt/BUILD.gn

Issue 2216313002: Move GnomeKeyringLoader to components/os_crypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed guard Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/os_crypt/keyring_util_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/os_crypt/BUILD.gn
diff --git a/components/os_crypt/BUILD.gn b/components/os_crypt/BUILD.gn
index 7ae69302e4737ea7399e7e3bffed6d4b92ca3994..2c40d08413eb51be681300ccdc49a912c22cc7e1 100644
--- a/components/os_crypt/BUILD.gn
+++ b/components/os_crypt/BUILD.gn
@@ -4,6 +4,29 @@
import("//build/config/features.gni")
import("//build/config/ui.gni")
+import("//build/config/linux/pkg_config.gni")
+
+if (is_desktop_linux) {
+ # Gnome-keyring is normally dynamically loaded. The gnome_keyring config
+ # will set this up.
+ pkg_config("gnome_keyring") {
+ packages = [ "gnome-keyring-1" ]
+ defines = [ "USE_GNOME_KEYRING" ]
+ ignore_libs = true
+ }
+
+ # If you want to link gnome-keyring directly (use only for unit tests)
+ # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a
+ # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs
+ # are just itself and common gnome ones we link already, so we can get away
+ # with additionally just coding the library name here.
+ # TODO(cfroussios): This is only used by
+ # chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+ # We should deprecate both.
+ config("gnome_keyring_direct") {
+ libs = [ "gnome-keyring" ]
+ }
+}
static_library("os_crypt") {
sources = [
@@ -57,10 +80,15 @@ static_library("os_crypt") {
sources += [
"key_storage_libsecret.cc",
"key_storage_libsecret.h",
+ "keyring_util_linux.cc",
+ "keyring_util_linux.h",
"libsecret_util_linux.cc",
"libsecret_util_linux.h",
]
- configs += [ "//build/config/linux:glib" ]
+ configs += [
+ "//build/config/linux:glib",
+ ":gnome_keyring",
+ ]
deps += [ "//third_party/libsecret" ]
defines += [ "USE_LIBSECRET" ]
}
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/os_crypt/keyring_util_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698