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/crypto.gni") | 5 import("//build/config/crypto.gni") |
| 6 import("//build/config/features.gni") |
6 | 7 |
7 declare_args() { | 8 declare_args() { |
8 # You can set the variable 'use_official_google_api_keys' to true | 9 # You can set the variable 'use_official_google_api_keys' to true |
9 # to use the Google-internal file containing official API keys | 10 # to use the Google-internal file containing official API keys |
10 # for Google Chrome even in a developer build. Setting this | 11 # for Google Chrome even in a developer build. Setting this |
11 # variable explicitly to true will cause your build to fail if the | 12 # variable explicitly to true will cause your build to fail if the |
12 # internal file is missing. | 13 # internal file is missing. |
13 # | 14 # |
14 # The variable is documented here, but not handled in this file; | 15 # The variable is documented here, but not handled in this file; |
15 # see //google_apis/determine_use_official_keys.gypi for the | 16 # see //google_apis/determine_use_official_keys.gypi for the |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 73 } |
73 if (google_default_client_secret != "") { | 74 if (google_default_client_secret != "") { |
74 defines += [ "GOOGLE_DEFAULT_CLIENT_SECRET=$google_default_client_secret" ] | 75 defines += [ "GOOGLE_DEFAULT_CLIENT_SECRET=$google_default_client_secret" ] |
75 } | 76 } |
76 } | 77 } |
77 | 78 |
78 source_set("google_apis") { | 79 source_set("google_apis") { |
79 sources = [ | 80 sources = [ |
80 "cup/client_update_protocol.cc", | 81 "cup/client_update_protocol.cc", |
81 "cup/client_update_protocol.h", | 82 "cup/client_update_protocol.h", |
82 "drive/auth_service.cc", | |
83 "drive/auth_service.h", | |
84 "drive/auth_service_interface.h", | |
85 "drive/auth_service_observer.h", | |
86 "drive/base_requests.cc", | |
87 "drive/base_requests.h", | |
88 "drive/drive_api_parser.cc", | |
89 "drive/drive_api_parser.h", | |
90 "drive/drive_api_requests.cc", | |
91 "drive/drive_api_requests.h", | |
92 "drive/drive_api_url_generator.cc", | |
93 "drive/drive_api_url_generator.h", | |
94 "drive/drive_common_callbacks.h", | |
95 "drive/drive_entry_kinds.h", | |
96 "drive/gdata_errorcode.cc", | |
97 "drive/gdata_errorcode.h", | |
98 "drive/gdata_wapi_requests.cc", | |
99 "drive/gdata_wapi_requests.h", | |
100 "drive/gdata_wapi_parser.cc", | |
101 "drive/gdata_wapi_parser.h", | |
102 "drive/gdata_wapi_url_generator.cc", | |
103 "drive/gdata_wapi_url_generator.h", | |
104 "drive/request_sender.cc", | |
105 "drive/request_sender.h", | |
106 "drive/request_util.cc", | |
107 "drive/request_util.h", | |
108 "drive/task_util.cc", | |
109 "drive/task_util.h", | |
110 "drive/time_util.cc", | |
111 "drive/time_util.h", | |
112 "gaia/gaia_auth_consumer.cc", | 83 "gaia/gaia_auth_consumer.cc", |
113 "gaia/gaia_auth_consumer.h", | 84 "gaia/gaia_auth_consumer.h", |
114 "gaia/gaia_auth_fetcher.cc", | 85 "gaia/gaia_auth_fetcher.cc", |
115 "gaia/gaia_auth_fetcher.h", | 86 "gaia/gaia_auth_fetcher.h", |
116 "gaia/gaia_auth_util.cc", | 87 "gaia/gaia_auth_util.cc", |
117 "gaia/gaia_auth_util.h", | 88 "gaia/gaia_auth_util.h", |
118 "gaia/gaia_constants.cc", | 89 "gaia/gaia_constants.cc", |
119 "gaia/gaia_constants.h", | 90 "gaia/gaia_constants.h", |
120 "gaia/gaia_oauth_client.cc", | 91 "gaia/gaia_oauth_client.cc", |
121 "gaia/gaia_oauth_client.h", | 92 "gaia/gaia_oauth_client.h", |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 "//crypto:platform", | 131 "//crypto:platform", |
161 "//net", | 132 "//net", |
162 "//third_party/libxml", | 133 "//third_party/libxml", |
163 ] | 134 ] |
164 | 135 |
165 if (use_openssl) { | 136 if (use_openssl) { |
166 sources += [ "cup/client_update_protocol_openssl.cc" ] | 137 sources += [ "cup/client_update_protocol_openssl.cc" ] |
167 } else { | 138 } else { |
168 sources += [ "cup/client_update_protocol_nss.cc" ] | 139 sources += [ "cup/client_update_protocol_nss.cc" ] |
169 } | 140 } |
| 141 |
| 142 if (enable_extensions) { |
| 143 sources += [ |
| 144 "drive/auth_service.cc", |
| 145 "drive/auth_service.h", |
| 146 "drive/auth_service_interface.h", |
| 147 "drive/auth_service_observer.h", |
| 148 "drive/base_requests.cc", |
| 149 "drive/base_requests.h", |
| 150 "drive/drive_api_parser.cc", |
| 151 "drive/drive_api_parser.h", |
| 152 "drive/drive_api_requests.cc", |
| 153 "drive/drive_api_requests.h", |
| 154 "drive/drive_api_url_generator.cc", |
| 155 "drive/drive_api_url_generator.h", |
| 156 "drive/drive_common_callbacks.h", |
| 157 "drive/drive_entry_kinds.h", |
| 158 "drive/gdata_errorcode.cc", |
| 159 "drive/gdata_errorcode.h", |
| 160 "drive/gdata_wapi_requests.cc", |
| 161 "drive/gdata_wapi_requests.h", |
| 162 "drive/gdata_wapi_parser.cc", |
| 163 "drive/gdata_wapi_parser.h", |
| 164 "drive/gdata_wapi_url_generator.cc", |
| 165 "drive/gdata_wapi_url_generator.h", |
| 166 "drive/request_sender.cc", |
| 167 "drive/request_sender.h", |
| 168 "drive/request_util.cc", |
| 169 "drive/request_util.h", |
| 170 "drive/task_util.cc", |
| 171 "drive/task_util.h", |
| 172 "drive/time_util.cc", |
| 173 "drive/time_util.h", |
| 174 ] |
| 175 } |
170 } | 176 } |
171 | 177 |
172 source_set("test_support") { | 178 source_set("test_support") { |
173 sources = [ | 179 sources = [ |
174 "drive/dummy_auth_service.cc", | |
175 "drive/dummy_auth_service.h", | |
176 "drive/test_util.cc", | |
177 "drive/test_util.h", | |
178 "gaia/fake_gaia.cc", | 180 "gaia/fake_gaia.cc", |
179 "gaia/fake_gaia.h", | 181 "gaia/fake_gaia.h", |
180 "gaia/fake_identity_provider.cc", | 182 "gaia/fake_identity_provider.cc", |
181 "gaia/fake_identity_provider.h", | 183 "gaia/fake_identity_provider.h", |
182 "gaia/fake_oauth2_token_service.cc", | 184 "gaia/fake_oauth2_token_service.cc", |
183 "gaia/fake_oauth2_token_service.h", | 185 "gaia/fake_oauth2_token_service.h", |
184 "gaia/mock_url_fetcher_factory.h", | 186 "gaia/mock_url_fetcher_factory.h", |
185 "gaia/oauth2_token_service_test_util.cc", | 187 "gaia/oauth2_token_service_test_util.cc", |
186 "gaia/oauth2_token_service_test_util.h", | 188 "gaia/oauth2_token_service_test_util.h", |
187 ] | 189 ] |
188 | 190 |
189 deps = [ | 191 deps = [ |
190 "//base", | 192 "//base", |
191 "//base/test:test_support", | 193 "//base/test:test_support", |
192 "//net", | 194 "//net", |
193 "//net:test_support", | 195 "//net:test_support", |
194 ] | 196 ] |
195 forward_dependent_configs_from = deps | 197 forward_dependent_configs_from = deps |
| 198 |
| 199 if (enable_extensions) { |
| 200 sources += [ |
| 201 "drive/dummy_auth_service.cc", |
| 202 "drive/dummy_auth_service.h", |
| 203 "drive/test_util.cc", |
| 204 "drive/test_util.h", |
| 205 ] |
| 206 } |
196 } | 207 } |
197 | 208 |
198 test("google_apis_unittest") { | 209 test("google_apis_unittest") { |
199 sources = [ | 210 sources = [ |
200 "google_api_keys_unittest.cc", | 211 "google_api_keys_unittest.cc", |
201 "cup/client_update_protocol_unittest.cc", | 212 "cup/client_update_protocol_unittest.cc", |
202 "drive/base_requests_unittest.cc", | |
203 "drive/base_requests_server_unittest.cc", | |
204 "drive/drive_api_requests_unittest.cc", | |
205 "drive/drive_api_parser_unittest.cc", | |
206 "drive/drive_api_url_generator_unittest.cc", | |
207 "drive/gdata_wapi_parser_unittest.cc", | |
208 "drive/gdata_wapi_requests_unittest.cc", | |
209 "drive/gdata_wapi_url_generator_unittest.cc", | |
210 "drive/request_sender_unittest.cc", | |
211 "drive/request_util_unittest.cc", | |
212 "drive/time_util_unittest.cc", | |
213 "gaia/gaia_auth_fetcher_unittest.cc", | 213 "gaia/gaia_auth_fetcher_unittest.cc", |
214 "gaia/gaia_auth_util_unittest.cc", | 214 "gaia/gaia_auth_util_unittest.cc", |
215 "gaia/gaia_oauth_client_unittest.cc", | 215 "gaia/gaia_oauth_client_unittest.cc", |
216 "gaia/google_service_auth_error_unittest.cc", | 216 "gaia/google_service_auth_error_unittest.cc", |
217 "gaia/merge_session_helper_unittest.cc", | 217 "gaia/merge_session_helper_unittest.cc", |
218 "gaia/oauth_request_signer_unittest.cc", | 218 "gaia/oauth_request_signer_unittest.cc", |
219 "gaia/oauth2_access_token_fetcher_impl_unittest.cc", | 219 "gaia/oauth2_access_token_fetcher_impl_unittest.cc", |
220 "gaia/oauth2_api_call_flow_unittest.cc", | 220 "gaia/oauth2_api_call_flow_unittest.cc", |
221 "gaia/oauth2_mint_token_flow_unittest.cc", | 221 "gaia/oauth2_mint_token_flow_unittest.cc", |
222 "gaia/oauth2_token_service_unittest.cc", | 222 "gaia/oauth2_token_service_unittest.cc", |
223 "gaia/ubertoken_fetcher_unittest.cc", | 223 "gaia/ubertoken_fetcher_unittest.cc", |
224 ] | 224 ] |
225 | 225 |
226 configs += [ ":key_defines" ] | 226 configs += [ ":key_defines" ] |
227 | 227 |
228 deps = [ | 228 deps = [ |
229 ":google_apis", | 229 ":google_apis", |
230 ":test_support", | 230 ":test_support", |
231 "//base", | 231 "//base", |
232 "//base/test:run_all_unittests", | 232 "//base/test:run_all_unittests", |
233 "//testing/gmock", | 233 "//testing/gmock", |
234 "//testing/gtest", | 234 "//testing/gtest", |
235 ] | 235 ] |
236 | 236 |
237 if (is_android) { | 237 if (enable_extensions) { |
238 sources -= [ | 238 sources += [ |
239 "drive/base_requests_server_unittest.cc", | 239 "drive/base_requests_server_unittest.cc", |
| 240 "drive/base_requests_unittest.cc", |
240 "drive/drive_api_parser_unittest.cc", | 241 "drive/drive_api_parser_unittest.cc", |
241 "drive/drive_api_requests_unittest.cc", | 242 "drive/drive_api_requests_unittest.cc", |
| 243 "drive/drive_api_url_generator_unittest.cc", |
242 "drive/gdata_wapi_parser_unittest.cc", | 244 "drive/gdata_wapi_parser_unittest.cc", |
243 "drive/gdata_wapi_requests_unittest.cc", | 245 "drive/gdata_wapi_requests_unittest.cc", |
| 246 "drive/gdata_wapi_url_generator_unittest.cc", |
| 247 "drive/request_sender_unittest.cc", |
| 248 "drive/request_util_unittest.cc", |
| 249 "drive/time_util_unittest.cc", |
244 ] | 250 ] |
245 } | 251 } |
246 } | 252 } |
OLD | NEW |