Don't preload rarely seen large images
[chromium-blink-merge.git] / components / invalidation / impl / BUILD.gn
blobf01269c64a2e7da4319950417bb73a3bc21e2140
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.
4 if (is_android) {
5   import("//build/config/android/rules.gni")
8 static_library("impl") {
9   sources = [
10     "invalidation_logger.cc",
11     "invalidation_logger.h",
12     "invalidation_logger_observer.h",
13     "invalidation_prefs.cc",
14     "invalidation_prefs.h",
15     "invalidation_service_util.cc",
16     "invalidation_service_util.h",
17     "invalidation_state_tracker.cc",
18     "invalidation_state_tracker.h",
19     "invalidation_switches.cc",
20     "invalidation_switches.h",
21     "invalidator.cc",
22     "invalidator.h",
23     "invalidator_registrar.cc",
24     "invalidator_registrar.h",
25     "invalidator_storage.cc",
26     "invalidator_storage.h",
27     "mock_ack_handler.cc",
28     "mock_ack_handler.h",
29     "profile_invalidation_provider.cc",
30     "profile_invalidation_provider.h",
31     "unacked_invalidation_set.cc",
32     "unacked_invalidation_set.h",
33   ]
34   if (!is_android) {
35     sources += [
36       "gcm_invalidation_bridge.cc",
37       "gcm_invalidation_bridge.h",
38       "gcm_network_channel.cc",
39       "gcm_network_channel.h",
40       "gcm_network_channel_delegate.h",
41       "invalidation_notifier.cc",
42       "invalidation_notifier.h",
43       "non_blocking_invalidator.cc",
44       "non_blocking_invalidator.h",
45       "notifier_reason_util.cc",
46       "notifier_reason_util.h",
47       "p2p_invalidator.cc",
48       "p2p_invalidator.h",
49       "push_client_channel.cc",
50       "push_client_channel.h",
51       "registration_manager.cc",
52       "registration_manager.h",
53       "state_writer.h",
54       "sync_invalidation_listener.cc",
55       "sync_invalidation_listener.h",
56       "sync_system_resources.cc",
57       "sync_system_resources.h",
58       "ticl_invalidation_service.cc",
59       "ticl_invalidation_service.h",
60       "ticl_settings_provider.cc",
61       "ticl_settings_provider.h",
62     ]
63   }
64   public_deps = [
65     "//components/invalidation/public",
66   ]
67   deps = [
68     "//base",
69     "//base:i18n",
70     "//base:prefs",
71     "//components/gcm_driver",
72     "//components/keyed_service/core",
73     "//components/pref_registry",
74     "//components/signin/core/browser",
75     "//google_apis",
76     "//jingle:notifier",
77     "//net:net",
79     # TODO(sync): Remove this (http://crbug.com/133352);
80     "//third_party/protobuf:protobuf_lite",
81   ]
83   if (is_android) {
84     sources += [
85       "android/component_jni_registrar.cc",
86       "android/component_jni_registrar.h",
87       "invalidation_service_android.cc",
88       "invalidation_service_android.h",
89     ]
90     deps += [ ":jni_headers" ]
91   }
94 group("unittests") {
95   testonly = true
96   deps = [
97     ":impl",
98     ":test_support",
99   ]
100   if (is_android) {
101     deps += [ ":jni_headers" ]
102   }
105 static_library("test_support") {
106   testonly = true
107   sources = [
108     "fake_invalidation_handler.cc",
109     "fake_invalidation_handler.h",
110     "fake_invalidation_state_tracker.cc",
111     "fake_invalidation_state_tracker.h",
112     "fake_invalidator.cc",
113     "fake_invalidator.h",
114     "invalidation_service_test_template.cc",
115     "invalidation_service_test_template.h",
116     "invalidation_test_util.cc",
117     "invalidation_test_util.h",
118     "invalidator_test_template.cc",
119     "invalidator_test_template.h",
120     "object_id_invalidation_map_test_util.cc",
121     "object_id_invalidation_map_test_util.h",
122     "unacked_invalidation_set_test_util.cc",
123     "unacked_invalidation_set_test_util.h",
124   ]
126   deps = [
127     "//base",
128     "//components/gcm_driver:test_support",
129     "//components/keyed_service/core",
130     "//google_apis",
131     "//jingle:notifier",
132     "//jingle:notifier_test_util",
133     "//net",
134     "//testing/gmock",
135     "//third_party/cacheinvalidation",
137     # TODO(sync): Remove this (http://crbug.com/133352);
138     "//third_party/protobuf:protobuf_lite",
140     # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
141   ]
143   if (is_android) {
144     deps += [ ":jni_headers" ]
145   } else {
146     sources += [
147       "p2p_invalidation_service.cc",
148       "p2p_invalidation_service.h",
149     ]
150   }
153 if (is_android) {
154   android_library("java") {
155     deps = [
156       ":proto_java",
157       "//base:base_java",
158       "//sync/android:sync_java",
159       "//third_party/android_protobuf:protobuf_nano_javalib",
160       "//third_party/cacheinvalidation:cacheinvalidation_javalib",
161       "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
162       "//third_party/jsr-305:jsr_305_javalib",
163     ]
164     DEPRECATED_java_in_dir = "android/java/src"
165   }
166   proto_java_library("proto_java") {
167     proto_path = "android/proto"
168     sources = [
169       "$proto_path/serialized_invalidation.proto",
170     ]
171   }
172   android_library("javatests") {
173     deps = [
174       ":java",
175       "//base:base_java",
176       "//base:base_java_test_support",
177       "//sync/android:sync_java",
178       "//third_party/cacheinvalidation:cacheinvalidation_javalib",
179       "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
180     ]
181     DEPRECATED_java_in_dir = "android/javatests/src"
182   }
183   junit_binary("junit_tests") {
184     java_files = [ "android/junit/src/org/chromium/components/invalidation/PendingInvalidationTest.java" ]
185     deps = [
186       ":java",
187       "//base:base_java",
188       "//base:base_java_test_support",
189     ]
190   }
191   generate_jni("jni_headers") {
192     sources = [
193       "android/java/src/org/chromium/components/invalidation/InvalidationService.java",
194     ]
195     jni_package = "components/invalidation"
196   }