From 71c588a1527affe73b15a3637b89315a35f83315 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Wed, 9 Jul 2014 10:41:08 +0000 Subject: Android: Exclude google drive code. TBR=rogerta@chromium.org Review URL: https://codereview.chromium.org/372843006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282001 0039d316-1c4b-4281-b951-d872f2087c98 --- google_apis/BUILD.gn | 100 ++++++++++++++++++++++-------------------- google_apis/google_apis.gyp | 103 +++++++++++++++++++++++--------------------- 2 files changed, 107 insertions(+), 96 deletions(-) (limited to 'google_apis') diff --git a/google_apis/BUILD.gn b/google_apis/BUILD.gn index 6dbeab1..f5d5a2e 100644 --- a/google_apis/BUILD.gn +++ b/google_apis/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. import("//build/config/crypto.gni") +import("//build/config/features.gni") declare_args() { # You can set the variable 'use_official_google_api_keys' to true @@ -79,36 +80,6 @@ source_set("google_apis") { sources = [ "cup/client_update_protocol.cc", "cup/client_update_protocol.h", - "drive/auth_service.cc", - "drive/auth_service.h", - "drive/auth_service_interface.h", - "drive/auth_service_observer.h", - "drive/base_requests.cc", - "drive/base_requests.h", - "drive/drive_api_parser.cc", - "drive/drive_api_parser.h", - "drive/drive_api_requests.cc", - "drive/drive_api_requests.h", - "drive/drive_api_url_generator.cc", - "drive/drive_api_url_generator.h", - "drive/drive_common_callbacks.h", - "drive/drive_entry_kinds.h", - "drive/gdata_errorcode.cc", - "drive/gdata_errorcode.h", - "drive/gdata_wapi_requests.cc", - "drive/gdata_wapi_requests.h", - "drive/gdata_wapi_parser.cc", - "drive/gdata_wapi_parser.h", - "drive/gdata_wapi_url_generator.cc", - "drive/gdata_wapi_url_generator.h", - "drive/request_sender.cc", - "drive/request_sender.h", - "drive/request_util.cc", - "drive/request_util.h", - "drive/task_util.cc", - "drive/task_util.h", - "drive/time_util.cc", - "drive/time_util.h", "gaia/gaia_auth_consumer.cc", "gaia/gaia_auth_consumer.h", "gaia/gaia_auth_fetcher.cc", @@ -167,14 +138,45 @@ source_set("google_apis") { } else { sources += [ "cup/client_update_protocol_nss.cc" ] } + + if (enable_extensions) { + sources += [ + "drive/auth_service.cc", + "drive/auth_service.h", + "drive/auth_service_interface.h", + "drive/auth_service_observer.h", + "drive/base_requests.cc", + "drive/base_requests.h", + "drive/drive_api_parser.cc", + "drive/drive_api_parser.h", + "drive/drive_api_requests.cc", + "drive/drive_api_requests.h", + "drive/drive_api_url_generator.cc", + "drive/drive_api_url_generator.h", + "drive/drive_common_callbacks.h", + "drive/drive_entry_kinds.h", + "drive/gdata_errorcode.cc", + "drive/gdata_errorcode.h", + "drive/gdata_wapi_requests.cc", + "drive/gdata_wapi_requests.h", + "drive/gdata_wapi_parser.cc", + "drive/gdata_wapi_parser.h", + "drive/gdata_wapi_url_generator.cc", + "drive/gdata_wapi_url_generator.h", + "drive/request_sender.cc", + "drive/request_sender.h", + "drive/request_util.cc", + "drive/request_util.h", + "drive/task_util.cc", + "drive/task_util.h", + "drive/time_util.cc", + "drive/time_util.h", + ] + } } source_set("test_support") { sources = [ - "drive/dummy_auth_service.cc", - "drive/dummy_auth_service.h", - "drive/test_util.cc", - "drive/test_util.h", "gaia/fake_gaia.cc", "gaia/fake_gaia.h", "gaia/fake_identity_provider.cc", @@ -193,23 +195,21 @@ source_set("test_support") { "//net:test_support", ] forward_dependent_configs_from = deps + + if (enable_extensions) { + sources += [ + "drive/dummy_auth_service.cc", + "drive/dummy_auth_service.h", + "drive/test_util.cc", + "drive/test_util.h", + ] + } } test("google_apis_unittest") { sources = [ "google_api_keys_unittest.cc", "cup/client_update_protocol_unittest.cc", - "drive/base_requests_unittest.cc", - "drive/base_requests_server_unittest.cc", - "drive/drive_api_requests_unittest.cc", - "drive/drive_api_parser_unittest.cc", - "drive/drive_api_url_generator_unittest.cc", - "drive/gdata_wapi_parser_unittest.cc", - "drive/gdata_wapi_requests_unittest.cc", - "drive/gdata_wapi_url_generator_unittest.cc", - "drive/request_sender_unittest.cc", - "drive/request_util_unittest.cc", - "drive/time_util_unittest.cc", "gaia/gaia_auth_fetcher_unittest.cc", "gaia/gaia_auth_util_unittest.cc", "gaia/gaia_oauth_client_unittest.cc", @@ -234,13 +234,19 @@ test("google_apis_unittest") { "//testing/gtest", ] - if (is_android) { - sources -= [ + if (enable_extensions) { + sources += [ "drive/base_requests_server_unittest.cc", + "drive/base_requests_unittest.cc", "drive/drive_api_parser_unittest.cc", "drive/drive_api_requests_unittest.cc", + "drive/drive_api_url_generator_unittest.cc", "drive/gdata_wapi_parser_unittest.cc", "drive/gdata_wapi_requests_unittest.cc", + "drive/gdata_wapi_url_generator_unittest.cc", + "drive/request_sender_unittest.cc", + "drive/request_util_unittest.cc", + "drive/time_util_unittest.cc", ] } } diff --git a/google_apis/google_apis.gyp b/google_apis/google_apis.gyp index 77dfce9..1d2642f 100644 --- a/google_apis/google_apis.gyp +++ b/google_apis/google_apis.gyp @@ -36,13 +36,13 @@ 'GOOGLE_DEFAULT_CLIENT_SECRET="<(google_default_client_secret)"', ] }], - ['OS == "mac" or OS == "ios" or OS == "win"', { + ['OS=="mac" or OS=="ios" or OS=="win"', { 'dependencies': [ '../third_party/nss/nss.gyp:nspr', '../third_party/nss/nss.gyp:nss', ], }], - ['OS == "android"', { + ['OS=="android"', { 'dependencies': [ '../third_party/openssl/openssl.gyp:openssl', ], @@ -50,6 +50,40 @@ ['exclude', 'cup/client_update_protocol_nss\.cc$'], ], }], + ['enable_extensions==1', { + 'sources': [ + 'drive/auth_service.cc', + 'drive/auth_service.h', + 'drive/auth_service_interface.h', + 'drive/auth_service_observer.h', + 'drive/base_requests.cc', + 'drive/base_requests.h', + 'drive/drive_api_parser.cc', + 'drive/drive_api_parser.h', + 'drive/drive_api_requests.cc', + 'drive/drive_api_requests.h', + 'drive/drive_api_url_generator.cc', + 'drive/drive_api_url_generator.h', + 'drive/drive_common_callbacks.h', + 'drive/drive_entry_kinds.h', + 'drive/gdata_errorcode.cc', + 'drive/gdata_errorcode.h', + 'drive/gdata_wapi_requests.cc', + 'drive/gdata_wapi_requests.h', + 'drive/gdata_wapi_parser.cc', + 'drive/gdata_wapi_parser.h', + 'drive/gdata_wapi_url_generator.cc', + 'drive/gdata_wapi_url_generator.h', + 'drive/request_sender.cc', + 'drive/request_sender.h', + 'drive/request_util.cc', + 'drive/request_util.h', + 'drive/task_util.cc', + 'drive/task_util.h', + 'drive/time_util.cc', + 'drive/time_util.h', + ], + }], ['use_openssl==1', { 'sources!': [ 'cup/client_update_protocol_nss.cc', @@ -65,36 +99,6 @@ 'cup/client_update_protocol.h', 'cup/client_update_protocol_nss.cc', 'cup/client_update_protocol_openssl.cc', - 'drive/auth_service.cc', - 'drive/auth_service.h', - 'drive/auth_service_interface.h', - 'drive/auth_service_observer.h', - 'drive/base_requests.cc', - 'drive/base_requests.h', - 'drive/drive_api_parser.cc', - 'drive/drive_api_parser.h', - 'drive/drive_api_requests.cc', - 'drive/drive_api_requests.h', - 'drive/drive_api_url_generator.cc', - 'drive/drive_api_url_generator.h', - 'drive/drive_common_callbacks.h', - 'drive/drive_entry_kinds.h', - 'drive/gdata_errorcode.cc', - 'drive/gdata_errorcode.h', - 'drive/gdata_wapi_requests.cc', - 'drive/gdata_wapi_requests.h', - 'drive/gdata_wapi_parser.cc', - 'drive/gdata_wapi_parser.h', - 'drive/gdata_wapi_url_generator.cc', - 'drive/gdata_wapi_url_generator.h', - 'drive/request_sender.cc', - 'drive/request_sender.h', - 'drive/request_util.cc', - 'drive/request_util.h', - 'drive/task_util.cc', - 'drive/task_util.h', - 'drive/time_util.cc', - 'drive/time_util.h', 'gaia/account_tracker.cc', 'gaia/account_tracker.h', 'gaia/gaia_auth_consumer.cc', @@ -159,17 +163,6 @@ 'sources': [ 'google_api_keys_unittest.cc', 'cup/client_update_protocol_unittest.cc', - 'drive/base_requests_unittest.cc', - 'drive/base_requests_server_unittest.cc', - 'drive/drive_api_requests_unittest.cc', - 'drive/drive_api_parser_unittest.cc', - 'drive/drive_api_url_generator_unittest.cc', - 'drive/gdata_wapi_parser_unittest.cc', - 'drive/gdata_wapi_requests_unittest.cc', - 'drive/gdata_wapi_url_generator_unittest.cc', - 'drive/request_sender_unittest.cc', - 'drive/request_util_unittest.cc', - 'drive/time_util_unittest.cc', 'gaia/account_tracker_unittest.cc', 'gaia/gaia_auth_fetcher_unittest.cc', 'gaia/gaia_auth_util_unittest.cc', @@ -185,13 +178,19 @@ 'gaia/ubertoken_fetcher_unittest.cc', ], 'conditions': [ - ['OS=="android"', { - 'sources!': [ + ['enable_extensions==1', { + 'sources': [ 'drive/base_requests_server_unittest.cc', + 'drive/base_requests_unittest.cc', 'drive/drive_api_parser_unittest.cc', 'drive/drive_api_requests_unittest.cc', + 'drive/drive_api_url_generator_unittest.cc', 'drive/gdata_wapi_parser_unittest.cc', 'drive/gdata_wapi_requests_unittest.cc', + 'drive/gdata_wapi_url_generator_unittest.cc', + 'drive/request_sender_unittest.cc', + 'drive/request_util_unittest.cc', + 'drive/time_util_unittest.cc', ], }], ], @@ -212,10 +211,6 @@ '../net/net.gyp:net_test_support', ], 'sources': [ - 'drive/dummy_auth_service.cc', - 'drive/dummy_auth_service.h', - 'drive/test_util.cc', - 'drive/test_util.h', 'gaia/fake_gaia.cc', 'gaia/fake_gaia.h', 'gaia/fake_identity_provider.cc', @@ -226,6 +221,16 @@ 'gaia/oauth2_token_service_test_util.cc', 'gaia/oauth2_token_service_test_util.h', ], + 'conditions': [ + ['enable_extensions==1', { + 'sources': [ + 'drive/dummy_auth_service.cc', + 'drive/dummy_auth_service.h', + 'drive/test_util.cc', + 'drive/test_util.h', + ], + }], + ], }, ], } -- cgit v1.1