Skip to content

Commit

Permalink
Move sync/notifier to components/invalidation
Browse files Browse the repository at this point in the history
Moves all code remaining in sync/notifier to components/invalidation.
Updates gyp files, DEPS, and #includes accordingly.

In terms of program behavior, this should be one big no-op.  This CL
contains no non-trivial code changes.

In terms of the build system, this is a significant change.  Symbols
that were previously exported through sync_notifier and related targets
have moved into the components/invalidation related targets.  Some
SYNC_EXPORT macros have been replaced with INVALIDATION_EXPORT, which is
significant since INVALIDATION_EXPORT is currently a no-op but
SYNC_EXPORT has meaning under some build configurations.

Unlike most other files in sync/notifier, invalidation_util.{cc,h} was
moved to sync/internal_api/public/base.  This is so it could be
referenced from sync/internal_api/public/base/invalidation.cc.  This is
a slight regression, but it should be fixed in the next CL when we move
all invalidations-related code out of sync/internal_api.

TBR=rogerta,benwells
BUG=259559

Review URL: https://codereview.chromium.org/387733004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283840 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rlarocque@chromium.org committed Jul 17, 2014
1 parent cb363e7 commit 001bbfd
Show file tree
Hide file tree
Showing 109 changed files with 301 additions and 377 deletions.
1 change: 0 additions & 1 deletion chrome/browser/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ include_rules = [
"+sandbox/win/src", # The path doesn't say it, but this is the Windows sandbox.
"+skia/ext",
"+sync/api", # Sync API files.
"+sync/notifier", # Sync invalidation API files.
"+sync/protocol", # Sync protobuf files.
"+third_party/cros_system_api",
"+win8/util",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#include "chrome/browser/policy/cloud/cloud_policy_invalidator.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_content_client.h"
#include "components/invalidation/invalidation_handler.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/invalidation_state_tracker.h"
#include "components/invalidation/invalidator_storage.h"
#include "components/invalidation/profile_invalidation_provider.h"
#include "components/invalidation/ticl_invalidation_service.h"
Expand All @@ -33,8 +35,6 @@
#include "google_apis/gaia/identity_provider.h"
#include "net/url_request/url_request_context_getter.h"
#include "sync/internal_api/public/base/invalidator_state.h"
#include "sync/notifier/invalidation_handler.h"
#include "sync/notifier/invalidation_state_tracker.h"

class Profile;

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/drive/drive_notification_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "base/metrics/histogram.h"
#include "chrome/browser/drive/drive_notification_observer.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "google/cacheinvalidation/types.pb.h"
#include "sync/notifier/object_id_invalidation_map.h"

namespace drive {

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/drive/drive_notification_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "base/observer_list.h"
#include "base/timer/timer.h"
#include "chrome/browser/drive/drive_notification_observer.h"
#include "components/invalidation/invalidation_handler.h"
#include "components/keyed_service/core/keyed_service.h"
#include "sync/notifier/invalidation_handler.h"

class ProfileSyncService;

Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/extensions/api/push_messaging/DEPS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include_rules = [
"+components/invalidation",
"+google/cacheinvalidation/types.pb.h",
"+sync/internal_api/public/base/invalidation.h",
"+sync/notifier/sync_notifier_observer.h",
"+components/invalidation",
"+sync/internal_api/public/base/invalidation_util.h",
]
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include "base/strings/string_split.h"
#include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_delegate.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "extensions/common/extension.h"
#include "google/cacheinvalidation/types.pb.h"
#include "sync/notifier/object_id_invalidation_map.h"

namespace extensions {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "base/compiler_specific.h"
#include "base/threading/thread_checker.h"
#include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_mapper.h"
#include "sync/notifier/invalidation_handler.h"
#include "sync/notifier/invalidation_util.h"
#include "components/invalidation/invalidation_handler.h"
#include "sync/internal_api/public/base/invalidation_util.h"

namespace invalidation {
class InvalidationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_delegate.h"
#include "components/invalidation/invalidation_logger.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "google/cacheinvalidation/types.pb.h"
#include "sync/notifier/object_id_invalidation_map.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/invalidation/fake_invalidation_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "base/macros.h"
#include "components/invalidation/invalidation_service_util.h"
#include "sync/notifier/object_id_invalidation_map.h"
#include "components/invalidation/object_id_invalidation_map.h"

namespace invalidation {

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/invalidation/fake_invalidation_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/invalidator_registrar.h"
#include "components/invalidation/mock_ack_handler.h"
#include "google_apis/gaia/fake_identity_provider.h"
#include "sync/notifier/mock_ack_handler.h"

namespace syncer {
class Invalidation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "base/android/jni_android.h"
#include "base/android/jni_weak_ref.h"
#include "sync/notifier/invalidation_util.h"
#include "sync/internal_api/public/base/invalidation_util.h"

namespace invalidation {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/invalidation/invalidation_controller_android.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "content/public/browser/notification_service.h"
#include "sync/notifier/object_id_invalidation_map.h"

namespace invalidation {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "base/strings/string_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "sync/notifier/unacked_invalidation_set_test_util.h"
#include "components/invalidation/unacked_invalidation_set_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace invalidation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/pref_names.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/invalidation_state_tracker.h"
#include "components/invalidation/invalidator_storage.h"
#include "components/invalidation/profile_invalidation_provider.h"
#include "components/invalidation/ticl_invalidation_service.h"
Expand All @@ -27,7 +28,6 @@
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "components/signin/core/browser/signin_manager.h"
#include "net/url_request/url_request_context_getter.h"
#include "sync/notifier/invalidation_state_tracker.h"

#if defined(OS_ANDROID)
#include "chrome/browser/invalidation/invalidation_controller_android.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
#include "components/invalidation/fake_invalidation_state_tracker.h"
#include "components/invalidation/invalidation_state_tracker.h"
#include "components/invalidation/ticl_invalidation_service.h"
#include "components/invalidation/ticl_settings_provider.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "google_apis/gaia/fake_identity_provider.h"
#include "google_apis/gaia/fake_oauth2_token_service.h"
#include "google_apis/gaia/identity_provider.h"
#include "net/url_request/url_request_context_getter.h"
#include "sync/notifier/invalidation_state_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace invalidation {
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/policy/cloud/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ specific_include_rules = {

r"cloud_policy_invalidator_unittest\.cc": [
"+chrome/browser/invalidation/fake_invalidation_service.h",
"+sync/internal_api/public/base/invalidation_util.h",
],
}
2 changes: 1 addition & 1 deletion chrome/browser/policy/cloud/cloud_policy_invalidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
#include "base/time/time.h"
#include "base/values.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
#include "components/policy/core/common/cloud/enterprise_metrics.h"
#include "policy/policy_constants.h"
#include "sync/notifier/object_id_invalidation_map.h"

namespace policy {

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/policy/cloud/cloud_policy_invalidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "components/invalidation/invalidation_handler.h"
#include "components/policy/core/common/cloud/cloud_policy_core.h"
#include "components/policy/core/common/cloud/cloud_policy_store.h"
#include "google/cacheinvalidation/include/types.h"
#include "sync/internal_api/public/base/invalidation.h"
#include "sync/notifier/invalidation_handler.h"

namespace base {
class Clock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "components/policy/core/common/policy_types.h"
#include "policy/policy_constants.h"
#include "policy/proto/device_management_backend.pb.h"
#include "sync/notifier/invalidation_util.h"
#include "sync/internal_api/public/base/invalidation_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/sync/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include_rules = [
# For files not in a subdirectory.
"+sync/internal_api/public",
"+sync/js",
"+sync/notifier",

# TODO(tim): Remove everything below. Bug 131130.
"+sync/util/cryptographer.h",
Expand Down
9 changes: 0 additions & 9 deletions chrome/browser/sync/glue/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ include_rules = [

"+jingle/notifier/base",

# Should these live in their own "includes" (e.g) directory(ies)?
# Bug 19878.
"+sync/notifier/invalidation_util.h",
"+sync/notifier/mock_sync_notifier_observer.h",
"+sync/notifier/sync_notifier.h",
"+sync/notifier/sync_notifier_helper.h",
"+sync/notifier/sync_notifier_factory.h",
"+sync/notifier/sync_notifier_observer.h",

# TODO(zea): SessionModelAssociator shouldn't need this.
# TODO(sync): Also need to fix crbug.com/123674.
"+sync/syncable",
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/sync/glue/sync_backend_host_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "chrome/browser/sync/glue/sync_backend_registrar.h"
#include "chrome/browser/sync/glue/synced_device_tracker.h"
#include "chrome/common/chrome_version_info.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "sync/internal_api/public/base/invalidation_util.h"
#include "sync/internal_api/public/events/protocol_event.h"
#include "sync/internal_api/public/http_post_provider_factory.h"
#include "sync/internal_api/public/internal_components_factory.h"
Expand All @@ -21,8 +23,6 @@
#include "sync/internal_api/public/sync_context_proxy.h"
#include "sync/internal_api/public/sync_manager.h"
#include "sync/internal_api/public/sync_manager_factory.h"
#include "sync/notifier/invalidation_util.h"
#include "sync/notifier/object_id_invalidation_map.h"

// Helper macros to log with the syncer thread name; useful when there
// are multiple syncers involved.
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/sync/glue/sync_backend_host_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "chrome/browser/sync/glue/sync_backend_registrar.h"
#include "chrome/common/chrome_switches.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "components/network_time/network_time_tracker.h"
#include "components/sync_driver/sync_frontend.h"
#include "components/sync_driver/sync_prefs.h"
Expand All @@ -29,7 +30,6 @@
#include "sync/internal_api/public/sync_manager_factory.h"
#include "sync/internal_api/public/util/experiments.h"
#include "sync/internal_api/public/util/sync_string_conversions.h"
#include "sync/notifier/object_id_invalidation_map.h"

// Helper macros to log with the syncer thread name; useful when there
// are multiple syncers involved.
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/sync/glue/sync_backend_host_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "base/threading/thread.h"
#include "chrome/browser/sync/glue/extensions_activity_monitor.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "components/invalidation/invalidation_handler.h"
#include "components/sync_driver/backend_data_type_configurer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
Expand All @@ -26,7 +27,6 @@
#include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/invalidation_handler.h"
#include "sync/protocol/encryption.pb.h"
#include "sync/protocol/sync_protocol_error.h"
#include "sync/util/extensions_activity.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/sync/profile_sync_service_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/sync_ui_util.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "components/signin/core/browser/signin_manager.h"
#include "components/sync_driver/pref_names.h"
#include "components/sync_driver/sync_prefs.h"
Expand All @@ -34,7 +35,6 @@
#include "grit/generated_resources.h"
#include "jni/ProfileSyncService_jni.h"
#include "sync/internal_api/public/read_transaction.h"
#include "sync/notifier/object_id_invalidation_map.h"
#include "ui/base/l10n/l10n_util.h"

using base::android::AttachCurrentThread;
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/sync/profile_sync_service_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "components/sync_driver/sync_prefs.h"
#include "google/cacheinvalidation/include/types.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "sync/internal_api/public/base/invalidation_util.h"

class Profile;
class ProfileSyncService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include "base/macros.h"
#include "components/invalidation/invalidation_service_util.h"
#include "components/invalidation/object_id_invalidation_map.h"
#include "sync/internal_api/public/base/invalidation.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/notifier/object_id_invalidation_map.h"
#

namespace fake_server {
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/ui/webui/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include_rules = [
"+sync/internal_api/public/sessions",
"+sync/internal_api/public/events",
"+sync/internal_api/public/util/weak_handle.h",
"+sync/internal_api/public/base/invalidation_util.h",

# Other libraries.
"+components/onc",
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/webui/invalidations_message_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include "base/bind.h"
#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "components/invalidation/invalidation_handler.h"
#include "components/invalidation/invalidation_logger.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/profile_invalidation_provider.h"
#include "content/public/browser/web_ui.h"
#include "sync/notifier/invalidation_handler.h"

namespace invalidation {
class InvalidationLogger;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/webui/invalidations_message_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/values.h"
#include "components/invalidation/invalidation_logger_observer.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "sync/notifier/invalidation_util.h"
#include "sync/internal_api/public/base/invalidation_util.h"

class Profile;

Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome_tests_unit.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'../components/components.gyp:bookmarks_test_support',
'../components/components.gyp:gcm_driver_test_support',
'../components/components.gyp:history_core_test_support',
'../components/components.gyp:invalidation',
'../components/components.gyp:invalidation_test_support',
'../components/components.gyp:metrics_test_support',
'../components/components.gyp:password_manager_core_browser_test_support',
Expand Down Expand Up @@ -495,7 +496,6 @@
'../sync/sync.gyp:test_support_sync_api',
'../sync/sync.gyp:test_support_sync_core',
'../sync/sync.gyp:test_support_sync_internal_api',
'../sync/sync.gyp:test_support_sync_notifier',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'test_support_common',
Expand Down
6 changes: 6 additions & 0 deletions components/components_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@
# Dependencies of invalidation
'components.gyp:invalidation',
'components.gyp:invalidation_test_support',
'../jingle/jingle.gyp:notifier_test_util',
'../third_party/libjingle/libjingle.gyp:libjingle',

# Dependencies of json_schema
'components.gyp:json_schema',
Expand Down Expand Up @@ -545,11 +547,15 @@
'invalidation/invalidation_notifier_unittest.cc',
'invalidation/invalidator_registrar_unittest.cc',
'invalidation/non_blocking_invalidator_unittest.cc',
'invalidation/object_id_invalidation_map_unittest.cc',
'invalidation/p2p_invalidator_unittest.cc',
'invalidation/push_client_channel_unittest.cc',
'invalidation/registration_manager_unittest.cc',
'invalidation/single_object_invalidation_set_unittest.cc',
'invalidation/sync_invalidation_listener_unittest.cc',
'invalidation/sync_system_resources_unittest.cc',
'invalidation/ticl_invalidation_service_unittest.cc',
'invalidation/unacked_invalidation_set_unittest.cc',
],
}],
['chromeos==1', {
Expand Down
Loading

0 comments on commit 001bbfd

Please sign in to comment.