diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-16 20:26:30 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-16 20:26:30 +0000 |
commit | abd4b686e423705d305e68b29dc4b9822fb8417e (patch) | |
tree | 7f4240826cbd07fae1a498faf903d2d477054176 /google_apis | |
parent | 0a513f2ae5eeb6f1a02f16d339b2c30c478ad4ca (diff) | |
download | chromium_src-abd4b686e423705d305e68b29dc4b9822fb8417e.zip chromium_src-abd4b686e423705d305e68b29dc4b9822fb8417e.tar.gz chromium_src-abd4b686e423705d305e68b29dc4b9822fb8417e.tar.bz2 |
Add gcm, nfc and bluetooth to GN build.
TBR=jamesr
Review URL: https://codereview.chromium.org/394033002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis')
-rw-r--r-- | google_apis/gcm/BUILD.gn | 127 | ||||
-rw-r--r-- | google_apis/gcm/gcm.gyp | 7 |
2 files changed, 133 insertions, 1 deletions
diff --git a/google_apis/gcm/BUILD.gn b/google_apis/gcm/BUILD.gn new file mode 100644 index 0000000..f69fdfc --- /dev/null +++ b/google_apis/gcm/BUILD.gn @@ -0,0 +1,127 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//third_party/protobuf/proto_library.gni") + +component("gcm") { + sources = [ + "base/mcs_message.cc", + "base/mcs_message.h", + "base/mcs_util.cc", + "base/mcs_util.h", + "base/socket_stream.cc", + "base/socket_stream.h", + "engine/checkin_request.cc", + "engine/checkin_request.h", + "engine/connection_factory.cc", + "engine/connection_factory.h", + "engine/connection_factory_impl.cc", + "engine/connection_factory_impl.h", + "engine/connection_handler.cc", + "engine/connection_handler.h", + "engine/connection_handler_impl.cc", + "engine/connection_handler_impl.h", + "engine/gcm_store.cc", + "engine/gcm_store.h", + "engine/gcm_store_impl.cc", + "engine/gcm_store_impl.h", + "engine/gservices_settings.cc", + "engine/gservices_settings.h", + "engine/heartbeat_manager.cc", + "engine/heartbeat_manager.h", + "engine/mcs_client.cc", + "engine/mcs_client.h", + "engine/registration_info.cc", + "engine/registration_info.h", + "engine/registration_request.cc", + "engine/registration_request.h", + "engine/unregistration_request.cc", + "engine/unregistration_request.h", + "monitoring/gcm_stats_recorder.h", + ] + + defines = [ "GCM_IMPLEMENTATION" ] + + deps = [ + ":proto", + "//base", + "//base/third_party/dynamic_annotations", + "//net", + "//third_party/leveldatabase", + "//url", + ] + + forward_dependent_configs_from = [ ":proto" ] +} + +proto_library("proto") { + visibility = ":*" + sources = [ + "protocol/android_checkin.proto", + "protocol/checkin.proto", + "protocol/mcs.proto", + ] +} + +static_library("test_support") { + sources = [ + "base/fake_encryptor.cc", + "base/fake_encryptor.h", + "engine/fake_connection_factory.cc", + "engine/fake_connection_factory.h", + "engine/fake_connection_handler.cc", + "engine/fake_connection_handler.h", + "monitoring/fake_gcm_stats_recorder.cc", + "monitoring/fake_gcm_stats_recorder.h", + ] + + deps = [ + ":gcm", + "//base", + "//testing/gtest", + ] + + forward_dependent_configs_from = [ ":gcm" ] +} + +# A standalone MCS (mobile connection server) client. +executable("mcs_probe") { + sources = [ + "tools/mcs_probe.cc", + ] + + deps = [ + ":gcm", + ":test_support", + "//base", + "//net", + "//net:test_support", + ] +} + +test("gcm_unit_tests") { + sources = [ + "base/mcs_message_unittest.cc", + "base/mcs_util_unittest.cc", + "base/socket_stream_unittest.cc", + "engine/checkin_request_unittest.cc", + "engine/connection_factory_impl_unittest.cc", + "engine/connection_handler_impl_unittest.cc", + "engine/gcm_store_impl_unittest.cc", + "engine/gservices_settings_unittest.cc", + "engine/heartbeat_manager_unittest.cc", + "engine/mcs_client_unittest.cc", + "engine/registration_request_unittest.cc", + "engine/unregistration_request_unittest.cc", + ] + + deps = [ + ":test_support", + "//base", + "//base/test:run_all_unittests", + "//net", + "//net:test_support", + "//testing/gtest", + ] +} diff --git a/google_apis/gcm/gcm.gyp b/google_apis/gcm/gcm.gyp index 81dcf21..2b5a818 100644 --- a/google_apis/gcm/gcm.gyp +++ b/google_apis/gcm/gcm.gyp @@ -10,6 +10,7 @@ 'targets': [ # The public GCM target. { + # GN version: //google_apis/gcm 'target_name': 'gcm', 'type': '<(component)', 'variables': { @@ -37,6 +38,7 @@ '../../url/url.gyp:url_lib', ], 'sources': [ + # Note: sources list duplicated in GN build. 'base/mcs_message.cc', 'base/mcs_message.h', 'base/mcs_util.cc', @@ -81,6 +83,7 @@ # The test support library that is needed to test gcm. { + # GN version: //google_apis/gcm:test_support 'target_name': 'gcm_test_support', 'type': 'static_library', 'include_dirs': [ @@ -96,6 +99,7 @@ 'gcm', ], 'sources': [ + # Note: sources list duplicated in GN build. 'base/fake_encryptor.cc', 'base/fake_encryptor.h', 'engine/fake_connection_factory.cc', @@ -109,6 +113,7 @@ # A standalone MCS (mobile connection server) client. { + # GN version: //google_apis/gcm:mcs_probe 'target_name': 'mcs_probe', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, @@ -124,6 +129,7 @@ 'gcm_test_support' ], 'sources': [ + # Note: file list duplicated in GN build. 'tools/mcs_probe.cc', ], }, @@ -146,7 +152,6 @@ '../../net/net.gyp:net_test_support', '../../testing/gtest.gyp:gtest', '../../third_party/protobuf/protobuf.gyp:protobuf_lite', - 'mcs_probe', 'gcm', 'gcm_test_support' ], |