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 26 matching lines...) Expand all Loading... |
37 "keychain_password_mac.mm", | 37 "keychain_password_mac.mm", |
38 "os_crypt_mac.mm", | 38 "os_crypt_mac.mm", |
39 ] | 39 ] |
40 set_sources_assignment_filter(sources_assignment_filter) | 40 set_sources_assignment_filter(sources_assignment_filter) |
41 } | 41 } |
42 | 42 |
43 if (is_win) { | 43 if (is_win) { |
44 libs = [ "crypt32.lib" ] | 44 libs = [ "crypt32.lib" ] |
45 } | 45 } |
46 | 46 |
47 if (is_desktop_linux && (use_glib || use_dbus)) { | 47 if (is_desktop_linux) { |
48 sources -= [ "os_crypt_posix.cc" ] | 48 sources -= [ "os_crypt_posix.cc" ] |
49 sources += [ | 49 sources += [ |
50 "key_storage_linux.cc", | 50 "key_storage_linux.cc", |
51 "key_storage_linux.h", | 51 "key_storage_linux.h", |
52 "os_crypt_linux.cc", | 52 "os_crypt_linux.cc", |
53 ] | 53 ] |
54 defines = [] | 54 defines = [] |
55 | 55 |
56 if (use_glib) { | 56 if (use_glib) { |
57 sources += [ | 57 sources += [ |
(...skipping 21 matching lines...) Expand all Loading... |
79 testonly = true | 79 testonly = true |
80 sources = [ | 80 sources = [ |
81 "os_crypt_mocker.cc", | 81 "os_crypt_mocker.cc", |
82 "os_crypt_mocker.h", | 82 "os_crypt_mocker.h", |
83 ] | 83 ] |
84 deps = [ | 84 deps = [ |
85 ":os_crypt", | 85 ":os_crypt", |
86 "//base", | 86 "//base", |
87 "//testing/gtest", | 87 "//testing/gtest", |
88 ] | 88 ] |
89 if (is_desktop_linux && (use_glib || use_dbus)) { | 89 if (is_desktop_linux) { |
90 sources += [ | 90 sources += [ |
91 "os_crypt_mocker_linux.cc", | 91 "os_crypt_mocker_linux.cc", |
92 "os_crypt_mocker_linux.h", | 92 "os_crypt_mocker_linux.h", |
93 ] | 93 ] |
94 deps += [ "//third_party/libsecret" ] | 94 deps += [ "//third_party/libsecret" ] |
95 defines = [ "USE_LIBSECRET" ] | 95 defines = [ "USE_LIBSECRET" ] |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 source_set("unit_tests") { | 99 source_set("unit_tests") { |
100 testonly = true | 100 testonly = true |
101 sources = [ | 101 sources = [ |
102 "ie7_password_win_unittest.cc", | 102 "ie7_password_win_unittest.cc", |
103 "keychain_password_mac_unittest.mm", | 103 "keychain_password_mac_unittest.mm", |
104 "os_crypt_unittest.cc", | 104 "os_crypt_unittest.cc", |
105 ] | 105 ] |
106 deps = [ | 106 deps = [ |
107 ":os_crypt", | 107 ":os_crypt", |
108 ":test_support", | 108 ":test_support", |
109 "//base", | 109 "//base", |
110 "//crypto", | 110 "//crypto", |
111 "//testing/gmock", | 111 "//testing/gmock", |
112 "//testing/gtest", | 112 "//testing/gtest", |
113 ] | 113 ] |
114 | 114 |
115 if (is_desktop_linux && (use_glib || use_dbus)) { | 115 if (is_desktop_linux) { |
116 sources += [ "os_crypt_linux_unittest.cc" ] | 116 sources += [ "os_crypt_linux_unittest.cc" ] |
117 defines = [] | 117 defines = [] |
118 | 118 |
119 if (use_glib) { | 119 if (use_glib) { |
120 sources += [ "os_crypt_util_linux_unittest.cc" ] | 120 sources += [ "os_crypt_util_linux_unittest.cc" ] |
121 deps += [ "//third_party/libsecret" ] | 121 deps += [ "//third_party/libsecret" ] |
122 defines += [ "USE_LIBSECRET" ] | 122 defines += [ "USE_LIBSECRET" ] |
123 } | 123 } |
124 if (use_dbus) { | 124 if (use_dbus) { |
125 sources += [ "kwallet_dbus_unittest.cc" ] | 125 sources += [ "kwallet_dbus_unittest.cc" ] |
126 deps += [ "//dbus:test_support" ] | 126 deps += [ "//dbus:test_support" ] |
127 defines += [ "USE_KWALLET" ] | 127 defines += [ "USE_KWALLET" ] |
128 } | 128 } |
129 } | 129 } |
130 } | 130 } |
OLD | NEW |