OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 if (is_desktop_linux) { | |
Lei Zhang
2016/08/05 15:46:38
I don't see anyone else doing this.
cfroussios
2016/08/05 16:15:24
Done.
| |
8 import("//build/config/linux/pkg_config.gni") | |
9 } | |
10 | |
11 if (is_desktop_linux) { | |
12 # Gnome-keyring is normally dynamically loaded. The gnome_keyring config | |
13 # will set this up. | |
14 pkg_config("gnome_keyring") { | |
15 packages = [ "gnome-keyring-1" ] | |
16 defines = [ "USE_GNOME_KEYRING" ] | |
17 ignore_libs = true | |
18 } | |
19 | |
20 # If you want to link gnome-keyring directly (use only for unit tests) | |
21 # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a | |
22 # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs | |
23 # are just itself and common gnome ones we link already, so we can get away | |
24 # with additionally just coding the library name here. | |
25 # TODO(cfroussios): This is only used by | |
26 # chrome/browser/password_manager/native_backend_gnome_x_unittest.cc | |
27 # We should deprecate both. | |
28 config("gnome_keyring_direct") { | |
29 libs = [ "gnome-keyring" ] | |
30 } | |
31 } | |
7 | 32 |
8 static_library("os_crypt") { | 33 static_library("os_crypt") { |
9 sources = [ | 34 sources = [ |
10 "ie7_password_win.cc", | 35 "ie7_password_win.cc", |
11 "ie7_password_win.h", | 36 "ie7_password_win.h", |
12 "keychain_password_mac.h", | 37 "keychain_password_mac.h", |
13 "keychain_password_mac.mm", | 38 "keychain_password_mac.mm", |
14 "os_crypt.h", | 39 "os_crypt.h", |
15 "os_crypt_mac.mm", | 40 "os_crypt_mac.mm", |
16 "os_crypt_posix.cc", | 41 "os_crypt_posix.cc", |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 "key_storage_linux.cc", | 75 "key_storage_linux.cc", |
51 "key_storage_linux.h", | 76 "key_storage_linux.h", |
52 "os_crypt_linux.cc", | 77 "os_crypt_linux.cc", |
53 ] | 78 ] |
54 defines = [] | 79 defines = [] |
55 | 80 |
56 if (use_glib) { | 81 if (use_glib) { |
57 sources += [ | 82 sources += [ |
58 "key_storage_libsecret.cc", | 83 "key_storage_libsecret.cc", |
59 "key_storage_libsecret.h", | 84 "key_storage_libsecret.h", |
85 "keyring_util_linux.cc", | |
86 "keyring_util_linux.h", | |
60 "libsecret_util_linux.cc", | 87 "libsecret_util_linux.cc", |
61 "libsecret_util_linux.h", | 88 "libsecret_util_linux.h", |
62 ] | 89 ] |
63 configs += [ "//build/config/linux:glib" ] | 90 configs += [ |
91 "//build/config/linux:glib", | |
92 ":gnome_keyring", | |
93 ] | |
64 deps += [ "//third_party/libsecret" ] | 94 deps += [ "//third_party/libsecret" ] |
65 defines += [ "USE_LIBSECRET" ] | 95 defines += [ "USE_LIBSECRET" ] |
66 } | 96 } |
67 if (use_dbus) { | 97 if (use_dbus) { |
68 sources += [ | 98 sources += [ |
69 "key_storage_kwallet.cc", | 99 "key_storage_kwallet.cc", |
70 "key_storage_kwallet.h", | 100 "key_storage_kwallet.h", |
71 "kwallet_dbus.cc", | 101 "kwallet_dbus.cc", |
72 "kwallet_dbus.h", | 102 "kwallet_dbus.h", |
73 ] | 103 ] |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 if (use_dbus) { | 161 if (use_dbus) { |
132 sources += [ | 162 sources += [ |
133 "key_storage_kwallet_unittest.cc", | 163 "key_storage_kwallet_unittest.cc", |
134 "kwallet_dbus_unittest.cc", | 164 "kwallet_dbus_unittest.cc", |
135 ] | 165 ] |
136 deps += [ "//dbus:test_support" ] | 166 deps += [ "//dbus:test_support" ] |
137 defines += [ "USE_KWALLET" ] | 167 defines += [ "USE_KWALLET" ] |
138 } | 168 } |
139 } | 169 } |
140 } | 170 } |
OLD | NEW |