diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 02:50:12 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 02:50:12 +0000 |
commit | 895a1e5bb93fa9a86fac22f5492598cf99636e47 (patch) | |
tree | 0f2e965b0014a64656ef378930710a16ad8c79d8 /chrome/browser | |
parent | 49f47568522c5a83c851f4333592521a1dae86dd (diff) | |
download | chromium_src-895a1e5bb93fa9a86fac22f5492598cf99636e47.zip chromium_src-895a1e5bb93fa9a86fac22f5492598cf99636e47.tar.gz chromium_src-895a1e5bb93fa9a86fac22f5492598cf99636e47.tar.bz2 |
[Sync] Move chrome/browser/sync/api to sync/api
Update all references.
BUG=128061
TEST=
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10389134
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
101 files changed, 128 insertions, 1293 deletions
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS index fdd22ec..a203210 100644 --- a/chrome/browser/DEPS +++ b/chrome/browser/DEPS @@ -21,6 +21,7 @@ include_rules = [ "+sandbox/src", # The path doesn't say it, but this is the Windows sandbox. "+skia/ext", "+skia/include", + "+sync/api", # Sync API files. "+sync/protocol", # Sync protobuf files. "+third_party/cros", "+third_party/cros_system_api", diff --git a/chrome/browser/extensions/app_notification_manager.cc b/chrome/browser/extensions/app_notification_manager.cc index 6feed0a..97672b3 100644 --- a/chrome/browser/extensions/app_notification_manager.cc +++ b/chrome/browser/extensions/app_notification_manager.cc @@ -13,10 +13,10 @@ #include "base/stl_util.h" #include "base/time.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" #include "content/public/browser/notification_service.h" +#include "sync/api/sync_error_factory.h" #include "sync/protocol/app_notification_specifics.pb.h" #include "sync/protocol/sync.pb.h" diff --git a/chrome/browser/extensions/app_notification_manager.h b/chrome/browser/extensions/app_notification_manager.h index 90b9253..21d0ff3 100644 --- a/chrome/browser/extensions/app_notification_manager.h +++ b/chrome/browser/extensions/app_notification_manager.h @@ -16,12 +16,12 @@ #include "base/synchronization/waitable_event.h" #include "chrome/browser/extensions/app_notification.h" #include "chrome/browser/extensions/app_notification_storage.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "sync/api/sync_change.h" +#include "sync/api/syncable_service.h" class PerfTimer; class Profile; diff --git a/chrome/browser/extensions/app_notification_manager_sync_unittest.cc b/chrome/browser/extensions/app_notification_manager_sync_unittest.cc index d311360c..8c52367 100644 --- a/chrome/browser/extensions/app_notification_manager_sync_unittest.cc +++ b/chrome/browser/extensions/app_notification_manager_sync_unittest.cc @@ -8,10 +8,10 @@ #include "base/string_number_conversions.h" #include "chrome/browser/extensions/app_notification.h" #include "chrome/browser/extensions/app_notification_manager.h" -#include "chrome/browser/sync/api/sync_error_factory.h" -#include "chrome/browser/sync/api/sync_error_factory_mock.h" #include "chrome/test/base/testing_profile.h" #include "content/test/test_browser_thread.h" +#include "sync/api/sync_error_factory.h" +#include "sync/api/sync_error_factory_mock.h" #include "sync/protocol/app_notification_specifics.pb.h" #include "sync/protocol/sync.pb.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/extensions/app_sync_bundle.cc b/chrome/browser/extensions/app_sync_bundle.cc index 29f508b..0c1bdeb 100644 --- a/chrome/browser/extensions/app_sync_bundle.cc +++ b/chrome/browser/extensions/app_sync_bundle.cc @@ -7,10 +7,10 @@ #include "base/location.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_sorting.h" -#include "chrome/browser/sync/api/sync_change_processor.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_set.h" +#include "sync/api/sync_change_processor.h" +#include "sync/api/sync_error_factory.h" namespace extensions { diff --git a/chrome/browser/extensions/app_sync_bundle.h b/chrome/browser/extensions/app_sync_bundle.h index 5d840c7..fd84b57 100644 --- a/chrome/browser/extensions/app_sync_bundle.h +++ b/chrome/browser/extensions/app_sync_bundle.h @@ -14,7 +14,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/extensions/app_sync_data.h" -#include "chrome/browser/sync/api/syncable_service.h" +#include "sync/api/syncable_service.h" class SyncChangeProcessor; class Extension; diff --git a/chrome/browser/extensions/app_sync_data.cc b/chrome/browser/extensions/app_sync_data.cc index 8145b0a..87b37c0 100644 --- a/chrome/browser/extensions/app_sync_data.cc +++ b/chrome/browser/extensions/app_sync_data.cc @@ -4,8 +4,8 @@ #include "chrome/browser/extensions/app_sync_data.h" -#include "chrome/browser/sync/api/sync_data.h" #include "chrome/common/extensions/extension.h" +#include "sync/api/sync_data.h" #include "sync/protocol/app_specifics.pb.h" #include "sync/protocol/sync.pb.h" diff --git a/chrome/browser/extensions/app_sync_data.h b/chrome/browser/extensions/app_sync_data.h index a77ef39..3bdd335 100644 --- a/chrome/browser/extensions/app_sync_data.h +++ b/chrome/browser/extensions/app_sync_data.h @@ -7,8 +7,8 @@ #pragma once #include "chrome/browser/extensions/extension_sync_data.h" -#include "chrome/browser/sync/api/sync_change.h" #include "chrome/common/string_ordinal.h" +#include "sync/api/sync_change.h" class Extension; class SyncData; diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index 9b61cec..5a66ea9 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -32,14 +32,13 @@ #include "chrome/browser/chrome_plugin_service_filter.h" #include "chrome/browser/download/download_extension_api.h" #include "chrome/browser/extensions/api/api_resource_controller.h" +#include "chrome/browser/extensions/api/declarative/rules_registry_service.h" +#include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" #include "chrome/browser/extensions/app_notification_manager.h" #include "chrome/browser/extensions/app_sync_data.h" #include "chrome/browser/extensions/apps_promo.h" #include "chrome/browser/extensions/component_loader.h" #include "chrome/browser/extensions/crx_installer.h" -#include "chrome/browser/extensions/api/declarative/rules_registry_service.h" -#include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" -#include "chrome/browser/extensions/app_sync_data.h" #include "chrome/browser/extensions/default_apps_trial.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_cookies_api.h" @@ -74,8 +73,6 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/browser.h" @@ -90,9 +87,9 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/extension_error_utils.h" #include "chrome/common/extensions/extension_file_util.h" +#include "chrome/common/extensions/extension_manifest_constants.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/extension_resource.h" #include "chrome/common/pref_names.h" @@ -107,6 +104,8 @@ #include "content/public/common/pepper_plugin_info.h" #include "googleurl/src/gurl.h" #include "net/base/registry_controlled_domain.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_error_factory.h" #include "webkit/database/database_tracker.h" #include "webkit/database/database_util.h" diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h index f8b2148..4cc7725 100644 --- a/chrome/browser/extensions/extension_service.h +++ b/chrome/browser/extensions/extension_service.h @@ -38,14 +38,14 @@ #include "chrome/browser/extensions/process_map.h" #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" #include "chrome/browser/prefs/pref_change_registrar.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_set.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "sync/api/sync_change.h" +#include "sync/api/syncable_service.h" class AppNotificationManager; class BookmarkExtensionEventRouter; diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index de10381..3963400 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -52,8 +52,6 @@ #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/browser/prefs/pref_service_mock_builder.h" #include "chrome/browser/prefs/scoped_user_pref_update.h" -#include "chrome/browser/sync/api/sync_error_factory.h" -#include "chrome/browser/sync/api/sync_error_factory_mock.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_notification_types.h" @@ -80,6 +78,8 @@ #include "net/cookies/cookie_options.h" #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_getter.h" +#include "sync/api/sync_error_factory.h" +#include "sync/api/sync_error_factory_mock.h" #include "sync/protocol/app_specifics.pb.h" #include "sync/protocol/extension_specifics.pb.h" #include "sync/protocol/sync.pb.h" diff --git a/chrome/browser/extensions/extension_sync_bundle.cc b/chrome/browser/extensions/extension_sync_bundle.cc index 017915e..681af45 100644 --- a/chrome/browser/extensions/extension_sync_bundle.cc +++ b/chrome/browser/extensions/extension_sync_bundle.cc @@ -7,10 +7,10 @@ #include "base/location.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_sorting.h" -#include "chrome/browser/sync/api/sync_change_processor.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_set.h" +#include "sync/api/sync_change_processor.h" +#include "sync/api/sync_error_factory.h" namespace extensions { diff --git a/chrome/browser/extensions/extension_sync_bundle.h b/chrome/browser/extensions/extension_sync_bundle.h index 1ee248d..2945442 100644 --- a/chrome/browser/extensions/extension_sync_bundle.h +++ b/chrome/browser/extensions/extension_sync_bundle.h @@ -14,7 +14,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/extensions/extension_sync_data.h" -#include "chrome/browser/sync/api/syncable_service.h" +#include "sync/api/syncable_service.h" class SyncChangeProcessor; class Extension; diff --git a/chrome/browser/extensions/extension_sync_data.cc b/chrome/browser/extensions/extension_sync_data.cc index 8d33e5c..2119bb8 100644 --- a/chrome/browser/extensions/extension_sync_data.cc +++ b/chrome/browser/extensions/extension_sync_data.cc @@ -7,8 +7,8 @@ #include "base/logging.h" #include "chrome/browser/extensions/app_sync_data.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/sync/api/sync_data.h" #include "chrome/common/extensions/extension.h" +#include "sync/api/sync_data.h" #include "sync/protocol/extension_specifics.pb.h" #include "sync/protocol/sync.pb.h" diff --git a/chrome/browser/extensions/extension_sync_data.h b/chrome/browser/extensions/extension_sync_data.h index cdd56ed..9dd1514 100644 --- a/chrome/browser/extensions/extension_sync_data.h +++ b/chrome/browser/extensions/extension_sync_data.h @@ -9,9 +9,9 @@ #include <string> #include "base/version.h" -#include "chrome/browser/sync/api/sync_change.h" #include "chrome/common/string_ordinal.h" #include "googleurl/src/gurl.h" +#include "sync/api/sync_change.h" class Extension; class SyncData; diff --git a/chrome/browser/extensions/settings/setting_sync_data.cc b/chrome/browser/extensions/settings/setting_sync_data.cc index 4f54052..e5329c1 100644 --- a/chrome/browser/extensions/settings/setting_sync_data.cc +++ b/chrome/browser/extensions/settings/setting_sync_data.cc @@ -6,7 +6,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" -#include "chrome/browser/sync/api/sync_data.h" +#include "sync/api/sync_data.h" #include "sync/protocol/app_setting_specifics.pb.h" #include "sync/protocol/extension_setting_specifics.pb.h" #include "sync/protocol/sync.pb.h" diff --git a/chrome/browser/extensions/settings/setting_sync_data.h b/chrome/browser/extensions/settings/setting_sync_data.h index f1678e7..c72f386 100644 --- a/chrome/browser/extensions/settings/setting_sync_data.h +++ b/chrome/browser/extensions/settings/setting_sync_data.h @@ -9,7 +9,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" -#include "chrome/browser/sync/api/sync_change.h" +#include "sync/api/sync_change.h" class SyncData; namespace sync_pb { diff --git a/chrome/browser/extensions/settings/settings_apitest.cc b/chrome/browser/extensions/settings/settings_apitest.cc index 1db2c80..aab4de9 100644 --- a/chrome/browser/extensions/settings/settings_apitest.cc +++ b/chrome/browser/extensions/settings/settings_apitest.cc @@ -7,18 +7,18 @@ #include "base/json/json_writer.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_service.h" +#include "chrome/browser/extensions/extension_test_message_listener.h" #include "chrome/browser/extensions/settings/settings_frontend.h" #include "chrome/browser/extensions/settings/settings_namespace.h" #include "chrome/browser/extensions/settings/settings_sync_util.h" -#include "chrome/browser/extensions/extension_test_message_listener.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/sync_change_processor.h" -#include "chrome/browser/sync/api/sync_error_factory.h" -#include "chrome/browser/sync/api/sync_error_factory_mock.h" #include "chrome/browser/ui/browser.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/ui_test_utils.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_change_processor.h" +#include "sync/api/sync_error_factory.h" +#include "sync/api/sync_error_factory_mock.h" namespace extensions { diff --git a/chrome/browser/extensions/settings/settings_backend.cc b/chrome/browser/extensions/settings/settings_backend.cc index a20a842..fc4f982 100644 --- a/chrome/browser/extensions/settings/settings_backend.cc +++ b/chrome/browser/extensions/settings/settings_backend.cc @@ -16,9 +16,9 @@ #include "chrome/browser/extensions/settings/settings_storage_quota_enforcer.h" #include "chrome/browser/extensions/settings/settings_sync_processor.h" #include "chrome/browser/extensions/settings/settings_sync_util.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/common/extensions/extension.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_error_factory.h" using content::BrowserThread; diff --git a/chrome/browser/extensions/settings/settings_backend.h b/chrome/browser/extensions/settings/settings_backend.h index 0c5015f..fb2c217 100644 --- a/chrome/browser/extensions/settings/settings_backend.h +++ b/chrome/browser/extensions/settings/settings_backend.h @@ -15,7 +15,7 @@ #include "chrome/browser/extensions/settings/settings_observer.h" #include "chrome/browser/extensions/settings/settings_storage_quota_enforcer.h" #include "chrome/browser/extensions/settings/syncable_settings_storage.h" -#include "chrome/browser/sync/api/syncable_service.h" +#include "sync/api/syncable_service.h" class SyncErrorFactory; diff --git a/chrome/browser/extensions/settings/settings_frontend.h b/chrome/browser/extensions/settings/settings_frontend.h index bb181e4..ace81dd 100644 --- a/chrome/browser/extensions/settings/settings_frontend.h +++ b/chrome/browser/extensions/settings/settings_frontend.h @@ -17,7 +17,7 @@ #include "chrome/browser/extensions/settings/settings_namespace.h" #include "chrome/browser/extensions/settings/settings_observer.h" #include "chrome/browser/extensions/settings/settings_storage_quota_enforcer.h" -#include "chrome/browser/sync/api/syncable_service.h" +#include "sync/api/syncable_service.h" class Profile; diff --git a/chrome/browser/extensions/settings/settings_sync_processor.cc b/chrome/browser/extensions/settings/settings_sync_processor.cc index 245385f..a9f95f4 100644 --- a/chrome/browser/extensions/settings/settings_sync_processor.cc +++ b/chrome/browser/extensions/settings/settings_sync_processor.cc @@ -5,9 +5,9 @@ #include "chrome/browser/extensions/settings/settings_namespace.h" #include "chrome/browser/extensions/settings/settings_sync_processor.h" #include "chrome/browser/extensions/settings/settings_sync_util.h" -#include "chrome/browser/sync/api/sync_data.h" -#include "chrome/browser/sync/api/sync_change_processor.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_change_processor.h" +#include "sync/api/sync_data.h" #include "sync/protocol/extension_setting_specifics.pb.h" using content::BrowserThread; diff --git a/chrome/browser/extensions/settings/settings_sync_processor.h b/chrome/browser/extensions/settings/settings_sync_processor.h index b2481cc..89f1bd8 100644 --- a/chrome/browser/extensions/settings/settings_sync_processor.h +++ b/chrome/browser/extensions/settings/settings_sync_processor.h @@ -10,7 +10,7 @@ #include <string> #include "chrome/browser/extensions/settings/setting_change.h" -#include "chrome/browser/sync/api/sync_error.h" +#include "sync/api/sync_error.h" class SyncChangeProcessor; diff --git a/chrome/browser/extensions/settings/settings_sync_unittest.cc b/chrome/browser/extensions/settings/settings_sync_unittest.cc index f19c91dd..1da6745 100644 --- a/chrome/browser/extensions/settings/settings_sync_unittest.cc +++ b/chrome/browser/extensions/settings/settings_sync_unittest.cc @@ -17,10 +17,10 @@ #include "chrome/browser/extensions/settings/settings_test_util.h" #include "chrome/browser/extensions/settings/syncable_settings_storage.h" #include "chrome/browser/extensions/settings/testing_settings_storage.h" -#include "chrome/browser/sync/api/sync_change_processor.h" -#include "chrome/browser/sync/api/sync_error_factory.h" -#include "chrome/browser/sync/api/sync_error_factory_mock.h" #include "content/test/test_browser_thread.h" +#include "sync/api/sync_change_processor.h" +#include "sync/api/sync_error_factory.h" +#include "sync/api/sync_error_factory_mock.h" using content::BrowserThread; diff --git a/chrome/browser/extensions/settings/settings_sync_util.h b/chrome/browser/extensions/settings/settings_sync_util.h index 1c15c27..40f6557 100644 --- a/chrome/browser/extensions/settings/settings_sync_util.h +++ b/chrome/browser/extensions/settings/settings_sync_util.h @@ -7,8 +7,8 @@ #pragma once -#include "chrome/browser/sync/api/sync_data.h" -#include "chrome/browser/sync/api/sync_change.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_data.h" namespace base { class Value; diff --git a/chrome/browser/extensions/settings/syncable_settings_storage.cc b/chrome/browser/extensions/settings/syncable_settings_storage.cc index 32241c6..b69e1ac 100644 --- a/chrome/browser/extensions/settings/syncable_settings_storage.cc +++ b/chrome/browser/extensions/settings/syncable_settings_storage.cc @@ -8,8 +8,8 @@ #include "chrome/browser/extensions/settings/settings_namespace.h" #include "chrome/browser/extensions/settings/settings_sync_processor.h" #include "chrome/browser/extensions/settings/settings_sync_util.h" -#include "chrome/browser/sync/api/sync_data.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_data.h" #include "sync/protocol/extension_setting_specifics.pb.h" namespace extensions { diff --git a/chrome/browser/extensions/settings/syncable_settings_storage.h b/chrome/browser/extensions/settings/syncable_settings_storage.h index 5074ee2..2de24972 100644 --- a/chrome/browser/extensions/settings/syncable_settings_storage.h +++ b/chrome/browser/extensions/settings/syncable_settings_storage.h @@ -10,11 +10,11 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list_threadsafe.h" #include "base/values.h" +#include "chrome/browser/extensions/settings/setting_sync_data.h" #include "chrome/browser/extensions/settings/settings_observer.h" #include "chrome/browser/extensions/settings/settings_storage.h" -#include "chrome/browser/extensions/settings/setting_sync_data.h" -#include "chrome/browser/sync/api/syncable_service.h" -#include "chrome/browser/sync/api/sync_change.h" +#include "sync/api/sync_change.h" +#include "sync/api/syncable_service.h" namespace extensions { diff --git a/chrome/browser/extensions/test_extension_service.cc b/chrome/browser/extensions/test_extension_service.cc index 0a471d9..86d4788 100644 --- a/chrome/browser/extensions/test_extension_service.cc +++ b/chrome/browser/extensions/test_extension_service.cc @@ -5,7 +5,7 @@ #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_sync_data.h" #include "chrome/browser/extensions/test_extension_service.h" -#include "chrome/browser/sync/api/sync_error_factory.h" +#include "sync/api/sync_error_factory.h" #include "testing/gtest/include/gtest/gtest.h" TestExtensionService::~TestExtensionService() {} diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc index 16dc0c3..cbb3458 100644 --- a/chrome/browser/prefs/pref_model_associator.cc +++ b/chrome/browser/prefs/pref_model_associator.cc @@ -11,10 +11,10 @@ #include "base/logging.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_error_factory.h" #include "sync/protocol/preference_specifics.pb.h" #include "sync/protocol/sync.pb.h" diff --git a/chrome/browser/prefs/pref_model_associator.h b/chrome/browser/prefs/pref_model_associator.h index 6d0bb52..22ad33c 100644 --- a/chrome/browser/prefs/pref_model_associator.h +++ b/chrome/browser/prefs/pref_model_associator.h @@ -14,8 +14,8 @@ #include "base/compiler_specific.h" #include "base/threading/non_thread_safe.h" #include "chrome/browser/prefs/pref_service.h" -#include "chrome/browser/sync/api/syncable_service.h" -#include "chrome/browser/sync/api/sync_data.h" +#include "sync/api/sync_data.h" +#include "sync/api/syncable_service.h" namespace sync_pb { class PreferenceSpecifics; diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc index 2e0c264..de09247 100644 --- a/chrome/browser/search_engines/template_url_service.cc +++ b/chrome/browser/search_engines/template_url_service.cc @@ -33,8 +33,6 @@ #include "chrome/browser/search_engines/template_url_prepopulate_data.h" #include "chrome/browser/search_engines/template_url_service_observer.h" #include "chrome/browser/search_engines/util.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/browser/webdata/web_data_service_factory.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" @@ -45,6 +43,8 @@ #include "chrome/common/url_constants.h" #include "content/public/browser/notification_service.h" #include "net/base/net_util.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_error_factory.h" #include "sync/protocol/search_engine_specifics.pb.h" #include "sync/protocol/sync.pb.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h index 68e4f12..39519b3 100644 --- a/chrome/browser/search_engines/template_url_service.h +++ b/chrome/browser/search_engines/template_url_service.h @@ -18,11 +18,11 @@ #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/profiles/profile_keyed_service.h" #include "chrome/browser/search_engines/template_url_id.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/webdata/web_data_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "sync/api/sync_change.h" +#include "sync/api/syncable_service.h" class Extension; class GURL; diff --git a/chrome/browser/search_engines/template_url_service_sync_unittest.cc b/chrome/browser/search_engines/template_url_service_sync_unittest.cc index 46214e8..dfe9f11 100644 --- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc +++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc @@ -11,8 +11,6 @@ #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/search_engines/template_url_service_test_util.h" -#include "chrome/browser/sync/api/sync_error_factory.h" -#include "chrome/browser/sync/api/sync_error_factory_mock.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" @@ -20,6 +18,8 @@ #include "chrome/test/base/testing_profile.h" #include "content/public/browser/notification_service.h" #include "net/base/net_util.h" +#include "sync/api/sync_error_factory.h" +#include "sync/api/sync_error_factory_mock.h" #include "sync/protocol/search_engine_specifics.pb.h" #include "sync/protocol/sync.pb.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/sync/api/DEPS b/chrome/browser/sync/api/DEPS deleted file mode 100644 index 4a424713..0000000 --- a/chrome/browser/sync/api/DEPS +++ /dev/null @@ -1,10 +0,0 @@ -include_rules = [ - "-chrome", - - "+chrome/browser/sync/api", - "+sync/internal_api/base_node.h", - "+sync/protocol", - "+sync/syncable/model_type.h", - "+sync/util/immutable.h", -] - diff --git a/chrome/browser/sync/api/fake_syncable_service.cc b/chrome/browser/sync/api/fake_syncable_service.cc deleted file mode 100644 index 7082577..0000000 --- a/chrome/browser/sync/api/fake_syncable_service.cc +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2012 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. - -#include "chrome/browser/sync/api/fake_syncable_service.h" -#include "chrome/browser/sync/api/sync_error_factory.h" - -#include "base/location.h" - -FakeSyncableService::FakeSyncableService() - : syncing_(false), - type_(syncable::UNSPECIFIED) {} - -FakeSyncableService::~FakeSyncableService() {} - -void FakeSyncableService::set_merge_data_and_start_syncing_error( - const SyncError& error) { - merge_data_and_start_syncing_error_ = error; -} - -void FakeSyncableService::set_process_sync_changes_error( - const SyncError& error) { - process_sync_changes_error_ = error; -} - -bool FakeSyncableService::syncing() const { - return syncing_; -} - -// SyncableService implementation. -SyncError FakeSyncableService::MergeDataAndStartSyncing( - syncable::ModelType type, - const SyncDataList& initial_sync_data, - scoped_ptr<SyncChangeProcessor> sync_processor, - scoped_ptr<SyncErrorFactory> sync_error_factory) { - sync_processor_ = sync_processor.Pass(); - type_ = type; - if (!merge_data_and_start_syncing_error_.IsSet()) { - syncing_ = true; - } - return merge_data_and_start_syncing_error_; -} - -void FakeSyncableService::StopSyncing(syncable::ModelType type) { - syncing_ = false; - sync_processor_.reset(); -} - -SyncDataList FakeSyncableService::GetAllSyncData( - syncable::ModelType type) const { - return SyncDataList(); -} - -SyncError FakeSyncableService::ProcessSyncChanges( - const tracked_objects::Location& from_here, - const SyncChangeList& change_list) { - return process_sync_changes_error_; -} diff --git a/chrome/browser/sync/api/fake_syncable_service.h b/chrome/browser/sync/api/fake_syncable_service.h deleted file mode 100644 index 3080a630..0000000 --- a/chrome/browser/sync/api/fake_syncable_service.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef CHROME_BROWSER_SYNC_API_FAKE_SYNCABLE_SERVICE_H_ -#define CHROME_BROWSER_SYNC_API_FAKE_SYNCABLE_SERVICE_H_ -#pragma once - -#include "chrome/browser/sync/api/syncable_service.h" - -class SyncErrorFactory; - -// A fake SyncableService that can return arbitrary values and maintains the -// syncing status. -class FakeSyncableService : public SyncableService { - public: - FakeSyncableService(); - virtual ~FakeSyncableService(); - - // Setters for SyncableService implementation results. - void set_merge_data_and_start_syncing_error(const SyncError& error); - void set_process_sync_changes_error(const SyncError& error); - - // Whether we're syncing or not. Set on a successful MergeDataAndStartSyncing, - // unset on StopSyncing. False by default. - bool syncing() const; - - // SyncableService implementation. - virtual SyncError MergeDataAndStartSyncing( - syncable::ModelType type, - const SyncDataList& initial_sync_data, - scoped_ptr<SyncChangeProcessor> sync_processor, - scoped_ptr<SyncErrorFactory> sync_error_factory) OVERRIDE; - virtual void StopSyncing(syncable::ModelType type) OVERRIDE; - virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; - virtual SyncError ProcessSyncChanges( - const tracked_objects::Location& from_here, - const SyncChangeList& change_list) OVERRIDE; - - private: - scoped_ptr<SyncChangeProcessor> sync_processor_; - SyncError merge_data_and_start_syncing_error_; - SyncError process_sync_changes_error_; - bool syncing_; - syncable::ModelType type_; -}; - -#endif // CHROME_BROWSER_SYNC_API_FAKE_SYNCABLE_SERVICE_H_ diff --git a/chrome/browser/sync/api/sync_change.cc b/chrome/browser/sync/api/sync_change.cc deleted file mode 100644 index 04be0a2..0000000 --- a/chrome/browser/sync/api/sync_change.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2011 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. - -#include "chrome/browser/sync/api/sync_change.h" - -#include <ostream> - -SyncChange::SyncChange() : change_type_(ACTION_INVALID) { -} - -SyncChange::SyncChange(SyncChangeType change_type, const SyncData& sync_data) - : change_type_(change_type), - sync_data_(sync_data) { - DCHECK(IsValid()); -} - -SyncChange::~SyncChange() {} - -bool SyncChange::IsValid() const { - if (change_type_ == ACTION_INVALID || !sync_data_.IsValid()) - return false; - - // Data from the syncer must always have valid specifics. - if (!sync_data_.IsLocal()) - return syncable::IsRealDataType(sync_data_.GetDataType()); - - // Local changes must always have a tag and specify a valid datatype. - if (sync_data_.GetTag().empty() || - !syncable::IsRealDataType(sync_data_.GetDataType())) { - return false; - } - - // Adds and updates must have a non-unique-title. - if (change_type_ == ACTION_ADD || change_type_ == ACTION_UPDATE) - return (!sync_data_.GetTitle().empty()); - - return true; -} - -SyncChange::SyncChangeType SyncChange::change_type() const { - return change_type_; -} - -SyncData SyncChange::sync_data() const { - return sync_data_; -} - -// static -std::string SyncChange::ChangeTypeToString(SyncChangeType change_type) { - switch (change_type) { - case ACTION_INVALID: - return "ACTION_INVALID"; - case ACTION_ADD: - return "ACTION_ADD"; - case ACTION_UPDATE: - return "ACTION_UPDATE"; - case ACTION_DELETE: - return "ACTION_DELETE"; - default: - NOTREACHED(); - } - return std::string(); -} - -std::string SyncChange::ToString() const { - return "{ changeType: " + ChangeTypeToString(change_type_) + - ", syncData: " + sync_data_.ToString() + "}"; -} - -void PrintTo(const SyncChange& sync_change, std::ostream* os) { - *os << sync_change.ToString(); -} diff --git a/chrome/browser/sync/api/sync_change.h b/chrome/browser/sync/api/sync_change.h deleted file mode 100644 index 1b9787a..0000000 --- a/chrome/browser/sync/api/sync_change.h +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ -#define CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ -#pragma once - -#include <iosfwd> -#include <string> -#include <vector> - -#include "chrome/browser/sync/api/sync_data.h" - -// A SyncChange object reflects a change to a piece of synced data. The change -// can be either a delete, add, or an update. All data relevant to the change -// is encapsulated within the SyncChange, which, once created, is immutable. -// Note: it is safe and cheap to pass these by value or make copies, as they do -// not create deep copies of their internal data. -class SyncChange { - public: - enum SyncChangeType { - ACTION_INVALID, - ACTION_ADD, - ACTION_UPDATE, - ACTION_DELETE - }; - - // Default constructor creates an invalid change. - SyncChange(); - // Create a new change with the specified sync data. - SyncChange(SyncChangeType change_type, const SyncData& sync_data); - ~SyncChange(); - - // Copy constructor and assignment operator welcome. - - // Whether this change is valid. This must be true before attempting to access - // the data. - // Deletes: Requires valid tag when going to the syncer. Requires valid - // specifics when coming from the syncer. - // Adds, Updates: Require valid tag and specifics when going to the syncer. - // Require only valid specifics when coming from the syncer. - bool IsValid() const; - - // Getters. - SyncChangeType change_type() const; - SyncData sync_data() const; - - // Returns a string representation of |change_type|. - static std::string ChangeTypeToString(SyncChangeType change_type); - - // Returns a string representation of the entire object. Used for gmock - // printing method, PrintTo. - std::string ToString() const; - - private: - SyncChangeType change_type_; - - // An immutable container for the data of this SyncChange. Whenever - // SyncChanges are copied, they copy references to this data. - SyncData sync_data_; -}; - -// gmock printer helper. -void PrintTo(const SyncChange& sync_change, std::ostream* os); - -#endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ diff --git a/chrome/browser/sync/api/sync_change_processor.cc b/chrome/browser/sync/api/sync_change_processor.cc deleted file mode 100644 index 588d17a..0000000 --- a/chrome/browser/sync/api/sync_change_processor.cc +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2011 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. - -#include "chrome/browser/sync/api/sync_change_processor.h" - -SyncChangeProcessor::SyncChangeProcessor() {} - -SyncChangeProcessor::~SyncChangeProcessor() {} diff --git a/chrome/browser/sync/api/sync_change_processor.h b/chrome/browser/sync/api/sync_change_processor.h deleted file mode 100644 index a68dc59..0000000 --- a/chrome/browser/sync/api/sync_change_processor.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ -#define CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ -#pragma once - -#include <vector> - -#include "chrome/browser/sync/api/sync_error.h" - -class SyncChange; - -namespace tracked_objects { -class Location; -} // namespace tracked_objects - -typedef std::vector<SyncChange> SyncChangeList; - -// An interface for services that handle receiving SyncChanges. -class SyncChangeProcessor { - public: - SyncChangeProcessor(); - virtual ~SyncChangeProcessor(); - - // Process a list of SyncChanges. - // Returns: A default SyncError (IsSet() == false) if no errors were - // encountered, and a filled SyncError (IsSet() == true) - // otherwise. - // Inputs: - // |from_here|: allows tracking of where sync changes originate. - // |change_list|: is the list of sync changes in need of processing. - virtual SyncError ProcessSyncChanges( - const tracked_objects::Location& from_here, - const SyncChangeList& change_list) = 0; - protected: -}; - -#endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ diff --git a/chrome/browser/sync/api/sync_change_unittest.cc b/chrome/browser/sync/api/sync_change_unittest.cc deleted file mode 100644 index 2480ffe..0000000 --- a/chrome/browser/sync/api/sync_change_unittest.cc +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2012 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. - -#include "chrome/browser/sync/api/sync_change.h" - -#include <string> - -#include "base/memory/scoped_ptr.h" -#include "base/values.h" -#include "sync/protocol/preference_specifics.pb.h" -#include "sync/protocol/proto_value_conversions.h" -#include "sync/protocol/sync.pb.h" -#include "testing/gtest/include/gtest/gtest.h" - -using browser_sync::EntitySpecificsToValue; - -// Ordered list of SyncChange's. -typedef std::vector<SyncChange> SyncChangeList; - -namespace { - -typedef testing::Test SyncChangeTest; - -TEST_F(SyncChangeTest, LocalDelete) { - SyncChange::SyncChangeType change_type = SyncChange::ACTION_DELETE; - std::string tag = "client_tag"; - SyncChange e(change_type, - SyncData::CreateLocalDelete(tag, syncable::PREFERENCES)); - EXPECT_EQ(change_type, e.change_type()); - EXPECT_EQ(tag, e.sync_data().GetTag()); - EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); -} - -TEST_F(SyncChangeTest, LocalUpdate) { - SyncChange::SyncChangeType change_type = SyncChange::ACTION_UPDATE; - sync_pb::EntitySpecifics specifics; - sync_pb::PreferenceSpecifics* pref_specifics = specifics.mutable_preference(); - pref_specifics->set_name("test"); - std::string tag = "client_tag"; - std::string title = "client_title"; - SyncChange e(change_type, - SyncData::CreateLocalData(tag, title, specifics)); - EXPECT_EQ(change_type, e.change_type()); - EXPECT_EQ(tag, e.sync_data().GetTag()); - EXPECT_EQ(title, e.sync_data().GetTitle()); - EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( - e.sync_data().GetSpecifics())); - EXPECT_TRUE(ref_spec->Equals(e_spec.get())); -} - -TEST_F(SyncChangeTest, LocalAdd) { - SyncChange::SyncChangeType change_type = SyncChange::ACTION_ADD; - sync_pb::EntitySpecifics specifics; - sync_pb::PreferenceSpecifics* pref_specifics = specifics.mutable_preference(); - pref_specifics->set_name("test"); - std::string tag = "client_tag"; - std::string title = "client_title"; - SyncChange e(change_type, - SyncData::CreateLocalData(tag, title, specifics)); - EXPECT_EQ(change_type, e.change_type()); - EXPECT_EQ(tag, e.sync_data().GetTag()); - EXPECT_EQ(title, e.sync_data().GetTitle()); - EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( - e.sync_data().GetSpecifics())); - EXPECT_TRUE(ref_spec->Equals(e_spec.get())); -} - -TEST_F(SyncChangeTest, SyncerChanges) { - SyncChangeList change_list; - - // Create an update. - sync_pb::EntitySpecifics update_specifics; - sync_pb::PreferenceSpecifics* pref_specifics = - update_specifics.mutable_preference(); - pref_specifics->set_name("update"); - change_list.push_back(SyncChange( - SyncChange::ACTION_UPDATE, - SyncData::CreateRemoteData(1, update_specifics))); - - // Create an add. - sync_pb::EntitySpecifics add_specifics; - pref_specifics = add_specifics.mutable_preference(); - pref_specifics->set_name("add"); - change_list.push_back(SyncChange( - SyncChange::ACTION_ADD, - SyncData::CreateRemoteData(2, add_specifics))); - - // Create a delete. - sync_pb::EntitySpecifics delete_specifics; - pref_specifics = delete_specifics.mutable_preference(); - pref_specifics->set_name("add"); - change_list.push_back(SyncChange( - SyncChange::ACTION_DELETE, - SyncData::CreateRemoteData(3, delete_specifics))); - - ASSERT_EQ(3U, change_list.size()); - - // Verify update. - SyncChange e = change_list[0]; - EXPECT_EQ(SyncChange::ACTION_UPDATE, e.change_type()); - EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue( - update_specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( - e.sync_data().GetSpecifics())); - EXPECT_TRUE(ref_spec->Equals(e_spec.get())); - - // Verify add. - e = change_list[1]; - EXPECT_EQ(SyncChange::ACTION_ADD, e.change_type()); - EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); - ref_spec.reset(EntitySpecificsToValue(add_specifics)); - e_spec.reset(EntitySpecificsToValue(e.sync_data().GetSpecifics())); - EXPECT_TRUE(ref_spec->Equals(e_spec.get())); - - // Verify delete. - e = change_list[2]; - EXPECT_EQ(SyncChange::ACTION_DELETE, e.change_type()); - EXPECT_EQ(syncable::PREFERENCES, e.sync_data().GetDataType()); - ref_spec.reset(EntitySpecificsToValue(delete_specifics)); - e_spec.reset(EntitySpecificsToValue(e.sync_data().GetSpecifics())); - EXPECT_TRUE(ref_spec->Equals(e_spec.get())); -} - -} // namespace diff --git a/chrome/browser/sync/api/sync_data.cc b/chrome/browser/sync/api/sync_data.cc deleted file mode 100644 index e3e3dcd..0000000 --- a/chrome/browser/sync/api/sync_data.cc +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2012 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. - -#include "chrome/browser/sync/api/sync_data.h" - -#include <ostream> - -#include "base/json/json_writer.h" -#include "base/memory/scoped_ptr.h" -#include "base/string_number_conversions.h" -#include "base/values.h" -#include "sync/internal_api/base_node.h" -#include "sync/protocol/proto_value_conversions.h" -#include "sync/protocol/sync.pb.h" -#include "sync/syncable/model_type.h" - -void SyncData::ImmutableSyncEntityTraits::InitializeWrapper( - Wrapper* wrapper) { - *wrapper = new sync_pb::SyncEntity(); -} - -void SyncData::ImmutableSyncEntityTraits::DestroyWrapper( - Wrapper* wrapper) { - delete *wrapper; -} - -const sync_pb::SyncEntity& SyncData::ImmutableSyncEntityTraits::Unwrap( - const Wrapper& wrapper) { - return *wrapper; -} - -sync_pb::SyncEntity* SyncData::ImmutableSyncEntityTraits::UnwrapMutable( - Wrapper* wrapper) { - return *wrapper; -} - -void SyncData::ImmutableSyncEntityTraits::Swap(sync_pb::SyncEntity* t1, - sync_pb::SyncEntity* t2) { - t1->Swap(t2); -} - -SyncData::SyncData() - : is_valid_(false), - id_(sync_api::kInvalidId) {} - -SyncData::SyncData(int64 id, sync_pb::SyncEntity* entity) - : is_valid_(true), - id_(id), - immutable_entity_(entity) {} - -SyncData::~SyncData() {} - -// Static. -SyncData SyncData::CreateLocalDelete( - const std::string& sync_tag, - syncable::ModelType datatype) { - sync_pb::EntitySpecifics specifics; - syncable::AddDefaultFieldValue(datatype, &specifics); - return CreateLocalData(sync_tag, "", specifics); -} - -// Static. -SyncData SyncData::CreateLocalData( - const std::string& sync_tag, - const std::string& non_unique_title, - const sync_pb::EntitySpecifics& specifics) { - sync_pb::SyncEntity entity; - entity.set_client_defined_unique_tag(sync_tag); - entity.set_non_unique_name(non_unique_title); - entity.mutable_specifics()->CopyFrom(specifics); - return SyncData(sync_api::kInvalidId, &entity); -} - -// Static. -SyncData SyncData::CreateRemoteData( - int64 id, const sync_pb::EntitySpecifics& specifics) { - DCHECK_NE(id, sync_api::kInvalidId); - sync_pb::SyncEntity entity; - entity.mutable_specifics()->CopyFrom(specifics); - return SyncData(id, &entity); -} - -bool SyncData::IsValid() const { - return is_valid_; -} - -const sync_pb::EntitySpecifics& SyncData::GetSpecifics() const { - return immutable_entity_.Get().specifics(); -} - -syncable::ModelType SyncData::GetDataType() const { - return syncable::GetModelTypeFromSpecifics(GetSpecifics()); -} - -const std::string& SyncData::GetTag() const { - DCHECK(IsLocal()); - return immutable_entity_.Get().client_defined_unique_tag(); -} - -const std::string& SyncData::GetTitle() const { - // TODO(zea): set this for data coming from the syncer too. - DCHECK(immutable_entity_.Get().has_non_unique_name()); - return immutable_entity_.Get().non_unique_name(); -} - -int64 SyncData::GetRemoteId() const { - DCHECK(!IsLocal()); - return id_; -} - -bool SyncData::IsLocal() const { - return id_ == sync_api::kInvalidId; -} - -std::string SyncData::ToString() const { - if (!IsValid()) - return "<Invalid SyncData>"; - - std::string type = syncable::ModelTypeToString(GetDataType()); - std::string specifics; - scoped_ptr<DictionaryValue> value( - browser_sync::EntitySpecificsToValue(GetSpecifics())); - base::JSONWriter::WriteWithOptions(value.get(), - base::JSONWriter::OPTIONS_PRETTY_PRINT, - &specifics); - - if (IsLocal()) { - return "{ isLocal: true, type: " + type + ", tag: " + GetTag() + - ", title: " + GetTitle() + ", specifics: " + specifics + "}"; - } - - std::string id = base::Int64ToString(GetRemoteId()); - return "{ isLocal: false, type: " + type + ", specifics: " + specifics + - ", id: " + id + "}"; -} - -void PrintTo(const SyncData& sync_data, std::ostream* os) { - *os << sync_data.ToString(); -} diff --git a/chrome/browser/sync/api/sync_data.h b/chrome/browser/sync/api/sync_data.h deleted file mode 100644 index 3fcc738..0000000 --- a/chrome/browser/sync/api/sync_data.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef CHROME_BROWSER_SYNC_API_SYNC_DATA_H_ -#define CHROME_BROWSER_SYNC_API_SYNC_DATA_H_ -#pragma once - -#include <iosfwd> -#include <string> -#include <vector> - -#include "base/basictypes.h" -#include "sync/syncable/model_type.h" -#include "sync/util/immutable.h" - -namespace sync_pb { -class EntitySpecifics; -class SyncEntity; -} // namespace sync_pb - -typedef syncable::ModelType SyncDataType; - -// A light-weight container for immutable sync data. Pass-by-value and storage -// in STL containers are supported and encouraged if helpful. -class SyncData { - public: - // Creates an empty and invalid SyncData. - SyncData(); - ~SyncData(); - - // Default copy and assign welcome. - - // Helper methods for creating SyncData objects for local data. - // The sync tag must be a string unique to this datatype and is used as a node - // identifier server-side. - // For deletes: |datatype| must specify the datatype who node is being - // deleted. - // For adds/updates: the specifics must be valid and the non-unique title (can - // be the same as sync tag) must be specfied. - // Note: the non_unique_title is primarily for debug purposes, and will be - // overwritten if the datatype is encrypted. - static SyncData CreateLocalDelete( - const std::string& sync_tag, - syncable::ModelType datatype); - static SyncData CreateLocalData( - const std::string& sync_tag, - const std::string& non_unique_title, - const sync_pb::EntitySpecifics& specifics); - - // Helper method for creating SyncData objects originating from the syncer. - static SyncData CreateRemoteData( - int64 id, const sync_pb::EntitySpecifics& specifics); - - // Whether this SyncData holds valid data. The only way to have a SyncData - // without valid data is to use the default constructor. - bool IsValid() const; - - // Return the datatype we're holding information about. Derived from the sync - // datatype specifics. - SyncDataType GetDataType() const; - - // Return the current sync datatype specifics. - const sync_pb::EntitySpecifics& GetSpecifics() const; - - // Returns the value of the unique client tag. This is only set for data going - // TO the syncer, not coming from. - const std::string& GetTag() const; - - // Returns the non unique title (for debugging). Currently only set for data - // going TO the syncer, not from. - const std::string& GetTitle() const; - - // Should only be called by sync code when IsLocal() is false. - int64 GetRemoteId() const; - - // Whether this sync data is for local data or data coming from the syncer. - bool IsLocal() const; - - std::string ToString() const; - - // TODO(zea): Query methods for other sync properties: parent, successor, etc. - - private: - // Necessary since we forward-declare sync_pb::SyncEntity; see - // comments in immutable.h. - struct ImmutableSyncEntityTraits { - typedef sync_pb::SyncEntity* Wrapper; - - static void InitializeWrapper(Wrapper* wrapper); - - static void DestroyWrapper(Wrapper* wrapper); - - static const sync_pb::SyncEntity& Unwrap(const Wrapper& wrapper); - - static sync_pb::SyncEntity* UnwrapMutable(Wrapper* wrapper); - - static void Swap(sync_pb::SyncEntity* t1, sync_pb::SyncEntity* t2); - }; - - typedef browser_sync::Immutable< - sync_pb::SyncEntity, ImmutableSyncEntityTraits> - ImmutableSyncEntity; - - // Clears |entity|. - SyncData(int64 id, sync_pb::SyncEntity* entity); - - // Whether this SyncData holds valid data. - bool is_valid_; - - // Equal to sync_api::kInvalidId iff this is local. - int64 id_; - - // The actual shared sync entity being held. - ImmutableSyncEntity immutable_entity_; -}; - -// gmock printer helper. -void PrintTo(const SyncData& sync_data, std::ostream* os); - -#endif // CHROME_BROWSER_SYNC_API_SYNC_DATA_H_ diff --git a/chrome/browser/sync/api/sync_error.cc b/chrome/browser/sync/api/sync_error.cc deleted file mode 100644 index b48e5bc..0000000 --- a/chrome/browser/sync/api/sync_error.cc +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2012 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. - -#include "chrome/browser/sync/api/sync_error.h" - -#include <ostream> - -#include "base/location.h" -#include "base/logging.h" -#include "sync/syncable/model_type.h" - -SyncError::SyncError() { - Clear(); -} - -SyncError::SyncError(const tracked_objects::Location& location, - const std::string& message, - syncable::ModelType type) { - Init(location, message, type); - PrintLogError(); -} - -SyncError::SyncError(const SyncError& other) { - Copy(other); -} - -SyncError::~SyncError() { -} - -SyncError& SyncError::operator=(const SyncError& other) { - if (this == &other) { - return *this; - } - Copy(other); - return *this; -} - -void SyncError::Copy(const SyncError& other) { - if (other.IsSet()) { - Init(other.location(), - other.message(), - other.type()); - } else { - Clear(); - } -} - -void SyncError::Clear() { - location_.reset(); - message_ = std::string(); - type_ = syncable::UNSPECIFIED; -} - -void SyncError::Reset(const tracked_objects::Location& location, - const std::string& message, - syncable::ModelType type) { - Init(location, message, type); - PrintLogError(); -} - -void SyncError::Init(const tracked_objects::Location& location, - const std::string& message, - syncable::ModelType type) { - location_.reset(new tracked_objects::Location(location)); - message_ = message; - type_ = type; -} - -bool SyncError::IsSet() const { - return location_.get() != NULL; -} - - -const tracked_objects::Location& SyncError::location() const { - CHECK(IsSet()); - return *location_; -} - -const std::string& SyncError::message() const { - CHECK(IsSet()); - return message_; -} - -syncable::ModelType SyncError::type() const { - CHECK(IsSet()); - return type_; -} - -std::string SyncError::ToString() const { - if (!IsSet()) { - return std::string(); - } - return location_->ToString() + ", " + syncable::ModelTypeToString(type_) + - ", Sync Error: " + message_; -} - -void SyncError::PrintLogError() const { - LAZY_STREAM(logging::LogMessage(location_->file_name(), - location_->line_number(), - logging::LOG_ERROR).stream(), - LOG_IS_ON(ERROR)) - << syncable::ModelTypeToString(type_) << ", Sync Error: " << message_; -} - -void PrintTo(const SyncError& sync_error, std::ostream* os) { - *os << sync_error.ToString(); -} diff --git a/chrome/browser/sync/api/sync_error.h b/chrome/browser/sync/api/sync_error.h deleted file mode 100644 index 95a2206..0000000 --- a/chrome/browser/sync/api/sync_error.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef CHROME_BROWSER_SYNC_API_SYNC_ERROR_H_ -#define CHROME_BROWSER_SYNC_API_SYNC_ERROR_H_ -#pragma once - -#include <iosfwd> -#include <string> - -#include "base/memory/scoped_ptr.h" -#include "sync/syncable/model_type.h" - -namespace tracked_objects { -class Location; -} // namespace tracked_objects - -// Sync errors are used for debug purposes and handled internally and/or -// exposed through Chrome's "about:sync" internal page. They are considered -// unrecoverable for the datatype creating them, and should only be used as -// such. -// This class is copy-friendly and thread-safe. -class SyncError { - public: - // Default constructor refers to "no error", and IsSet() will return false. - SyncError(); - - // Create a new Sync error triggered by datatype |type| with debug message - // |message| from the specified location. IsSet() will return true. - // Will print the new error to LOG(ERROR). - SyncError(const tracked_objects::Location& location, - const std::string& message, - syncable::ModelType type); - - // Copy and assign via deep copy. - SyncError(const SyncError& other); - SyncError& operator=(const SyncError& other); - - ~SyncError(); - - // Reset the current error to a new error. May be called irrespective of - // whether IsSet() is true. After this is called, IsSet() will return true. - // Will print the new error to LOG(ERROR). - void Reset(const tracked_objects::Location& location, - const std::string& message, - syncable::ModelType type); - - // Whether this is a valid error or not. - bool IsSet() const; - - // These must only be called if IsSet() is true. - const tracked_objects::Location& location() const; - const std::string& message() const; - syncable::ModelType type() const; - - // Returns empty string is IsSet() is false. - std::string ToString() const; - private: - // Print error information to log. - void PrintLogError() const; - - // Make a copy of a SyncError. If other.IsSet() == false, this->IsSet() will - // now return false. - void Copy(const SyncError& other); - - // Initialize the local error data with the specified error data. After this - // is called, IsSet() will return true. - void Init(const tracked_objects::Location& location, - const std::string& message, - syncable::ModelType type); - - // Reset the error to it's default (unset) values. - void Clear(); - - // scoped_ptr is necessary because Location objects aren't assignable. - scoped_ptr<tracked_objects::Location> location_; - std::string message_; - syncable::ModelType type_; -}; - -// gmock printer helper. -void PrintTo(const SyncError& sync_error, std::ostream* os); - -#endif // CHROME_BROWSER_SYNC_API_SYNC_ERROR_H_ diff --git a/chrome/browser/sync/api/sync_error_factory.cc b/chrome/browser/sync/api/sync_error_factory.cc deleted file mode 100644 index efc3627..0000000 --- a/chrome/browser/sync/api/sync_error_factory.cc +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2012 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. - -#include "chrome/browser/sync/api/sync_error_factory.h" - -SyncErrorFactory::SyncErrorFactory() { -} - -SyncErrorFactory::~SyncErrorFactory() { -} diff --git a/chrome/browser/sync/api/sync_error_factory.h b/chrome/browser/sync/api/sync_error_factory.h deleted file mode 100644 index 05ea918..0000000 --- a/chrome/browser/sync/api/sync_error_factory.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef CHROME_BROWSER_SYNC_API_SYNC_ERROR_FACTORY_H_ -#define CHROME_BROWSER_SYNC_API_SYNC_ERROR_FACTORY_H_ -#pragma once - -#include <string> - -#include "base/location.h" -#include "chrome/browser/sync/api/sync_error.h" - -class SyncErrorFactory { - public: - SyncErrorFactory(); - virtual ~SyncErrorFactory(); - - // Creates a SyncError object and uploads this call stack to breakpad. - virtual SyncError CreateAndUploadError( - const tracked_objects::Location& location, - const std::string& message) = 0; -}; - -#endif // CHROME_BROWSER_SYNC_API_SYNC_ERROR_FACTORY_H_ - diff --git a/chrome/browser/sync/api/sync_error_factory_mock.cc b/chrome/browser/sync/api/sync_error_factory_mock.cc deleted file mode 100644 index edb1092..0000000 --- a/chrome/browser/sync/api/sync_error_factory_mock.cc +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012 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. - -#include "chrome/browser/sync/api/sync_error_factory_mock.h" - -SyncErrorFactoryMock::SyncErrorFactoryMock() { -} - -SyncErrorFactoryMock::~SyncErrorFactoryMock() { -} - diff --git a/chrome/browser/sync/api/sync_error_factory_mock.h b/chrome/browser/sync/api/sync_error_factory_mock.h deleted file mode 100644 index 555b7b9..0000000 --- a/chrome/browser/sync/api/sync_error_factory_mock.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef CHROME_BROWSER_SYNC_API_SYNC_ERROR_FACTORY_MOCK_H_ -#define CHROME_BROWSER_SYNC_API_SYNC_ERROR_FACTORY_MOCK_H_ -#pragma once - -#include "chrome/browser/sync/api/sync_error_factory.h" - -#include "testing/gmock/include/gmock/gmock.h" - -class SyncErrorFactoryMock : public SyncErrorFactory { - public: - SyncErrorFactoryMock(); - virtual ~SyncErrorFactoryMock(); - - MOCK_METHOD2(CreateAndUploadError, SyncError( - const tracked_objects::Location& location, - const std::string& message)); -}; - -#endif // CHROME_BROWSER_SYNC_API_SYNC_ERROR_FACTORY_MOCK_H_ diff --git a/chrome/browser/sync/api/sync_error_unittest.cc b/chrome/browser/sync/api/sync_error_unittest.cc deleted file mode 100644 index a1f3c71..0000000 --- a/chrome/browser/sync/api/sync_error_unittest.cc +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2011 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. - -#include "chrome/browser/sync/api/sync_error.h" - -#include <string> - -#include "base/location.h" -#include "testing/gtest/include/gtest/gtest.h" - -using std::string; -using syncable::ModelType; - -namespace { - -typedef testing::Test SyncErrorTest; - -TEST_F(SyncErrorTest, Unset) { - SyncError error; - EXPECT_FALSE(error.IsSet()); -} - -TEST_F(SyncErrorTest, Default) { - tracked_objects::Location location = FROM_HERE; - std::string msg = "test"; - ModelType type = syncable::PREFERENCES; - SyncError error(location, msg, type); - ASSERT_TRUE(error.IsSet()); - EXPECT_EQ(location.line_number(), error.location().line_number()); - EXPECT_EQ(msg, error.message()); - EXPECT_EQ(type, error.type()); -} - -TEST_F(SyncErrorTest, Reset) { - tracked_objects::Location location = FROM_HERE; - std::string msg = "test"; - ModelType type = syncable::PREFERENCES; - - SyncError error; - EXPECT_FALSE(error.IsSet()); - - error.Reset(location, msg, type); - ASSERT_TRUE(error.IsSet()); - EXPECT_EQ(location.line_number(), error.location().line_number()); - EXPECT_EQ(msg, error.message()); - EXPECT_EQ(type, error.type()); - - tracked_objects::Location location2 = FROM_HERE; - std::string msg2 = "test"; - ModelType type2 = syncable::PREFERENCES; - error.Reset(location2, msg2, type2); - ASSERT_TRUE(error.IsSet()); - EXPECT_EQ(location2.line_number(), error.location().line_number()); - EXPECT_EQ(msg2, error.message()); - EXPECT_EQ(type2, error.type()); -} - -TEST_F(SyncErrorTest, Copy) { - tracked_objects::Location location = FROM_HERE; - std::string msg = "test"; - ModelType type = syncable::PREFERENCES; - - SyncError error1; - EXPECT_FALSE(error1.IsSet()); - SyncError error2(error1); - EXPECT_FALSE(error2.IsSet()); - - error1.Reset(location, msg, type); - ASSERT_TRUE(error1.IsSet()); - EXPECT_EQ(location.line_number(), error1.location().line_number()); - EXPECT_EQ(msg, error1.message()); - EXPECT_EQ(type, error1.type()); - - SyncError error3(error1); - ASSERT_TRUE(error3.IsSet()); - EXPECT_EQ(error1.location().line_number(), error3.location().line_number()); - EXPECT_EQ(error1.message(), error3.message()); - EXPECT_EQ(error1.type(), error3.type()); - - SyncError error4; - EXPECT_FALSE(error4.IsSet()); - SyncError error5(error4); - EXPECT_FALSE(error5.IsSet()); -} - -TEST_F(SyncErrorTest, Assign) { - tracked_objects::Location location = FROM_HERE; - std::string msg = "test"; - ModelType type = syncable::PREFERENCES; - - SyncError error1; - EXPECT_FALSE(error1.IsSet()); - SyncError error2; - error2 = error1; - EXPECT_FALSE(error2.IsSet()); - - error1.Reset(location, msg, type); - ASSERT_TRUE(error1.IsSet()); - EXPECT_EQ(location.line_number(), error1.location().line_number()); - EXPECT_EQ(msg, error1.message()); - EXPECT_EQ(type, error1.type()); - - error2 = error1; - ASSERT_TRUE(error2.IsSet()); - EXPECT_EQ(error1.location().line_number(), error2.location().line_number()); - EXPECT_EQ(error1.message(), error2.message()); - EXPECT_EQ(error1.type(), error2.type()); - - error2 = SyncError(); - EXPECT_FALSE(error2.IsSet()); -} - -TEST_F(SyncErrorTest, ToString) { - tracked_objects::Location location = FROM_HERE; - std::string msg = "test"; - ModelType type = syncable::PREFERENCES; - std::string expected = "Preferences, Sync Error: test"; - SyncError error(location, msg, type); - EXPECT_TRUE(error.IsSet()); - EXPECT_NE(string::npos, error.ToString().find(expected)); - - SyncError error2; - EXPECT_FALSE(error2.IsSet()); - EXPECT_EQ(std::string(), error2.ToString()); - - error2 = error; - EXPECT_TRUE(error2.IsSet()); - EXPECT_NE(string::npos, error.ToString().find(expected)); -} - -} // namespace diff --git a/chrome/browser/sync/api/syncable_service.cc b/chrome/browser/sync/api/syncable_service.cc deleted file mode 100644 index f94a857..0000000 --- a/chrome/browser/sync/api/syncable_service.cc +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2011 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. - -#include "chrome/browser/sync/api/syncable_service.h" - -SyncableService::~SyncableService() {} diff --git a/chrome/browser/sync/api/syncable_service.h b/chrome/browser/sync/api/syncable_service.h deleted file mode 100644 index 800bdc3..0000000 --- a/chrome/browser/sync/api/syncable_service.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ -#define CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ -#pragma once - -#include <vector> - -#include "base/compiler_specific.h" -#include "base/memory/scoped_ptr.h" -#include "base/memory/weak_ptr.h" -#include "chrome/browser/sync/api/sync_change_processor.h" -#include "chrome/browser/sync/api/sync_data.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "sync/syncable/model_type.h" - -class SyncErrorFactory; - -typedef std::vector<SyncData> SyncDataList; - -// TODO(zea): remove SupportsWeakPtr in favor of having all SyncableService -// implementers provide a way of getting a weak pointer to themselves. -// See crbug.com/100114. -class SyncableService : public SyncChangeProcessor, - public base::SupportsWeakPtr<SyncableService> { - public: - // Informs the service to begin syncing the specified synced datatype |type|. - // The service should then merge |initial_sync_data| into it's local data, - // calling |sync_processor|'s ProcessSyncChanges as necessary to reconcile the - // two. After this, the SyncableService's local data should match the server - // data, and the service should be ready to receive and process any further - // SyncChange's as they occur. - // Returns: A default SyncError (IsSet() == false) if no errors were - // encountered, and a filled SyncError (IsSet() == true) - // otherwise. - virtual SyncError MergeDataAndStartSyncing( - syncable::ModelType type, - const SyncDataList& initial_sync_data, - scoped_ptr<SyncChangeProcessor> sync_processor, - scoped_ptr<SyncErrorFactory> error_handler) = 0; - - // Stop syncing the specified type and reset state. - virtual void StopSyncing(syncable::ModelType type) = 0; - - // Fills a list of SyncData from the local data. This should create an up - // to date representation of the SyncableService's view of that datatype, and - // should match/be a subset of the server's view of that datatype. - virtual SyncDataList GetAllSyncData(syncable::ModelType type) const = 0; - - // SyncChangeProcessor interface. - // Process a list of new SyncChanges and update the local data as necessary. - // Returns: A default SyncError (IsSet() == false) if no errors were - // encountered, and a filled SyncError (IsSet() == true) - // otherwise. - virtual SyncError ProcessSyncChanges( - const tracked_objects::Location& from_here, - const SyncChangeList& change_list) OVERRIDE = 0; - - protected: - virtual ~SyncableService(); -}; - -#endif // CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ diff --git a/chrome/browser/sync/glue/app_notification_data_type_controller.cc b/chrome/browser/sync/glue/app_notification_data_type_controller.cc index c907110..9278b60 100644 --- a/chrome/browser/sync/glue/app_notification_data_type_controller.cc +++ b/chrome/browser/sync/glue/app_notification_data_type_controller.cc @@ -5,15 +5,15 @@ #include "chrome/browser/sync/glue/app_notification_data_type_controller.h" #include "base/metrics/histogram.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/browser/extensions/app_notification_manager.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/sync/api/syncable_service.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/glue/generic_change_processor.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/common/chrome_notification_types.h" #include "content/public/browser/notification_source.h" +#include "sync/api/syncable_service.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc b/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc index 98a358f0..3a1d674 100644 --- a/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc @@ -9,7 +9,6 @@ #include "base/tracked_objects.h" #include "chrome/browser/extensions/app_notification_manager.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/sync/api/fake_syncable_service.h" #include "chrome/browser/sync/glue/app_notification_data_type_controller.h" #include "chrome/browser/sync/glue/data_type_controller_mock.h" #include "chrome/browser/sync/glue/fake_generic_change_processor.h" @@ -19,6 +18,7 @@ #include "chrome/test/base/testing_profile.h" #include "content/public/browser/notification_service.h" #include "content/test/test_browser_thread.h" +#include "sync/api/fake_syncable_service.h" #include "testing/gtest/include/gtest/gtest.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc index ac24c0e..7e3cbce 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc @@ -7,13 +7,13 @@ #include "base/bind.h" #include "base/metrics/histogram.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/browser/webdata/web_data_service_factory.h" #include "chrome/common/chrome_notification_types.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_source.h" +#include "sync/api/sync_error.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc index be9d27d..32330a9 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc @@ -7,7 +7,6 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/autofill_data_type_controller.h" #include "chrome/browser/sync/glue/data_type_controller_mock.h" #include "chrome/browser/sync/glue/shared_change_processor_mock.h" @@ -21,6 +20,7 @@ #include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "content/test/test_browser_thread.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc index 0c04694..c32d1bb 100644 --- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc +++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc @@ -9,8 +9,6 @@ #include "chrome/browser/autofill/personal_data_manager.h" #include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/webdata/web_data_service.h" @@ -19,6 +17,8 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" +#include "sync/api/sync_error.h" +#include "sync/api/syncable_service.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc index a6b0d7e..ed987c2 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc @@ -11,7 +11,6 @@ #include "base/message_loop.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" #include "chrome/browser/sync/glue/change_processor_mock.h" #include "chrome/browser/sync/glue/data_type_controller_mock.h" @@ -23,6 +22,7 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "content/test/test_browser_thread.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" using browser_sync::BookmarkDataTypeController; diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc index a626265..86cac94 100644 --- a/chrome/browser/sync/glue/bookmark_model_associator.cc +++ b/chrome/browser/sync/glue/bookmark_model_associator.cc @@ -14,9 +14,9 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/bookmark_change_processor.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/read_node.h" #include "sync/internal_api/read_transaction.h" #include "sync/internal_api/write_node.h" diff --git a/chrome/browser/sync/glue/data_type_controller_mock.h b/chrome/browser/sync/glue/data_type_controller_mock.h index f6bae35..71e4eea 100644 --- a/chrome/browser/sync/glue/data_type_controller_mock.h +++ b/chrome/browser/sync/glue/data_type_controller_mock.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_CONTROLLER_MOCK_H__ #pragma once -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/data_type_controller.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/data_type_error_handler.h b/chrome/browser/sync/glue/data_type_error_handler.h index 5334d98..d685eff 100644 --- a/chrome/browser/sync/glue/data_type_error_handler.h +++ b/chrome/browser/sync/glue/data_type_error_handler.h @@ -9,9 +9,9 @@ #include <string> #include "base/location.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "sync/util/unrecoverable_error_handler.h" +#include "sync/api/sync_error.h" #include "sync/syncable/model_type.h" +#include "sync/util/unrecoverable_error_handler.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/data_type_manager.h b/chrome/browser/sync/glue/data_type_manager.h index 991066f..88e05c9 100644 --- a/chrome/browser/sync/glue/data_type_manager.h +++ b/chrome/browser/sync/glue/data_type_manager.h @@ -10,8 +10,8 @@ #include <set> #include <string> -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/data_type_controller.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/configure_reason.h" #include "sync/syncable/model_type.h" diff --git a/chrome/browser/sync/glue/data_type_manager_mock.h b/chrome/browser/sync/glue/data_type_manager_mock.h index 943f656..c4d69a0 100644 --- a/chrome/browser/sync/glue/data_type_manager_mock.h +++ b/chrome/browser/sync/glue/data_type_manager_mock.h @@ -6,12 +6,12 @@ #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_MOCK_H__ #pragma once -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/data_type_manager.h" #include "chrome/browser/sync/profile_sync_test_util.h" -#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" ACTION_P2(InvokeCallback, datatype, callback_result) { diff --git a/chrome/browser/sync/glue/extension_setting_data_type_controller.cc b/chrome/browser/sync/glue/extension_setting_data_type_controller.cc index f29adaf0..7ce982a 100644 --- a/chrome/browser/sync/glue/extension_setting_data_type_controller.cc +++ b/chrome/browser/sync/glue/extension_setting_data_type_controller.cc @@ -9,10 +9,10 @@ #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_system.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/sync/glue/generic_change_processor.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/syncable_service.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/fake_generic_change_processor.cc b/chrome/browser/sync/glue/fake_generic_change_processor.cc index e66662a..a7af21b 100644 --- a/chrome/browser/sync/glue/fake_generic_change_processor.cc +++ b/chrome/browser/sync/glue/fake_generic_change_processor.cc @@ -6,7 +6,7 @@ #include "base/location.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/sync/api/syncable_service.h" +#include "sync/api/syncable_service.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/fake_generic_change_processor.h b/chrome/browser/sync/glue/fake_generic_change_processor.h index c77354c..1e2cdb7 100644 --- a/chrome/browser/sync/glue/fake_generic_change_processor.h +++ b/chrome/browser/sync/glue/fake_generic_change_processor.h @@ -8,7 +8,7 @@ #include "chrome/browser/sync/glue/generic_change_processor.h" -#include "chrome/browser/sync/api/sync_error.h" +#include "sync/api/sync_error.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/frontend_data_type_controller.cc b/chrome/browser/sync/glue/frontend_data_type_controller.cc index 18b6259..38a18c5 100644 --- a/chrome/browser/sync/glue/frontend_data_type_controller.cc +++ b/chrome/browser/sync/glue/frontend_data_type_controller.cc @@ -6,13 +6,13 @@ #include "base/logging.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/change_processor.h" #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h" #include "chrome/browser/sync/glue/model_associator.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_error.h" #include "sync/syncable/model_type.h" #include "sync/util/data_type_histogram.h" diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_mock.h b/chrome/browser/sync/glue/frontend_data_type_controller_mock.h index ac6852c..5c822f3 100644 --- a/chrome/browser/sync/glue/frontend_data_type_controller_mock.h +++ b/chrome/browser/sync/glue/frontend_data_type_controller_mock.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_SYNC_GLUE_FRONTEND_DATA_TYPE_CONTROLLER_MOCK_H__ #pragma once -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/frontend_data_type_controller.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/generic_change_processor.cc b/chrome/browser/sync/glue/generic_change_processor.cc index 3317c89..a8accd9 100644 --- a/chrome/browser/sync/glue/generic_change_processor.cc +++ b/chrome/browser/sync/glue/generic_change_processor.cc @@ -7,10 +7,10 @@ #include "base/location.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_error.h" +#include "sync/api/syncable_service.h" #include "sync/internal_api/base_node.h" #include "sync/internal_api/change_record.h" #include "sync/internal_api/read_node.h" diff --git a/chrome/browser/sync/glue/generic_change_processor.h b/chrome/browser/sync/glue/generic_change_processor.h index 6b9d205..a14da71 100644 --- a/chrome/browser/sync/glue/generic_change_processor.h +++ b/chrome/browser/sync/glue/generic_change_processor.h @@ -11,10 +11,10 @@ #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" #include "base/threading/non_thread_safe.h" -#include "chrome/browser/sync/api/sync_change_processor.h" #include "chrome/browser/sync/glue/change_processor.h" #include "chrome/browser/sync/glue/data_type_controller.h" #include "chrome/browser/sync/glue/data_type_error_handler.h" +#include "sync/api/sync_change_processor.h" class SyncData; class SyncableService; diff --git a/chrome/browser/sync/glue/model_associator.h b/chrome/browser/sync/glue/model_associator.h index 0811a79..5931488 100644 --- a/chrome/browser/sync/glue/model_associator.h +++ b/chrome/browser/sync/glue/model_associator.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/synchronization/lock.h" -#include "chrome/browser/sync/api/sync_error.h" +#include "sync/api/sync_error.h" #include "sync/syncable/model_type.h" namespace sync_api { diff --git a/chrome/browser/sync/glue/model_associator_mock.h b/chrome/browser/sync/glue/model_associator_mock.h index 5b19ca7..7697705 100644 --- a/chrome/browser/sync/glue/model_associator_mock.h +++ b/chrome/browser/sync/glue/model_associator_mock.h @@ -7,8 +7,8 @@ #pragma once #include "base/location.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/model_associator.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc index d635660..c0c9dbd 100644 --- a/chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc +++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc @@ -5,12 +5,12 @@ #include "chrome/browser/sync/glue/new_non_frontend_data_type_controller.h" #include "base/logging.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/sync/glue/shared_change_processor_ref.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_error.h" +#include "sync/api/syncable_service.h" #include "sync/syncable/model_type.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h index 820b6e6..b6f6aae 100644 --- a/chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h +++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_MOCK_H_ #pragma once -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/new_non_frontend_data_type_controller.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc index eeea983..dfc8292 100644 --- a/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc @@ -13,7 +13,6 @@ #include "base/synchronization/waitable_event.h" #include "base/test/test_timeouts.h" #include "base/tracked_objects.h" -#include "chrome/browser/sync/api/fake_syncable_service.h" #include "chrome/browser/sync/glue/data_type_controller_mock.h" #include "chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h" #include "chrome/browser/sync/glue/shared_change_processor_mock.h" @@ -21,6 +20,7 @@ #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.h" #include "content/test/test_browser_thread.h" +#include "sync/api/fake_syncable_service.h" #include "sync/engine/model_safe_worker.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc index 4b1cd92..ec4efea 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc @@ -9,13 +9,13 @@ #include "base/logging.h" #include "base/threading/thread_restrictions.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/change_processor.h" #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h" #include "chrome/browser/sync/glue/model_associator.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_error.h" #include "sync/syncable/model_type.h" #include "sync/util/data_type_histogram.h" diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_mock.h b/chrome/browser/sync/glue/non_frontend_data_type_controller_mock.h index 86ac893..bc7a8cd 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller_mock.h +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_mock.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_SYNC_GLUE_NON_FRONTEND_DATA_TYPE_CONTROLLER_MOCK_H__ #pragma once -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/non_frontend_data_type_controller.h" +#include "sync/api/sync_error.h" #include "testing/gmock/include/gmock/gmock.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/password_data_type_controller.cc b/chrome/browser/sync/glue/password_data_type_controller.cc index e0f58b4..54aa4609 100644 --- a/chrome/browser/sync/glue/password_data_type_controller.cc +++ b/chrome/browser/sync/glue/password_data_type_controller.cc @@ -9,11 +9,11 @@ #include "chrome/browser/password_manager/password_store.h" #include "chrome/browser/password_manager/password_store_factory.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/webdata/web_data_service.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_error.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc index 75820eb..6565c27 100644 --- a/chrome/browser/sync/glue/password_model_associator.cc +++ b/chrome/browser/sync/glue/password_model_associator.cc @@ -10,9 +10,9 @@ #include "base/stl_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/password_manager/password_store.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/profile_sync_service.h" #include "net/base/escape.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/read_node.h" #include "sync/internal_api/read_transaction.h" #include "sync/internal_api/write_node.h" diff --git a/chrome/browser/sync/glue/search_engine_data_type_controller.cc b/chrome/browser/sync/glue/search_engine_data_type_controller.cc index 16728cc..1b81ff1 100644 --- a/chrome/browser/sync/glue/search_engine_data_type_controller.cc +++ b/chrome/browser/sync/glue/search_engine_data_type_controller.cc @@ -8,11 +8,11 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/common/chrome_notification_types.h" #include "content/public/browser/notification_source.h" +#include "sync/api/syncable_service.h" using content::BrowserThread; diff --git a/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc b/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc index 897bfe6..2a3c91d 100644 --- a/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc @@ -9,7 +9,6 @@ #include "base/tracked_objects.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/search_engines/template_url_service_test_util.h" -#include "chrome/browser/sync/api/fake_syncable_service.h" #include "chrome/browser/sync/glue/data_type_controller_mock.h" #include "chrome/browser/sync/glue/fake_generic_change_processor.h" #include "chrome/browser/sync/glue/search_engine_data_type_controller.h" @@ -18,6 +17,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/test/base/profile_mock.h" #include "content/public/browser/notification_service.h" +#include "sync/api/fake_syncable_service.h" #include "testing/gtest/include/gtest/gtest.h" using testing::_; diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc index cf146c8..9d82755 100644 --- a/chrome/browser/sync/glue/session_change_processor.cc +++ b/chrome/browser/sync/glue/session_change_processor.cc @@ -11,7 +11,6 @@ #include "chrome/browser/extensions/extension_tab_helper.h" #include "chrome/browser/history/history_notifications.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/session_model_associator.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h" @@ -23,6 +22,7 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/web_contents.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/change_record.h" #include "sync/internal_api/read_node.h" #include "sync/protocol/session_specifics.pb.h" diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc index af58629..b6f8648 100644 --- a/chrome/browser/sync/glue/session_model_associator.cc +++ b/chrome/browser/sync/glue/session_model_associator.cc @@ -17,7 +17,6 @@ #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_id.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/synced_session.h" #include "chrome/browser/sync/glue/synced_tab_delegate.h" #include "chrome/browser/sync/glue/synced_window_delegate.h" @@ -29,6 +28,7 @@ #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_service.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/read_node.h" #include "sync/internal_api/read_transaction.h" #include "sync/internal_api/write_node.h" diff --git a/chrome/browser/sync/glue/shared_change_processor.cc b/chrome/browser/sync/glue/shared_change_processor.cc index 2eed84a7..a75b355 100644 --- a/chrome/browser/sync/glue/shared_change_processor.cc +++ b/chrome/browser/sync/glue/shared_change_processor.cc @@ -4,11 +4,11 @@ #include "chrome/browser/sync/glue/shared_change_processor.h" -#include "chrome/browser/sync/api/sync_change.h" #include "chrome/browser/sync/glue/generic_change_processor.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_change.h" using base::AutoLock; using content::BrowserThread; diff --git a/chrome/browser/sync/glue/shared_change_processor.h b/chrome/browser/sync/glue/shared_change_processor.h index 17e24a1..e172ec9 100644 --- a/chrome/browser/sync/glue/shared_change_processor.h +++ b/chrome/browser/sync/glue/shared_change_processor.h @@ -11,10 +11,10 @@ #include "base/memory/weak_ptr.h" #include "base/message_loop_proxy.h" #include "base/synchronization/lock.h" -#include "chrome/browser/sync/api/sync_change_processor.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/browser/sync/glue/data_type_error_handler.h" +#include "sync/api/sync_change_processor.h" +#include "sync/api/sync_error.h" +#include "sync/api/sync_error_factory.h" #include "sync/engine/model_safe_worker.h" class ProfileSyncComponentsFactory; diff --git a/chrome/browser/sync/glue/shared_change_processor_mock.h b/chrome/browser/sync/glue/shared_change_processor_mock.h index b373364..60219c0 100644 --- a/chrome/browser/sync/glue/shared_change_processor_mock.h +++ b/chrome/browser/sync/glue/shared_change_processor_mock.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_ #pragma once -#include "chrome/browser/sync/api/sync_change.h" #include "chrome/browser/sync/glue/shared_change_processor.h" +#include "sync/api/sync_change.h" #include "sync/util/unrecoverable_error_handler.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/chrome/browser/sync/glue/shared_change_processor_ref.h b/chrome/browser/sync/glue/shared_change_processor_ref.h index 6b79769..98185fc 100644 --- a/chrome/browser/sync/glue/shared_change_processor_ref.h +++ b/chrome/browser/sync/glue/shared_change_processor_ref.h @@ -8,9 +8,9 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" -#include "chrome/browser/sync/api/sync_change_processor.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/browser/sync/glue/shared_change_processor.h" +#include "sync/api/sync_change_processor.h" +#include "sync/api/sync_error_factory.h" namespace browser_sync { diff --git a/chrome/browser/sync/glue/shared_change_processor_unittest.cc b/chrome/browser/sync/glue/shared_change_processor_unittest.cc index 8279cdf..1812eb2 100644 --- a/chrome/browser/sync/glue/shared_change_processor_unittest.cc +++ b/chrome/browser/sync/glue/shared_change_processor_unittest.cc @@ -10,12 +10,12 @@ #include "base/bind_helpers.h" #include "base/compiler_specific.h" #include "base/message_loop.h" -#include "chrome/browser/sync/api/fake_syncable_service.h" -#include "chrome/browser/sync/profile_sync_components_factory_mock.h" #include "chrome/browser/sync/glue/data_type_error_handler_mock.h" #include "chrome/browser/sync/profile_sync_components_factory_impl.h" +#include "chrome/browser/sync/profile_sync_components_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "content/test/test_browser_thread.h" +#include "sync/api/fake_syncable_service.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/sync/glue/theme_model_associator.cc b/chrome/browser/sync/glue/theme_model_associator.cc index 99e0970..8ea538a3 100644 --- a/chrome/browser/sync/glue/theme_model_associator.cc +++ b/chrome/browser/sync/glue/theme_model_associator.cc @@ -8,10 +8,10 @@ #include "base/location.h" #include "base/logging.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/sync_backend_host.h" #include "chrome/browser/sync/glue/theme_util.h" #include "chrome/browser/sync/profile_sync_service.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/read_node.h" #include "sync/internal_api/read_transaction.h" #include "sync/internal_api/write_node.h" diff --git a/chrome/browser/sync/glue/typed_url_model_associator.cc b/chrome/browser/sync/glue/typed_url_model_associator.cc index 3e659f6..ad90e63 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator.cc +++ b/chrome/browser/sync/glue/typed_url_model_associator.cc @@ -12,8 +12,8 @@ #include "base/metrics/histogram.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/history_backend.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/profile_sync_service.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/read_node.h" #include "sync/internal_api/read_transaction.h" #include "sync/internal_api/write_node.h" diff --git a/chrome/browser/sync/glue/ui_data_type_controller.cc b/chrome/browser/sync/glue/ui_data_type_controller.cc index 9066034..bcb1d61 100644 --- a/chrome/browser/sync/glue/ui_data_type_controller.cc +++ b/chrome/browser/sync/glue/ui_data_type_controller.cc @@ -6,12 +6,12 @@ #include "base/logging.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/sync/glue/shared_change_processor_ref.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_service.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/sync_error.h" +#include "sync/api/syncable_service.h" #include "sync/syncable/model_type.h" #include "sync/util/data_type_histogram.h" diff --git a/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc b/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc index 4a99e9b..f552a1e 100644 --- a/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc @@ -8,13 +8,13 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "base/tracked_objects.h" -#include "chrome/browser/sync/api/fake_syncable_service.h" #include "chrome/browser/sync/glue/data_type_controller_mock.h" #include "chrome/browser/sync/glue/fake_generic_change_processor.h" #include "chrome/browser/sync/profile_sync_components_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.h" #include "content/test/test_browser_thread.h" +#include "sync/api/fake_syncable_service.h" #include "testing/gtest/include/gtest/gtest.h" using content::BrowserThread; diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc index f3f5e0d..07e6ffd 100644 --- a/chrome/browser/sync/profile_sync_components_factory_impl.cc +++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc @@ -15,7 +15,6 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/signin/signin_manager.h" #include "chrome/browser/signin/signin_manager_factory.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/sync/glue/app_notification_data_type_controller.h" #include "chrome/browser/sync/glue/autofill_data_type_controller.h" #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" @@ -51,6 +50,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "content/public/browser/browser_thread.h" +#include "sync/api/syncable_service.h" using browser_sync::AppNotificationDataTypeController; using browser_sync::AutofillDataTypeController; diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 3e60514..fe3f3f7 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -30,7 +30,6 @@ #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/browser/signin/token_service.h" #include "chrome/browser/signin/token_service_factory.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/backend_migrator.h" #include "chrome/browser/sync/glue/change_processor.h" #include "chrome/browser/sync/glue/chrome_encryptor.h" @@ -57,6 +56,7 @@ #include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "net/cookies/cookie_monster.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/configure_reason.h" #include "sync/js/js_arg_list.h" #include "sync/js/js_event_details.h" diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc index 856e85f..21aa923 100644 --- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc @@ -22,7 +22,6 @@ #include "chrome/browser/bookmarks/base_bookmark_model_observer.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/sync/abstract_profile_sync_service_test.h" -#include "chrome/browser/sync/api/sync_error.h" #include "chrome/browser/sync/glue/bookmark_change_processor.h" #include "chrome/browser/sync/glue/bookmark_model_associator.h" #include "chrome/browser/sync/glue/data_type_error_handler.h" @@ -30,6 +29,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_profile.h" #include "content/test/test_browser_thread.h" +#include "sync/api/sync_error.h" #include "sync/internal_api/change_record.h" #include "sync/internal_api/read_node.h" #include "sync/internal_api/read_transaction.h" diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc index efd63db..618ccbd 100644 --- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc @@ -19,7 +19,6 @@ #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/browser/signin/token_service_factory.h" #include "chrome/browser/sync/abstract_profile_sync_service_test.h" -#include "chrome/browser/sync/api/sync_data.h" #include "chrome/browser/sync/glue/generic_change_processor.h" #include "chrome/browser/sync/glue/sync_backend_host.h" #include "chrome/browser/sync/glue/ui_data_type_controller.h" @@ -29,6 +28,7 @@ #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" +#include "sync/api/sync_data.h" #include "sync/internal_api/change_record.h" #include "sync/internal_api/read_node.h" #include "sync/internal_api/read_transaction.h" diff --git a/chrome/browser/webdata/autocomplete_syncable_service.cc b/chrome/browser/webdata/autocomplete_syncable_service.cc index fc9fe10..0110c3e 100644 --- a/chrome/browser/webdata/autocomplete_syncable_service.cc +++ b/chrome/browser/webdata/autocomplete_syncable_service.cc @@ -9,8 +9,6 @@ #include "base/rand_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/browser/webdata/autofill_table.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/browser/webdata/web_database.h" @@ -19,6 +17,8 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" #include "net/base/escape.h" +#include "sync/api/sync_error.h" +#include "sync/api/sync_error_factory.h" #include "sync/protocol/autofill_specifics.pb.h" #include "sync/protocol/sync.pb.h" diff --git a/chrome/browser/webdata/autocomplete_syncable_service.h b/chrome/browser/webdata/autocomplete_syncable_service.h index 84d35fa..d4ecbc6 100644 --- a/chrome/browser/webdata/autocomplete_syncable_service.h +++ b/chrome/browser/webdata/autocomplete_syncable_service.h @@ -14,15 +14,15 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/threading/non_thread_safe.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/sync_data.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/webdata/autofill_change.h" #include "chrome/browser/webdata/autofill_entry.h" #include "chrome/browser/webdata/web_data_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_data.h" +#include "sync/api/sync_error.h" +#include "sync/api/syncable_service.h" class ProfileSyncServiceAutofillTest; class SyncErrorFactory; diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.cc b/chrome/browser/webdata/autofill_profile_syncable_service.cc index f65327a..867bb16 100644 --- a/chrome/browser/webdata/autofill_profile_syncable_service.cc +++ b/chrome/browser/webdata/autofill_profile_syncable_service.cc @@ -10,8 +10,6 @@ #include "chrome/browser/autofill/autofill_profile.h" #include "chrome/browser/autofill/form_group.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/sync_error_factory.h" #include "chrome/browser/webdata/autofill_table.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/browser/webdata/web_database.h" @@ -20,6 +18,8 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" +#include "sync/api/sync_error.h" +#include "sync/api/sync_error_factory.h" #include "sync/protocol/sync.pb.h" using content::BrowserThread; diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.h b/chrome/browser/webdata/autofill_profile_syncable_service.h index db3aa5c..2da706c 100644 --- a/chrome/browser/webdata/autofill_profile_syncable_service.h +++ b/chrome/browser/webdata/autofill_profile_syncable_service.h @@ -14,15 +14,15 @@ #include "base/synchronization/lock.h" #include "base/threading/non_thread_safe.h" #include "chrome/browser/autofill/autofill_type.h" -#include "chrome/browser/sync/api/sync_change.h" -#include "chrome/browser/sync/api/sync_data.h" -#include "chrome/browser/sync/api/sync_error.h" -#include "chrome/browser/sync/api/syncable_service.h" #include "chrome/browser/webdata/autofill_change.h" #include "chrome/browser/webdata/autofill_entry.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_types.h" +#include "sync/api/sync_change.h" +#include "sync/api/sync_data.h" +#include "sync/api/sync_error.h" +#include "sync/api/syncable_service.h" #include "sync/protocol/autofill_specifics.pb.h" class AutofillProfile; diff --git a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc index 455340e..6ae8d90 100644 --- a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc +++ b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc @@ -6,11 +6,11 @@ #include "base/message_loop.h" #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/autofill_profile.h" -#include "chrome/browser/sync/api/sync_error_factory.h" -#include "chrome/browser/sync/api/sync_error_factory_mock.h" #include "chrome/browser/webdata/autofill_change.h" #include "chrome/browser/webdata/autofill_profile_syncable_service.h" #include "content/test/test_browser_thread.h" +#include "sync/api/sync_error_factory.h" +#include "sync/api/sync_error_factory_mock.h" #include "sync/syncable/syncable.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" |