1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
# 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("//testing/test.gni")
config("cacheinvalidation_config") {
include_dirs = [
"overrides",
"src",
]
}
static_library("cacheinvalidation") {
sources = [
"overrides/google/cacheinvalidation/deps/callback.h",
"overrides/google/cacheinvalidation/deps/gmock.h",
"overrides/google/cacheinvalidation/deps/googletest.h",
"overrides/google/cacheinvalidation/deps/logging.h",
"overrides/google/cacheinvalidation/deps/mutex.h",
"overrides/google/cacheinvalidation/deps/random.cc",
"overrides/google/cacheinvalidation/deps/random.h",
"overrides/google/cacheinvalidation/deps/scoped_ptr.h",
"overrides/google/cacheinvalidation/deps/sha1-digest-function.h",
"overrides/google/cacheinvalidation/deps/stl-namespace.h",
"overrides/google/cacheinvalidation/deps/string_util.h",
"overrides/google/cacheinvalidation/deps/time.h",
"src/google/cacheinvalidation/deps/digest-function.h",
"src/google/cacheinvalidation/impl/basic-system-resources.cc",
"src/google/cacheinvalidation/impl/basic-system-resources.h",
"src/google/cacheinvalidation/impl/checking-invalidation-listener.cc",
"src/google/cacheinvalidation/impl/checking-invalidation-listener.h",
"src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h",
"src/google/cacheinvalidation/impl/constants.cc",
"src/google/cacheinvalidation/impl/constants.h",
"src/google/cacheinvalidation/impl/digest-store.h",
"src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.cc",
"src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.h",
"src/google/cacheinvalidation/impl/invalidation-client-core.cc",
"src/google/cacheinvalidation/impl/invalidation-client-core.h",
"src/google/cacheinvalidation/impl/invalidation-client-factory.cc",
"src/google/cacheinvalidation/impl/invalidation-client-impl.cc",
"src/google/cacheinvalidation/impl/invalidation-client-impl.h",
"src/google/cacheinvalidation/impl/invalidation-client-util.h",
"src/google/cacheinvalidation/impl/log-macro.h",
"src/google/cacheinvalidation/impl/object-id-digest-utils.cc",
"src/google/cacheinvalidation/impl/object-id-digest-utils.h",
"src/google/cacheinvalidation/impl/persistence-utils.cc",
"src/google/cacheinvalidation/impl/persistence-utils.h",
"src/google/cacheinvalidation/impl/proto-converter.cc",
"src/google/cacheinvalidation/impl/proto-converter.h",
"src/google/cacheinvalidation/impl/proto-helpers.cc",
"src/google/cacheinvalidation/impl/proto-helpers.h",
"src/google/cacheinvalidation/impl/protocol-handler.cc",
"src/google/cacheinvalidation/impl/protocol-handler.h",
"src/google/cacheinvalidation/impl/recurring-task.cc",
"src/google/cacheinvalidation/impl/recurring-task.h",
"src/google/cacheinvalidation/impl/registration-manager.cc",
"src/google/cacheinvalidation/impl/registration-manager.h",
"src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h",
"src/google/cacheinvalidation/impl/run-state.h",
"src/google/cacheinvalidation/impl/safe-storage.cc",
"src/google/cacheinvalidation/impl/safe-storage.h",
"src/google/cacheinvalidation/impl/simple-registration-store.cc",
"src/google/cacheinvalidation/impl/simple-registration-store.h",
"src/google/cacheinvalidation/impl/smearer.h",
"src/google/cacheinvalidation/impl/statistics.cc",
"src/google/cacheinvalidation/impl/statistics.h",
"src/google/cacheinvalidation/impl/throttle.cc",
"src/google/cacheinvalidation/impl/throttle.h",
"src/google/cacheinvalidation/impl/ticl-message-validator.cc",
"src/google/cacheinvalidation/impl/ticl-message-validator.h",
"src/google/cacheinvalidation/include/invalidation-client-factory.h",
"src/google/cacheinvalidation/include/invalidation-client.h",
"src/google/cacheinvalidation/include/invalidation-listener.h",
"src/google/cacheinvalidation/include/system-resources.h",
"src/google/cacheinvalidation/include/types.h",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
public_configs = [ ":cacheinvalidation_config" ]
public_deps = [
"src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
]
deps = [
"//base",
]
}
# TODO(GYP): Delete this after we've converted everything to GN.
# The _run targets exist only for compatibility w/ GYP.
group("cacheinvalidation_unittests_run") {
testonly = true
deps = [
":cacheinvalidation_unittests",
]
}
test("cacheinvalidation_unittests") {
sources = [
"src/google/cacheinvalidation/impl/invalidation-client-impl_test.cc",
"src/google/cacheinvalidation/impl/protocol-handler_test.cc",
"src/google/cacheinvalidation/impl/recurring-task_test.cc",
"src/google/cacheinvalidation/impl/throttle_test.cc",
"src/google/cacheinvalidation/test/deterministic-scheduler.cc",
"src/google/cacheinvalidation/test/deterministic-scheduler.h",
"src/google/cacheinvalidation/test/test-logger.cc",
"src/google/cacheinvalidation/test/test-logger.h",
"src/google/cacheinvalidation/test/test-utils.cc",
"src/google/cacheinvalidation/test/test-utils.h",
]
deps = [
":cacheinvalidation",
"src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
"//base",
"//base/test:run_all_unittests",
"//testing/gmock",
"//testing/gtest",
]
}
# TODO(GYP) Test isolation stuff.
if (is_android) {
import("//build/config/android/rules.gni")
# GYP: //third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_java
proto_java_library("cacheinvalidation_proto_java") {
proto_path = "src/proto"
sources = [
"$proto_path/android_channel.proto",
"$proto_path/android_listener.proto",
"$proto_path/android_service.proto",
"$proto_path/channel_common.proto",
"$proto_path/client.proto",
"$proto_path/client_protocol.proto",
"$proto_path/java_client.proto",
"$proto_path/types.proto",
]
}
# GYP: //third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib
android_library("cacheinvalidation_javalib") {
deps = [
":cacheinvalidation_proto_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
"//third_party/android_tools:android_gcm_java",
]
DEPRECATED_java_in_dir = "src/java"
}
}
|