Fix experimental app list search box disappearing on profile switch.
[chromium-blink-merge.git] / google_apis / gcm / BUILD.gn
blob83412b690b880dca4180afcd3f294490c646f605
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("//testing/test.gni")
6 import("//third_party/protobuf/proto_library.gni")
8 component("gcm") {
9   sources = [
10     "base/mcs_message.cc",
11     "base/mcs_message.h",
12     "base/mcs_util.cc",
13     "base/mcs_util.h",
14     "base/socket_stream.cc",
15     "base/socket_stream.h",
16     "engine/account_mapping.cc",
17     "engine/account_mapping.h",
18     "engine/checkin_request.cc",
19     "engine/checkin_request.h",
20     "engine/connection_factory.cc",
21     "engine/connection_factory.h",
22     "engine/connection_factory_impl.cc",
23     "engine/connection_factory_impl.h",
24     "engine/connection_handler.cc",
25     "engine/connection_handler.h",
26     "engine/connection_handler_impl.cc",
27     "engine/connection_handler_impl.h",
28     "engine/gcm_store.cc",
29     "engine/gcm_store.h",
30     "engine/gcm_store_impl.cc",
31     "engine/gcm_store_impl.h",
32     "engine/gservices_settings.cc",
33     "engine/gservices_settings.h",
34     "engine/heartbeat_manager.cc",
35     "engine/heartbeat_manager.h",
36     "engine/mcs_client.cc",
37     "engine/mcs_client.h",
38     "engine/registration_info.cc",
39     "engine/registration_info.h",
40     "engine/registration_request.cc",
41     "engine/registration_request.h",
42     "engine/unregistration_request.cc",
43     "engine/unregistration_request.h",
44     "monitoring/gcm_stats_recorder.h",
45   ]
47   defines = [ "GCM_IMPLEMENTATION" ]
49   public_deps = [
50     ":proto",
51   ]
52   deps = [
53     "//base",
54     "//base/third_party/dynamic_annotations",
55     "//net",
56     "//third_party/leveldatabase",
57     "//url",
58   ]
61 proto_library("proto") {
62   visibility = [ ":*" ]
63   sources = [
64     "protocol/android_checkin.proto",
65     "protocol/checkin.proto",
66     "protocol/mcs.proto",
67   ]
69   cc_generator_options = "dllexport_decl=GCM_EXPORT:"
70   cc_include = "google_apis/gcm/base/gcm_export.h"
71   defines = [ "GCM_IMPLEMENTATION" ]
74 static_library("test_support") {
75   testonly = true
76   sources = [
77     "base/fake_encryptor.cc",
78     "base/fake_encryptor.h",
79     "engine/fake_connection_factory.cc",
80     "engine/fake_connection_factory.h",
81     "engine/fake_connection_handler.cc",
82     "engine/fake_connection_handler.h",
83     "monitoring/fake_gcm_stats_recorder.cc",
84     "monitoring/fake_gcm_stats_recorder.h",
85   ]
87   public_deps = [
88     ":gcm",
89   ]
90   deps = [
91     "//base",
92     "//testing/gtest",
93   ]
96 # A standalone MCS (mobile connection server) client.
97 executable("mcs_probe") {
98   testonly = true
99   sources = [
100     "tools/mcs_probe.cc",
101   ]
103   deps = [
104     ":gcm",
105     ":proto",
106     ":test_support",
107     "//base",
108     "//net",
109     "//net:test_support",
110   ]
113 test("gcm_unit_tests") {
114   sources = [
115     "base/mcs_message_unittest.cc",
116     "base/mcs_util_unittest.cc",
117     "base/socket_stream_unittest.cc",
118     "engine/account_mapping_unittest.cc",
119     "engine/checkin_request_unittest.cc",
120     "engine/connection_factory_impl_unittest.cc",
121     "engine/connection_handler_impl_unittest.cc",
122     "engine/gcm_store_impl_unittest.cc",
123     "engine/gservices_settings_unittest.cc",
124     "engine/heartbeat_manager_unittest.cc",
125     "engine/mcs_client_unittest.cc",
126     "engine/registration_request_unittest.cc",
127     "engine/unregistration_request_unittest.cc",
128   ]
130   deps = [
131     ":proto",
132     ":test_support",
133     "//base",
134     "//base/test:run_all_unittests",
135     "//net",
136     "//net:test_support",
137     "//testing/gtest",
138   ]