# 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. if (is_android) { import("//build/config/android/rules.gni") } static_library("invalidation") { sources = [ "ack_handle.cc", "ack_handle.h", "ack_handler.cc", "ack_handler.h", "invalidation.cc", "invalidation.h", "invalidation_handler.cc", "invalidation_handler.h", "invalidation_logger.cc", "invalidation_logger.h", "invalidation_logger_observer.h", "invalidation_prefs.cc", "invalidation_prefs.h", "invalidation_service.h", "invalidation_service_util.cc", "invalidation_service_util.h", "invalidation_state_tracker.cc", "invalidation_state_tracker.h", "invalidation_switches.cc", "invalidation_switches.h", "invalidation_util.cc", "invalidation_util.h", "invalidator.cc", "invalidator.h", "invalidator_registrar.cc", "invalidator_registrar.h", "invalidator_state.cc", "invalidator_state.h", "invalidator_storage.cc", "invalidator_storage.h", "mock_ack_handler.cc", "mock_ack_handler.h", "object_id_invalidation_map.cc", "object_id_invalidation_map.h", "profile_invalidation_provider.cc", "profile_invalidation_provider.h", "single_object_invalidation_set.cc", "single_object_invalidation_set.h", "unacked_invalidation_set.cc", "unacked_invalidation_set.h", ] if (!is_android) { sources += [ "gcm_invalidation_bridge.cc", "gcm_invalidation_bridge.h", "gcm_network_channel.cc", "gcm_network_channel.h", "gcm_network_channel_delegate.h", "invalidation_notifier.cc", "invalidation_notifier.h", "non_blocking_invalidator.cc", "non_blocking_invalidator.h", "notifier_reason_util.cc", "notifier_reason_util.h", "p2p_invalidator.cc", "p2p_invalidator.h", "push_client_channel.cc", "push_client_channel.h", "registration_manager.cc", "registration_manager.h", "state_writer.h", "sync_invalidation_listener.cc", "sync_invalidation_listener.h", "sync_system_resources.cc", "sync_system_resources.h", "ticl_invalidation_service.cc", "ticl_invalidation_service.h", "ticl_settings_provider.cc", "ticl_settings_provider.h", ] } public_deps = [ "//third_party/cacheinvalidation", ] deps = [ "//base", "//components/gcm_driver", "//components/keyed_service/core", "//components/pref_registry", "//components/signin/core/browser", "//google_apis", "//jingle:notifier", # TODO(sync): Remove this (http://crbug.com/133352); "//third_party/protobuf:protobuf_lite", # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp", ] if (is_android) { sources += [ "android/component_jni_registrar.cc", "android/component_jni_registrar.h", "invalidation_service_android.cc", "invalidation_service_android.h", ] deps += [ ":jni_headers" ] } } static_library("unittests") { testonly = true sources = [] deps = [ ":invalidation", ":test_support", ] if (is_android) { deps += [ ":javatests", ":jni_headers", ] } } static_library("test_support") { testonly = true sources = [ "fake_invalidation_handler.cc", "fake_invalidation_handler.h", "fake_invalidation_state_tracker.cc", "fake_invalidation_state_tracker.h", "fake_invalidator.cc", "fake_invalidator.h", "invalidation_service_test_template.cc", "invalidation_service_test_template.h", "invalidation_test_util.cc", "invalidation_test_util.h", "invalidator_test_template.cc", "invalidator_test_template.h", "object_id_invalidation_map_test_util.cc", "object_id_invalidation_map_test_util.h", "unacked_invalidation_set_test_util.cc", "unacked_invalidation_set_test_util.h", ] deps = [ "//base", "//components/gcm_driver:test_support", "//components/keyed_service/core", "//google_apis", "//jingle:notifier", "//jingle:notifier_test_util", "//net", "//testing/gmock", "//third_party/cacheinvalidation", # TODO(sync): Remove this (http://crbug.com/133352); "//third_party/protobuf:protobuf_lite", # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp", ] if (is_android) { deps += [ ":jni_headers", ] } else { sources += [ "p2p_invalidation_service.cc", "p2p_invalidation_service.h", ] } } if (is_android) { android_library("java") { deps = [ "//base:base_java", "//sync/android:sync_java", "//third_party/cacheinvalidation:cacheinvalidation_javalib", "//third_party/cacheinvalidation:cacheinvalidation_proto_java", "//third_party/jsr-305:jsr_305_javalib", ] DEPRECATED_java_in_dir = "android/java/src" } android_library("javatests") { deps = [ ":java", "//base:base_java", "//base:base_java_test_support", "//sync/android:sync_java", "//third_party/cacheinvalidation:cacheinvalidation_javalib", "//third_party/cacheinvalidation:cacheinvalidation_proto_java", ] DEPRECATED_java_in_dir = "android/javatests/src" } generate_jni("jni_headers") { sources = [ "android/java/src/org/chromium/components/invalidation/InvalidationService.java", ] jni_package = "components/invalidation" } }