Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / google_apis / gcm / BUILD.gn
blob491332436d845aa7a20b192555a9166e8f7cb51c
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
3 # found in the LICENSE file.
5 import("//third_party/protobuf/proto_library.gni")
7 component("gcm") {
8   sources = [
9     "base/mcs_message.cc",
10     "base/mcs_message.h",
11     "base/mcs_util.cc",
12     "base/mcs_util.h",
13     "base/socket_stream.cc",
14     "base/socket_stream.h",
15     "engine/account_mapping.cc",
16     "engine/account_mapping.h",
17     "engine/checkin_request.cc",
18     "engine/checkin_request.h",
19     "engine/connection_factory.cc",
20     "engine/connection_factory.h",
21     "engine/connection_factory_impl.cc",
22     "engine/connection_factory_impl.h",
23     "engine/connection_handler.cc",
24     "engine/connection_handler.h",
25     "engine/connection_handler_impl.cc",
26     "engine/connection_handler_impl.h",
27     "engine/gcm_store.cc",
28     "engine/gcm_store.h",
29     "engine/gcm_store_impl.cc",
30     "engine/gcm_store_impl.h",
31     "engine/gservices_settings.cc",
32     "engine/gservices_settings.h",
33     "engine/heartbeat_manager.cc",
34     "engine/heartbeat_manager.h",
35     "engine/mcs_client.cc",
36     "engine/mcs_client.h",
37     "engine/registration_info.cc",
38     "engine/registration_info.h",
39     "engine/registration_request.cc",
40     "engine/registration_request.h",
41     "engine/unregistration_request.cc",
42     "engine/unregistration_request.h",
43     "monitoring/gcm_stats_recorder.h",
44   ]
46   defines = [ "GCM_IMPLEMENTATION" ]
48   deps = [
49     ":proto",
50     "//base",
51     "//base/third_party/dynamic_annotations",
52     "//net",
53     "//third_party/leveldatabase",
54     "//url",
55   ]
57   forward_dependent_configs_from = [ ":proto" ]
60 proto_library("proto") {
61   visibility = ":*"
62   sources = [
63     "protocol/android_checkin.proto",
64     "protocol/checkin.proto",
65     "protocol/mcs.proto",
66   ]
69 static_library("test_support") {
70   sources = [
71     "base/fake_encryptor.cc",
72     "base/fake_encryptor.h",
73     "engine/fake_connection_factory.cc",
74     "engine/fake_connection_factory.h",
75     "engine/fake_connection_handler.cc",
76     "engine/fake_connection_handler.h",
77     "monitoring/fake_gcm_stats_recorder.cc",
78     "monitoring/fake_gcm_stats_recorder.h",
79   ]
81   deps = [
82     ":gcm",
83     "//base",
84     "//testing/gtest",
85   ]
87   forward_dependent_configs_from = [ ":gcm" ]
90 # A standalone MCS (mobile connection server) client.
91 executable("mcs_probe") {
92   sources = [
93     "tools/mcs_probe.cc",
94   ]
96   deps = [
97     ":gcm",
98     ":proto",
99     ":test_support",
100     "//base",
101     "//net",
102     "//net:test_support",
103   ]
106 test("gcm_unit_tests") {
107   sources = [
108     "base/mcs_message_unittest.cc",
109     "base/mcs_util_unittest.cc",
110     "base/socket_stream_unittest.cc",
111     "engine/account_mapping_unittest.cc",
112     "engine/checkin_request_unittest.cc",
113     "engine/connection_factory_impl_unittest.cc",
114     "engine/connection_handler_impl_unittest.cc",
115     "engine/gcm_store_impl_unittest.cc",
116     "engine/gservices_settings_unittest.cc",
117     "engine/heartbeat_manager_unittest.cc",
118     "engine/mcs_client_unittest.cc",
119     "engine/registration_request_unittest.cc",
120     "engine/unregistration_request_unittest.cc",
121   ]
123   deps = [
124     ":proto",
125     ":test_support",
126     "//base",
127     "//base/test:run_all_unittests",
128     "//net",
129     "//net:test_support",
130     "//testing/gtest",
131   ]