diff options
Diffstat (limited to 'chromium/components/sync')
-rw-r--r-- | chromium/components/sync/BUILD.gn | 134 | ||||
-rw-r--r-- | chromium/components/sync/android/BUILD.gn | 33 | ||||
-rw-r--r-- | chromium/components/sync/base/BUILD.gn | 21 | ||||
-rw-r--r-- | chromium/components/sync/driver/BUILD.gn | 17 | ||||
-rw-r--r-- | chromium/components/sync/invalidations/BUILD.gn | 37 | ||||
-rw-r--r-- | chromium/components/sync/js/BUILD.gn | 3 | ||||
-rw-r--r-- | chromium/components/sync/protocol/BUILD.gn | 3 | ||||
-rw-r--r-- | chromium/components/sync/protocol/protocol_sources.gni | 1 | ||||
-rw-r--r-- | chromium/components/sync/trusted_vault/BUILD.gn | 31 |
9 files changed, 102 insertions, 178 deletions
diff --git a/chromium/components/sync/BUILD.gn b/chromium/components/sync/BUILD.gn index 8ee5e2d2c0c..abbe13bdd15 100644 --- a/chromium/components/sync/BUILD.gn +++ b/chromium/components/sync/BUILD.gn @@ -3,18 +3,19 @@ # found in the LICENSE file. import("//build/config/features.gni") -import("//build/config/jumbo.gni") import("//testing/test.gni") group("sync") { public_deps = [ ":rest_of_sync", "//components/sync/driver", + "//components/sync/trusted_vault", ] } group("test_support") { testonly = true + public_deps = [ ":sync", ":test_support_engine", @@ -25,9 +26,9 @@ group("test_support") { ] } -# TODO(crbug.com/947443): This target should be split up into "engine", "model", -# "syncable" etc, but currently they all depend on each other. -jumbo_static_library("rest_of_sync") { +# TODO(crbug.com/947443): This target should be split up into "engine", "model" +# etc, but currently they all depend on each other. +static_library("rest_of_sync") { sources = [ "engine/commit_queue.cc", "engine/commit_queue.h", @@ -156,8 +157,6 @@ jumbo_static_library("rest_of_sync") { "engine_impl/get_updates_delegate.h", "engine_impl/get_updates_processor.cc", "engine_impl/get_updates_processor.h", - "engine_impl/js_mutation_event_observer.cc", - "engine_impl/js_mutation_event_observer.h", "engine_impl/js_sync_encryption_handler_observer.cc", "engine_impl/js_sync_encryption_handler_observer.h", "engine_impl/js_sync_manager_observer.cc", @@ -305,82 +304,6 @@ jumbo_static_library("rest_of_sync") { "nigori/nigori_sync_bridge_impl.h", "nigori/pending_local_nigori_commit.cc", "nigori/pending_local_nigori_commit.h", - "syncable/base_node.cc", - "syncable/base_node.h", - "syncable/base_transaction.cc", - "syncable/base_transaction.h", - "syncable/change_processor.h", - "syncable/change_record.cc", - "syncable/change_record.h", - "syncable/change_reorder_buffer.cc", - "syncable/change_reorder_buffer.h", - "syncable/dir_open_result.h", - "syncable/directory.cc", - "syncable/directory.h", - "syncable/directory_backing_store.cc", - "syncable/directory_backing_store.h", - "syncable/directory_change_delegate.h", - "syncable/entry.cc", - "syncable/entry.h", - "syncable/entry_kernel.cc", - "syncable/entry_kernel.h", - "syncable/in_memory_directory_backing_store.cc", - "syncable/in_memory_directory_backing_store.h", - "syncable/invalid_directory_backing_store.cc", - "syncable/invalid_directory_backing_store.h", - "syncable/metahandle_set.h", - "syncable/model_neutral_mutable_entry.cc", - "syncable/model_neutral_mutable_entry.h", - "syncable/mutable_entry.cc", - "syncable/mutable_entry.h", - "syncable/nigori_handler.cc", - "syncable/nigori_handler.h", - "syncable/nigori_handler_proxy.cc", - "syncable/nigori_handler_proxy.h", - "syncable/nigori_util.cc", - "syncable/nigori_util.h", - "syncable/on_disk_directory_backing_store.cc", - "syncable/on_disk_directory_backing_store.h", - "syncable/parent_child_index.cc", - "syncable/parent_child_index.h", - "syncable/proto_value_ptr.h", - "syncable/read_node.cc", - "syncable/read_node.h", - "syncable/read_transaction.cc", - "syncable/read_transaction.h", - "syncable/scoped_kernel_lock.cc", - "syncable/scoped_kernel_lock.h", - "syncable/scoped_parent_child_index_updater.cc", - "syncable/scoped_parent_child_index_updater.h", - "syncable/syncable_base_transaction.cc", - "syncable/syncable_base_transaction.h", - "syncable/syncable_base_write_transaction.cc", - "syncable/syncable_base_write_transaction.h", - "syncable/syncable_changes_version.h", - "syncable/syncable_columns.h", - "syncable/syncable_enum_conversions.cc", - "syncable/syncable_enum_conversions.h", - "syncable/syncable_id.cc", - "syncable/syncable_id.h", - "syncable/syncable_model_neutral_write_transaction.cc", - "syncable/syncable_model_neutral_write_transaction.h", - "syncable/syncable_proto_util.cc", - "syncable/syncable_proto_util.h", - "syncable/syncable_read_transaction.cc", - "syncable/syncable_read_transaction.h", - "syncable/syncable_util.cc", - "syncable/syncable_util.h", - "syncable/syncable_write_transaction.cc", - "syncable/syncable_write_transaction.h", - "syncable/transaction_observer.h", - "syncable/user_share.cc", - "syncable/user_share.h", - "syncable/write_node.cc", - "syncable/write_node.h", - "syncable/write_transaction.cc", - "syncable/write_transaction.h", - "syncable/write_transaction_info.cc", - "syncable/write_transaction_info.h", ] configs += [ "//build/config:precompiled_headers" ] @@ -402,17 +325,11 @@ jumbo_static_library("rest_of_sync") { "//components/variations/net", "//services/network/public/cpp", "//sql", - "//third_party/cacheinvalidation", "//third_party/crc32c", "//third_party/zlib/google:compression_utils", "//ui/base", ] - if (is_android) { - deps += [ "//components/sync/android:jni_headers" ] - sources += [ "android/model_type_helper.cc" ] - } - configs += [ "//build/config/compiler:wexit_time_destructors" ] } @@ -437,10 +354,6 @@ static_library("test_support_engine") { "engine_impl/cycle/mock_debug_info_getter.h", "engine_impl/cycle/test_util.cc", "engine_impl/cycle/test_util.h", - "engine_impl/test_entry_factory.cc", - "engine_impl/test_entry_factory.h", - "syncable/test_user_share.cc", - "syncable/test_user_share.h", "test/engine/fake_model_worker.cc", "test/engine/fake_model_worker.h", "test/engine/fake_sync_scheduler.cc", @@ -457,21 +370,8 @@ static_library("test_support_engine") { "test/engine/mock_update_handler.h", "test/engine/single_type_mock_server.cc", "test/engine/single_type_mock_server.h", - "test/engine/test_directory_setter_upper.cc", - "test/engine/test_directory_setter_upper.h", - "test/engine/test_id_factory.h", - "test/engine/test_syncable_utils.cc", - "test/engine/test_syncable_utils.h", "test/fake_sync_encryption_handler.cc", "test/fake_sync_encryption_handler.h", - "test/null_directory_change_delegate.cc", - "test/null_directory_change_delegate.h", - "test/null_transaction_observer.cc", - "test/null_transaction_observer.h", - "test/test_directory_backing_store.cc", - "test/test_directory_backing_store.h", - "test/test_transaction_observer.cc", - "test/test_transaction_observer.h", ] public_deps = [ "//components/sync/base:test_support" ] @@ -544,6 +444,7 @@ source_set("unit_tests") { "base/ordinal_unittest.cc", "base/protobuf_unittest.cc", "base/sync_prefs_unittest.cc", + "base/sync_util_unittest.cc", "base/system_encryptor_unittest.cc", "base/unique_position_unittest.cc", "base/user_demographics_unittest.cc", @@ -551,7 +452,6 @@ source_set("unit_tests") { "driver/about_sync_util_unittest.cc", "driver/backend_migrator_unittest.cc", "driver/data_type_manager_impl_unittest.cc", - "driver/file_based_trusted_vault_client_unittest.cc", "driver/glue/sync_engine_impl_unittest.cc", "driver/model_association_manager_unittest.cc", "driver/model_type_controller_unittest.cc", @@ -565,7 +465,6 @@ source_set("unit_tests") { "driver/sync_session_durations_metrics_recorder_unittest.cc", "driver/sync_stopped_reporter_unittest.cc", "driver/sync_user_settings_unittest.cc", - "driver/sync_util_unittest.cc", "engine/cycle/sync_cycle_snapshot_unittest.cc", "engine/model_safe_worker_unittest.cc", "engine/net/http_bridge_unittest.cc", @@ -579,7 +478,6 @@ source_set("unit_tests") { "engine_impl/debug_info_event_listener_unittest.cc", "engine_impl/events/protocol_event_buffer_unittest.cc", "engine_impl/get_updates_processor_unittest.cc", - "engine_impl/js_mutation_event_observer_unittest.cc", "engine_impl/js_sync_encryption_handler_observer_unittest.cc", "engine_impl/js_sync_manager_observer_unittest.cc", "engine_impl/loopback_server/loopback_server_unittest.cc", @@ -595,6 +493,7 @@ source_set("unit_tests") { "engine_impl/sync_scheduler_impl_unittest.cc", "engine_impl/syncer_proto_util_unittest.cc", "engine_impl/syncer_unittest.cc", + "invalidations/fcm_handler_unittest.cc", "js/js_event_details_unittest.cc", "js/sync_js_controller_unittest.cc", "model/entity_data_unittest.cc", @@ -621,17 +520,9 @@ source_set("unit_tests") { "nigori/nigori_unittest.cc", "protocol/proto_enum_conversions_unittest.cc", "protocol/proto_value_conversions_unittest.cc", - "syncable/change_record_unittest.cc", - "syncable/directory_backing_store_unittest.cc", - "syncable/directory_unittest.cc", - "syncable/directory_unittest.h", - "syncable/entry_kernel_unittest.cc", - "syncable/nigori_util_unittest.cc", - "syncable/parent_child_index_unittest.cc", - "syncable/proto_value_ptr_unittest.cc", - "syncable/syncable_enum_conversions_unittest.cc", - "syncable/syncable_id_unittest.cc", - "syncable/syncable_unittest.cc", + "trusted_vault/securebox_unittest.cc", + "trusted_vault/standalone_trusted_vault_backend_unittest.cc", + "trusted_vault/standalone_trusted_vault_client_unittest.cc", ] configs += [ "//build/config:precompiled_headers" ] @@ -648,6 +539,7 @@ source_set("unit_tests") { ":test_support_nigori", "//base", "//base/test:test_support", + "//components/gcm_driver:test_support", "//components/invalidation/impl", "//components/metrics", "//components/os_crypt", @@ -657,14 +549,15 @@ source_set("unit_tests") { "//components/signin/public/identity_manager:test_support", "//components/sync/base:test_support", "//components/sync/driver:test_support", + "//components/sync/invalidations:test_support", "//components/sync/js:test_support", "//components/sync_preferences", "//components/sync_preferences:test_support", "//components/version_info", "//components/version_info:generate_version_info", "//components/version_info:version_string", - "//google_apis", "//google_apis:test_support", + "//google_apis/gcm:gcm", "//net", "//net:test_support", "//services/network:test_support", @@ -705,6 +598,7 @@ if (is_android) { deps = [ "android:sync_java", "//base:base_java", + "//third_party/android_deps:androidx_annotation_annotation_java", "//third_party/junit", ] sources = [ "test/android/javatests/src/org/chromium/components/sync/test/util/MockSyncContentResolverDelegate.java" ] diff --git a/chromium/components/sync/android/BUILD.gn b/chromium/components/sync/android/BUILD.gn index a3eca7269de..4b9e780d9d0 100644 --- a/chromium/components/sync/android/BUILD.gn +++ b/chromium/components/sync/android/BUILD.gn @@ -14,43 +14,14 @@ android_library("sync_java") { "//third_party/android_deps:androidx_annotation_annotation_java", "//third_party/android_deps:com_google_code_findbugs_jsr305_java", "//third_party/android_sdk:android_gcm_java", - "//third_party/cacheinvalidation:cacheinvalidation_javalib", - "//third_party/cacheinvalidation:cacheinvalidation_proto_java", ] annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] srcjar_deps = [ ":java_enums" ] sources = [ - "java/src/org/chromium/components/sync/ModelTypeHelper.java", "java/src/org/chromium/components/sync/Passphrase.java", "java/src/org/chromium/components/sync/SyncConstants.java", "java/src/org/chromium/components/sync/SyncContentResolverDelegate.java", "java/src/org/chromium/components/sync/SystemSyncContentResolverDelegate.java", - "java/src/org/chromium/components/sync/notifier/InvalidationClientNameGenerator.java", - "java/src/org/chromium/components/sync/notifier/InvalidationClientNameProvider.java", - "java/src/org/chromium/components/sync/notifier/InvalidationIntentProtocol.java", - "java/src/org/chromium/components/sync/notifier/InvalidationPreferences.java", - "java/src/org/chromium/components/sync/notifier/RandomizedInvalidationClientNameGenerator.java", - ] -} - -android_library("sync_javatests") { - testonly = true - deps = [ - ":sync_java", - "//base:base_java", - "//base:base_java_test_support", - "//components/signin/core/browser/android:java", - "//components/signin/core/browser/android:signin_java_test_support", - "//components/sync:sync_java_test_support", - "//third_party/android_deps:com_google_code_findbugs_jsr305_java", - "//third_party/android_support_test_runner:runner_java", - "//third_party/cacheinvalidation:cacheinvalidation_javalib", - "//third_party/cacheinvalidation:cacheinvalidation_proto_java", - "//third_party/junit", - ] - sources = [ - "javatests/src/org/chromium/components/sync/notifier/InvalidationClientNameProviderTest.java", - "javatests/src/org/chromium/components/sync/notifier/InvalidationPreferencesTest.java", ] } @@ -62,7 +33,3 @@ java_cpp_enum("java_enums") { "//components/sync/driver/sync_service_utils.h", ] } - -generate_jni("jni_headers") { - sources = [ "java/src/org/chromium/components/sync/ModelTypeHelper.java" ] -} diff --git a/chromium/components/sync/base/BUILD.gn b/chromium/components/sync/base/BUILD.gn index d3544906238..07a8d1c294d 100644 --- a/chromium/components/sync/base/BUILD.gn +++ b/chromium/components/sync/base/BUILD.gn @@ -3,9 +3,13 @@ # found in the LICENSE file. import("//build/config/features.gni") -import("//build/config/jumbo.gni") -jumbo_static_library("base") { +declare_args() { + # Controls the product part of the user agent calculated in sync_util.cc. + sync_user_agent_product = "Chrome" +} + +static_library("base") { sources = [ "bind_to_task_runner.h", "cancelation_observer.cc", @@ -29,6 +33,8 @@ jumbo_static_library("base") { "invalidation_helper.h", "invalidation_interface.cc", "invalidation_interface.h", + "legacy_directory_deletion.cc", + "legacy_directory_deletion.h", "logging.cc", "logging.h", "model_type.cc", @@ -51,6 +57,8 @@ jumbo_static_library("base") { "sync_prefs.cc", "sync_prefs.h", "sync_stop_metadata_fate.h", + "sync_util.cc", + "sync_util.h", "syncer_error.cc", "syncer_error.h", "system_encryptor.cc", @@ -59,7 +67,6 @@ jumbo_static_library("base") { "time.h", "unique_position.cc", "unique_position.h", - "unrecoverable_error_handler.h", "unrecoverable_error_info.cc", "unrecoverable_error_info.h", "user_demographics.cc", @@ -84,14 +91,18 @@ jumbo_static_library("base") { "//components/pref_registry", "//components/prefs", "//components/version_info", + "//components/version_info:generate_version_info", "//crypto", "//net", "//third_party/zlib", + "//ui/base", ] if (is_chromeos) { deps += [ "//chromeos/constants" ] } + + defines = [ "SYNC_USER_AGENT_PRODUCT=$sync_user_agent_product" ] } static_library("test_support") { @@ -107,12 +118,8 @@ static_library("test_support") { "../test/trackable_mock_invalidation.h", "fake_encryptor.cc", "fake_encryptor.h", - "mock_unrecoverable_error_handler.cc", - "mock_unrecoverable_error_handler.h", "model_type_test_util.cc", "model_type_test_util.h", - "test_unrecoverable_error_handler.cc", - "test_unrecoverable_error_handler.h", ] public_deps = [ diff --git a/chromium/components/sync/driver/BUILD.gn b/chromium/components/sync/driver/BUILD.gn index ab9eca7b822..8baa714b034 100644 --- a/chromium/components/sync/driver/BUILD.gn +++ b/chromium/components/sync/driver/BUILD.gn @@ -3,15 +3,9 @@ # found in the LICENSE file. import("//build/config/features.gni") -import("//build/config/jumbo.gni") import("//tools/grit/grit_rule.gni") -declare_args() { - # Controls the product part of the user agent calculated in sync_util.cc. - sync_user_agent_product = "Chrome" -} - -jumbo_static_library("driver") { +static_library("driver") { sources = [ "about_sync_util.cc", "about_sync_util.h", @@ -29,8 +23,6 @@ jumbo_static_library("driver") { "data_type_manager_observer.h", "data_type_status_table.cc", "data_type_status_table.h", - "file_based_trusted_vault_client.cc", - "file_based_trusted_vault_client.h", "glue/sync_engine_backend.cc", "glue/sync_engine_backend.h", "glue/sync_engine_impl.cc", @@ -74,8 +66,6 @@ jumbo_static_library("driver") { "sync_user_settings.h", "sync_user_settings_impl.cc", "sync_user_settings_impl.h", - "sync_util.cc", - "sync_util.h", "syncable_service_based_model_type_controller.cc", "syncable_service_based_model_type_controller.h", "trusted_vault_client.h", @@ -104,10 +94,10 @@ jumbo_static_library("driver") { "//components/os_crypt", "//components/prefs", "//components/signin/public/identity_manager", + "//components/sync/invalidations", "//components/version_info", "//components/version_info:generate_version_info", "//services/network/public/cpp", - "//ui/base", ] if (!is_ios) { @@ -125,8 +115,6 @@ jumbo_static_library("driver") { deps += [ "//chromeos/constants" ] } - defines = [ "SYNC_USER_AGENT_PRODUCT=$sync_user_agent_product" ] - configs += [ "//build/config/compiler:wexit_time_destructors" ] } @@ -180,6 +168,7 @@ static_library("test_support") { "//components/sync:test_support_engine", "//components/sync:test_support_model", "//components/sync/driver", + "//components/sync/invalidations:test_support", "//components/sync_preferences:test_support", "//components/version_info", "//components/version_info:generate_version_info", diff --git a/chromium/components/sync/invalidations/BUILD.gn b/chromium/components/sync/invalidations/BUILD.gn new file mode 100644 index 00000000000..1e184350546 --- /dev/null +++ b/chromium/components/sync/invalidations/BUILD.gn @@ -0,0 +1,37 @@ +# Copyright 2020 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("//build/config/features.gni") + +static_library("invalidations") { + sources = [ + "fcm_handler.cc", + "fcm_handler.h", + "fcm_registration_token_observer.h", + "invalidations_listener.h", + "switches.cc", + "switches.h", + "sync_invalidations_service.h", + "sync_invalidations_service_impl.cc", + "sync_invalidations_service_impl.h", + ] + + public_deps = [ + "//base", + "//components/gcm_driver", + "//components/keyed_service/core", + ] +} + +static_library("test_support") { + testonly = true + sources = [ + "mock_sync_invalidations_service.cc", + "mock_sync_invalidations_service.h", + ] + + public_deps = [ "//components/sync/invalidations" ] + + deps = [ "//testing/gmock" ] +} diff --git a/chromium/components/sync/js/BUILD.gn b/chromium/components/sync/js/BUILD.gn index 53422e2b3bc..71ff7e8f2ec 100644 --- a/chromium/components/sync/js/BUILD.gn +++ b/chromium/components/sync/js/BUILD.gn @@ -3,9 +3,8 @@ # found in the LICENSE file. import("//build/config/features.gni") -import("//build/config/jumbo.gni") -jumbo_static_library("js") { +static_library("js") { sources = [ "js_backend.h", "js_controller.h", diff --git a/chromium/components/sync/protocol/BUILD.gn b/chromium/components/sync/protocol/BUILD.gn index c37eab082c0..e0f4727f2e4 100644 --- a/chromium/components/sync/protocol/BUILD.gn +++ b/chromium/components/sync/protocol/BUILD.gn @@ -2,7 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/config/jumbo.gni") import("//third_party/protobuf/proto_library.gni") import("protocol_sources.gni") @@ -12,7 +11,7 @@ proto_library("protocol") { extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] } -jumbo_static_library("util") { +static_library("util") { sources = [ "proto_enum_conversions.cc", "proto_enum_conversions.h", diff --git a/chromium/components/sync/protocol/protocol_sources.gni b/chromium/components/sync/protocol/protocol_sources.gni index b3c9ee93be0..1db5c64365e 100644 --- a/chromium/components/sync/protocol/protocol_sources.gni +++ b/chromium/components/sync/protocol/protocol_sources.gni @@ -8,6 +8,7 @@ sync_protocol_bases = [ "app_specifics", "app_list_specifics", "arc_package_specifics", + "autofill_offer_specifics", "autofill_specifics", "bookmark_model_metadata", "bookmark_specifics", diff --git a/chromium/components/sync/trusted_vault/BUILD.gn b/chromium/components/sync/trusted_vault/BUILD.gn new file mode 100644 index 00000000000..d48f2425e04 --- /dev/null +++ b/chromium/components/sync/trusted_vault/BUILD.gn @@ -0,0 +1,31 @@ +# Copyright 2020 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. + +static_library("trusted_vault") { + sources = [ + "securebox.cc", + "securebox.h", + "standalone_trusted_vault_backend.cc", + "standalone_trusted_vault_backend.h", + "standalone_trusted_vault_client.cc", + "standalone_trusted_vault_client.h", + "trusted_vault_access_token_fetcher.h", + "trusted_vault_connection.h", + "trusted_vault_connection_impl.cc", + "trusted_vault_connection_impl.h", + ] + public_deps = [ + "//base", + "//components/sync/driver", + ] + deps = [ + "//components/os_crypt", + "//components/signin/public/identity_manager", + "//components/sync/base", + "//components/sync/protocol", + "//crypto", + "//services/network/public/cpp:cpp", + "//third_party/boringssl", + ] +} |