# 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", ] } 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", ] } if (is_android) { import("//build/config/android/rules.gni") 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", ] } android_library("cacheinvalidation_javalib") { chromium_code = false emma_never_instrument = true deps = [ ":cacheinvalidation_proto_java", "$google_play_services_package:google_play_services_gcm_java", "$google_play_services_package:google_play_services_iid_java", "$google_play_services_package:google_play_services_tasks_java", "//third_party/android_protobuf:protobuf_nano_javalib", "//third_party/android_tools:android_gcm_java", ] java_files = [ "src/java/com/google/ipc/invalidation/common/BaseCommonInvalidationConstants.java", "src/java/com/google/ipc/invalidation/common/BuildConstants.java", "src/java/com/google/ipc/invalidation/common/DigestFunction.java", "src/java/com/google/ipc/invalidation/common/GcmSharedConstants.java", "src/java/com/google/ipc/invalidation/common/ObjectIdDigestUtils.java", "src/java/com/google/ipc/invalidation/external/client/InvalidationClient.java", "src/java/com/google/ipc/invalidation/external/client/InvalidationClientConfig.java", "src/java/com/google/ipc/invalidation/external/client/InvalidationClientFactory.java", "src/java/com/google/ipc/invalidation/external/client/InvalidationListener.java", "src/java/com/google/ipc/invalidation/external/client/SystemResources.java", "src/java/com/google/ipc/invalidation/external/client/SystemResourcesBuilder.java", "src/java/com/google/ipc/invalidation/external/client/android/service/AndroidLogger.java", "src/java/com/google/ipc/invalidation/external/client/android2/AndroidClientFactory.java", "src/java/com/google/ipc/invalidation/external/client/contrib/AndroidListener.java", "src/java/com/google/ipc/invalidation/external/client/contrib/AndroidListenerIntents.java", "src/java/com/google/ipc/invalidation/external/client/contrib/AndroidListenerProtos.java", "src/java/com/google/ipc/invalidation/external/client/contrib/AndroidListenerState.java", "src/java/com/google/ipc/invalidation/external/client/contrib/MultiplexingGcmListener.java", "src/java/com/google/ipc/invalidation/external/client/types/AckHandle.java", "src/java/com/google/ipc/invalidation/external/client/types/ApplicationClientId.java", "src/java/com/google/ipc/invalidation/external/client/types/BytesFormatter.java", "src/java/com/google/ipc/invalidation/external/client/types/Callback.java", "src/java/com/google/ipc/invalidation/external/client/types/ErrorContext.java", "src/java/com/google/ipc/invalidation/external/client/types/ErrorInfo.java", "src/java/com/google/ipc/invalidation/external/client/types/Invalidation.java", "src/java/com/google/ipc/invalidation/external/client/types/ObjectId.java", "src/java/com/google/ipc/invalidation/external/client/types/SimplePair.java", "src/java/com/google/ipc/invalidation/external/client/types/Status.java", "src/java/com/google/ipc/invalidation/ticl/AckCache.java", "src/java/com/google/ipc/invalidation/ticl/BasicSystemResources.java", "src/java/com/google/ipc/invalidation/ticl/CheckingInvalidationListener.java", "src/java/com/google/ipc/invalidation/ticl/DigestStore.java", "src/java/com/google/ipc/invalidation/ticl/InvalidationClientCore.java", "src/java/com/google/ipc/invalidation/ticl/InvalidationClientImpl.java", "src/java/com/google/ipc/invalidation/ticl/MemoryStorageImpl.java", "src/java/com/google/ipc/invalidation/ticl/PersistenceUtils.java", "src/java/com/google/ipc/invalidation/ticl/ProtoWrapperConverter.java", "src/java/com/google/ipc/invalidation/ticl/ProtocolHandler.java", "src/java/com/google/ipc/invalidation/ticl/RecurringTask.java", "src/java/com/google/ipc/invalidation/ticl/RegistrationManager.java", "src/java/com/google/ipc/invalidation/ticl/RunState.java", "src/java/com/google/ipc/invalidation/ticl/SafeStorage.java", "src/java/com/google/ipc/invalidation/ticl/SimpleRegistrationStore.java", "src/java/com/google/ipc/invalidation/ticl/Statistics.java", "src/java/com/google/ipc/invalidation/ticl/TestableInvalidationClient.java", "src/java/com/google/ipc/invalidation/ticl/TestableNetworkChannel.java", "src/java/com/google/ipc/invalidation/ticl/TiclExponentialBackoffDelayGenerator.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidClock.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidInternalScheduler.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidInvalidationClientImpl.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidInvalidationClientStub.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidInvalidationListenerIntentMapper.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidInvalidationListenerStub.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidStorage.java", "src/java/com/google/ipc/invalidation/ticl/android2/AndroidTiclManifest.java", "src/java/com/google/ipc/invalidation/ticl/android2/ProtocolIntents.java", "src/java/com/google/ipc/invalidation/ticl/android2/ResourcesFactory.java", "src/java/com/google/ipc/invalidation/ticl/android2/TiclService.java", "src/java/com/google/ipc/invalidation/ticl/android2/TiclStateManager.java", "src/java/com/google/ipc/invalidation/ticl/android2/WakeLockManager.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidChannelConstants.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidChannelPreferences.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidGcmController.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidInstanceIDListenerService.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageReceiverService.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageSenderService.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidNetworkChannel.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/CommonUtils.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/GcmRegistrationTaskService.java", "src/java/com/google/ipc/invalidation/ticl/android2/channel/GcmUpstreamSenderService.java", "src/java/com/google/ipc/invalidation/ticl/proto/AndroidChannel.java", "src/java/com/google/ipc/invalidation/ticl/proto/AndroidListenerProtocol.java", "src/java/com/google/ipc/invalidation/ticl/proto/AndroidService.java", "src/java/com/google/ipc/invalidation/ticl/proto/ChannelCommon.java", "src/java/com/google/ipc/invalidation/ticl/proto/Client.java", "src/java/com/google/ipc/invalidation/ticl/proto/ClientConstants.java", "src/java/com/google/ipc/invalidation/ticl/proto/ClientProtocol.java", "src/java/com/google/ipc/invalidation/ticl/proto/CommonProtos.java", "src/java/com/google/ipc/invalidation/ticl/proto/JavaClient.java", "src/java/com/google/ipc/invalidation/util/BaseLogger.java", "src/java/com/google/ipc/invalidation/util/Box.java", "src/java/com/google/ipc/invalidation/util/Bytes.java", "src/java/com/google/ipc/invalidation/util/ExponentialBackoffDelayGenerator.java", "src/java/com/google/ipc/invalidation/util/Formatter.java", "src/java/com/google/ipc/invalidation/util/InternalBase.java", "src/java/com/google/ipc/invalidation/util/LazyString.java", "src/java/com/google/ipc/invalidation/util/Marshallable.java", "src/java/com/google/ipc/invalidation/util/NamedRunnable.java", "src/java/com/google/ipc/invalidation/util/Preconditions.java", "src/java/com/google/ipc/invalidation/util/ProtoWrapper.java", "src/java/com/google/ipc/invalidation/util/Smearer.java", "src/java/com/google/ipc/invalidation/util/TextBuilder.java", "src/java/com/google/ipc/invalidation/util/TypedUtil.java", "src/java/com/google/ipc/invalidation/util/UtilFormatter.java", ] } }