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 | 7 |
8 static_library("os_crypt") { | 8 static_library("os_crypt") { |
9 sources = [ | 9 sources = [ |
10 "ie7_password_win.cc", | 10 "ie7_password_win.cc", |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 "key_storage_libsecret.h", | 59 "key_storage_libsecret.h", |
60 "libsecret_util_linux.cc", | 60 "libsecret_util_linux.cc", |
61 "libsecret_util_linux.h", | 61 "libsecret_util_linux.h", |
62 ] | 62 ] |
63 configs += [ "//build/config/linux:glib" ] | 63 configs += [ "//build/config/linux:glib" ] |
64 deps += [ "//third_party/libsecret" ] | 64 deps += [ "//third_party/libsecret" ] |
65 defines += [ "USE_LIBSECRET" ] | 65 defines += [ "USE_LIBSECRET" ] |
66 } | 66 } |
67 if (use_dbus) { | 67 if (use_dbus) { |
68 sources += [ | 68 sources += [ |
| 69 "key_storage_kwallet.cc", |
| 70 "key_storage_kwallet.h", |
69 "kwallet_dbus.cc", | 71 "kwallet_dbus.cc", |
70 "kwallet_dbus.h", | 72 "kwallet_dbus.h", |
71 ] | 73 ] |
72 deps += [ "//dbus" ] | 74 deps += [ "//dbus" ] |
73 defines += [ "USE_KWALLET" ] | 75 defines += [ "USE_KWALLET" ] |
74 } | 76 } |
75 } | 77 } |
76 } | 78 } |
77 | 79 |
78 static_library("test_support") { | 80 static_library("test_support") { |
79 testonly = true | 81 testonly = true |
80 sources = [ | 82 sources = [ |
81 "os_crypt_mocker.cc", | 83 "os_crypt_mocker.cc", |
82 "os_crypt_mocker.h", | 84 "os_crypt_mocker.h", |
83 ] | 85 ] |
84 deps = [ | 86 deps = [ |
85 ":os_crypt", | 87 ":os_crypt", |
86 "//base", | 88 "//base", |
87 "//testing/gtest", | 89 "//testing/gtest", |
88 ] | 90 ] |
89 if (is_desktop_linux) { | 91 if (is_desktop_linux) { |
90 sources += [ | 92 sources += [ |
91 "os_crypt_mocker_linux.cc", | 93 "os_crypt_mocker_linux.cc", |
92 "os_crypt_mocker_linux.h", | 94 "os_crypt_mocker_linux.h", |
93 ] | 95 ] |
94 deps += [ "//third_party/libsecret" ] | 96 defines = [] |
95 defines = [ "USE_LIBSECRET" ] | 97 if (use_glib) { |
| 98 defines += [ "USE_LIBSECRET" ] |
| 99 } |
| 100 if (use_dbus) { |
| 101 defines += [ "USE_KWALLET" ] |
| 102 } |
96 } | 103 } |
97 } | 104 } |
98 | 105 |
99 source_set("unit_tests") { | 106 source_set("unit_tests") { |
100 testonly = true | 107 testonly = true |
101 sources = [ | 108 sources = [ |
102 "ie7_password_win_unittest.cc", | 109 "ie7_password_win_unittest.cc", |
103 "keychain_password_mac_unittest.mm", | 110 "keychain_password_mac_unittest.mm", |
104 "os_crypt_unittest.cc", | 111 "os_crypt_unittest.cc", |
105 ] | 112 ] |
106 deps = [ | 113 deps = [ |
107 ":os_crypt", | 114 ":os_crypt", |
108 ":test_support", | 115 ":test_support", |
109 "//base", | 116 "//base", |
110 "//crypto", | 117 "//crypto", |
111 "//testing/gmock", | 118 "//testing/gmock", |
112 "//testing/gtest", | 119 "//testing/gtest", |
113 ] | 120 ] |
114 | 121 |
115 if (is_desktop_linux) { | 122 if (is_desktop_linux) { |
116 sources += [ "os_crypt_linux_unittest.cc" ] | 123 sources += [ "os_crypt_linux_unittest.cc" ] |
117 defines = [] | 124 defines = [] |
118 | 125 |
119 if (use_glib) { | 126 if (use_glib) { |
120 sources += [ "os_crypt_util_linux_unittest.cc" ] | 127 sources += [ "os_crypt_util_linux_unittest.cc" ] |
121 deps += [ "//third_party/libsecret" ] | 128 deps += [ "//third_party/libsecret" ] |
122 defines += [ "USE_LIBSECRET" ] | 129 defines += [ "USE_LIBSECRET" ] |
123 } | 130 } |
124 if (use_dbus) { | 131 if (use_dbus) { |
125 sources += [ "kwallet_dbus_unittest.cc" ] | 132 sources += [ |
| 133 "key_storage_kwallet_unittest.cc", |
| 134 "kwallet_dbus_unittest.cc", |
| 135 ] |
126 deps += [ "//dbus:test_support" ] | 136 deps += [ "//dbus:test_support" ] |
127 defines += [ "USE_KWALLET" ] | 137 defines += [ "USE_KWALLET" ] |
128 } | 138 } |
129 } | 139 } |
130 } | 140 } |
OLD | NEW |