summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 22:43:58 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 22:43:58 +0000
commit65f173550226cb0dcf577183a462d48c47764ee3 (patch)
tree9d4451edfc037f39658b804f95a3fbdbc85a7bd5
parent7953ef8eea2001287dbd233421226ad3f0e16448 (diff)
downloadchromium_src-65f173550226cb0dcf577183a462d48c47764ee3.zip
chromium_src-65f173550226cb0dcf577183a462d48c47764ee3.tar.gz
chromium_src-65f173550226cb0dcf577183a462d48c47764ee3.tar.bz2
[Sync] Rename csync namespace to syncer
Everyone was confused by 'csync'. 'syncer' seems more understandable. (Note that we can't use the 'sync' namespace since sync() is a function from unistd.h.) BUG=10662035 TEST= TBR=jhawkins@chromium.org,pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144820 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/app_notification_manager.cc72
-rw-r--r--chrome/browser/extensions/app_notification_manager.h32
-rw-r--r--chrome/browser/extensions/app_notification_manager_sync_unittest.cc212
-rw-r--r--chrome/browser/extensions/app_sync_bundle.cc35
-rw-r--r--chrome/browser/extensions/app_sync_bundle.h24
-rw-r--r--chrome/browser/extensions/app_sync_data.cc18
-rw-r--r--chrome/browser/extensions/app_sync_data.h14
-rw-r--r--chrome/browser/extensions/app_sync_data_unittest.cc14
-rw-r--r--chrome/browser/extensions/extension_service.cc30
-rw-r--r--chrome/browser/extensions/extension_service.h22
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc218
-rw-r--r--chrome/browser/extensions/extension_sync_bundle.cc34
-rw-r--r--chrome/browser/extensions/extension_sync_bundle.h24
-rw-r--r--chrome/browser/extensions/extension_sync_data.cc19
-rw-r--r--chrome/browser/extensions/extension_sync_data.h14
-rw-r--r--chrome/browser/extensions/extension_sync_data_unittest.cc10
-rw-r--r--chrome/browser/extensions/settings/setting_sync_data.cc18
-rw-r--r--chrome/browser/extensions/settings/setting_sync_data.h20
-rw-r--r--chrome/browser/extensions/settings/settings_apitest.cc44
-rw-r--r--chrome/browser/extensions/settings/settings_backend.cc32
-rw-r--r--chrome/browser/extensions/settings/settings_backend.h24
-rw-r--r--chrome/browser/extensions/settings/settings_frontend.cc2
-rw-r--r--chrome/browser/extensions/settings/settings_frontend.h5
-rw-r--r--chrome/browser/extensions/settings/settings_sync_processor.cc12
-rw-r--r--chrome/browser/extensions/settings/settings_sync_processor.h10
-rw-r--r--chrome/browser/extensions/settings/settings_sync_unittest.cc286
-rw-r--r--chrome/browser/extensions/settings/settings_sync_util.cc22
-rw-r--r--chrome/browser/extensions/settings/settings_sync_util.h10
-rw-r--r--chrome/browser/extensions/settings/syncable_settings_storage.cc58
-rw-r--r--chrome/browser/extensions/settings/syncable_settings_storage.h14
-rw-r--r--chrome/browser/extensions/test_extension_service.cc20
-rw-r--r--chrome/browser/extensions/test_extension_service.h16
-rw-r--r--chrome/browser/prefs/pref_model_associator.cc64
-rw-r--r--chrome/browser/prefs/pref_model_associator.h32
-rw-r--r--chrome/browser/prefs/pref_service.cc2
-rw-r--r--chrome/browser/prefs/pref_service.h8
-rw-r--r--chrome/browser/search_engines/template_url_service.cc133
-rw-r--r--chrome/browser/search_engines/template_url_service.h47
-rw-r--r--chrome/browser/search_engines/template_url_service_sync_unittest.cc385
-rw-r--r--chrome/browser/sync/DEPS2
-rw-r--r--chrome/browser/sync/abstract_profile_sync_service_test.cc24
-rw-r--r--chrome/browser/sync/abstract_profile_sync_service_test.h18
-rw-r--r--chrome/browser/sync/backend_migrator.cc12
-rw-r--r--chrome/browser/sync/backend_migrator.h8
-rw-r--r--chrome/browser/sync/backend_migrator_unittest.cc28
-rw-r--r--chrome/browser/sync/backend_unrecoverable_error_handler.cc2
-rw-r--r--chrome/browser/sync/backend_unrecoverable_error_handler.h6
-rw-r--r--chrome/browser/sync/failed_datatypes_handler.cc10
-rw-r--r--chrome/browser/sync/failed_datatypes_handler.h8
-rw-r--r--chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller.h2
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/autofill_profile_data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/autofill_profile_data_type_controller.h2
-rw-r--r--chrome/browser/sync/glue/backend_data_type_configurer.h2
-rw-r--r--chrome/browser/sync/glue/bookmark_change_processor.cc72
-rw-r--r--chrome/browser/sync/glue/bookmark_change_processor.h32
-rw-r--r--chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.cc104
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.h20
-rw-r--r--chrome/browser/sync/glue/bridged_sync_notifier.cc6
-rw-r--r--chrome/browser/sync/glue/bridged_sync_notifier.h10
-rw-r--r--chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc14
-rw-r--r--chrome/browser/sync/glue/browser_thread_model_worker.cc26
-rw-r--r--chrome/browser/sync/glue/browser_thread_model_worker.h28
-rw-r--r--chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc9
-rw-r--r--chrome/browser/sync/glue/change_processor.cc4
-rw-r--r--chrome/browser/sync/glue/change_processor.h14
-rw-r--r--chrome/browser/sync/glue/change_processor_mock.h6
-rw-r--r--chrome/browser/sync/glue/chrome_encryptor.h2
-rw-r--r--chrome/browser/sync/glue/chrome_extensions_activity_monitor.h8
-rw-r--r--chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc10
-rw-r--r--chrome/browser/sync/glue/chrome_sync_notification_bridge.cc14
-rw-r--r--chrome/browser/sync/glue/chrome_sync_notification_bridge.h8
-rw-r--r--chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc24
-rw-r--r--chrome/browser/sync/glue/data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/data_type_controller.h10
-rw-r--r--chrome/browser/sync/glue/data_type_controller_mock.h4
-rw-r--r--chrome/browser/sync/glue/data_type_error_handler.h4
-rw-r--r--chrome/browser/sync/glue/data_type_error_handler_mock.h2
-rw-r--r--chrome/browser/sync/glue/data_type_manager.cc2
-rw-r--r--chrome/browser/sync/glue/data_type_manager.h8
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl.cc26
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl.h14
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/data_type_manager_mock.h12
-rw-r--r--chrome/browser/sync/glue/extension_setting_data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/extension_setting_data_type_controller.h4
-rw-r--r--chrome/browser/sync/glue/fake_data_type_controller.cc12
-rw-r--r--chrome/browser/sync/glue/fake_data_type_controller.h2
-rw-r--r--chrome/browser/sync/glue/fake_generic_change_processor.cc14
-rw-r--r--chrome/browser/sync/glue/fake_generic_change_processor.h16
-rw-r--r--chrome/browser/sync/glue/frontend_data_type_controller.cc22
-rw-r--r--chrome/browser/sync/glue/frontend_data_type_controller.h8
-rw-r--r--chrome/browser/sync/glue/frontend_data_type_controller_mock.h4
-rw-r--r--chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc8
-rw-r--r--chrome/browser/sync/glue/generic_change_processor.cc192
-rw-r--r--chrome/browser/sync/glue/generic_change_processor.h36
-rw-r--r--chrome/browser/sync/glue/history_model_worker.cc18
-rw-r--r--chrome/browser/sync/glue/history_model_worker.h12
-rw-r--r--chrome/browser/sync/glue/model_association_manager.cc8
-rw-r--r--chrome/browser/sync/glue/model_association_manager.h8
-rw-r--r--chrome/browser/sync/glue/model_association_manager_unittest.cc24
-rw-r--r--chrome/browser/sync/glue/model_associator.h10
-rw-r--r--chrome/browser/sync/glue/model_associator_mock.h4
-rw-r--r--chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc34
-rw-r--r--chrome/browser/sync/glue/new_non_frontend_data_type_controller.h6
-rw-r--r--chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h10
-rw-r--r--chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc23
-rw-r--r--chrome/browser/sync/glue/non_frontend_data_type_controller.cc31
-rw-r--r--chrome/browser/sync/glue/non_frontend_data_type_controller.h10
-rw-r--r--chrome/browser/sync/glue/non_frontend_data_type_controller_mock.h8
-rw-r--r--chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc20
-rw-r--r--chrome/browser/sync/glue/password_change_processor.cc52
-rw-r--r--chrome/browser/sync/glue/password_change_processor.h12
-rw-r--r--chrome/browser/sync/glue/password_data_type_controller.cc6
-rw-r--r--chrome/browser/sync/glue/password_data_type_controller.h2
-rw-r--r--chrome/browser/sync/glue/password_model_associator.cc70
-rw-r--r--chrome/browser/sync/glue/password_model_associator.h16
-rw-r--r--chrome/browser/sync/glue/password_model_worker.cc14
-rw-r--r--chrome/browser/sync/glue/password_model_worker.h16
-rw-r--r--chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/session_change_processor.cc22
-rw-r--r--chrome/browser/sync/glue/session_change_processor.h10
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc142
-rw-r--r--chrome/browser/sync/glue/session_model_associator.h36
-rw-r--r--chrome/browser/sync/glue/session_model_associator_unittest.cc26
-rw-r--r--chrome/browser/sync/glue/shared_change_processor.cc28
-rw-r--r--chrome/browser/sync/glue/shared_change_processor.h21
-rw-r--r--chrome/browser/sync/glue/shared_change_processor_mock.h10
-rw-r--r--chrome/browser/sync/glue/shared_change_processor_ref.cc6
-rw-r--r--chrome/browser/sync/glue/shared_change_processor_ref.h16
-rw-r--r--chrome/browser/sync/glue/shared_change_processor_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc124
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.h106
-rw-r--r--chrome/browser/sync/glue/sync_backend_host_unittest.cc16
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar.cc60
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar.h26
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar_unittest.cc52
-rw-r--r--chrome/browser/sync/glue/theme_change_processor.cc22
-rw-r--r--chrome/browser/sync/glue/theme_change_processor.h10
-rw-r--r--chrome/browser/sync/glue/theme_data_type_controller_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/theme_model_associator.cc34
-rw-r--r--chrome/browser/sync/glue/theme_model_associator.h4
-rw-r--r--chrome/browser/sync/glue/typed_url_change_processor.cc48
-rw-r--r--chrome/browser/sync/glue/typed_url_change_processor.h12
-rw-r--r--chrome/browser/sync/glue/typed_url_data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/typed_url_data_type_controller.h2
-rw-r--r--chrome/browser/sync/glue/typed_url_model_associator.cc76
-rw-r--r--chrome/browser/sync/glue/typed_url_model_associator.h12
-rw-r--r--chrome/browser/sync/glue/typed_url_model_associator_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/ui_data_type_controller.cc32
-rw-r--r--chrome/browser/sync/glue/ui_data_type_controller.h10
-rw-r--r--chrome/browser/sync/glue/ui_data_type_controller_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/ui_model_worker.cc14
-rw-r--r--chrome/browser/sync/glue/ui_model_worker.h14
-rw-r--r--chrome/browser/sync/glue/ui_model_worker_unittest.cc8
-rw-r--r--chrome/browser/sync/invalidations/invalidator_storage.cc4
-rw-r--r--chrome/browser/sync/invalidations/invalidator_storage.h10
-rw-r--r--chrome/browser/sync/invalidations/invalidator_storage_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_components_factory.h8
-rw-r--r--chrome/browser/sync/profile_sync_components_factory_impl.cc16
-rw-r--r--chrome/browser/sync/profile_sync_components_factory_impl.h4
-rw-r--r--chrome/browser/sync/profile_sync_components_factory_mock.h4
-rw-r--r--chrome/browser/sync/profile_sync_service.cc122
-rw-r--r--chrome/browser/sync/profile_sync_service.h44
-rw-r--r--chrome/browser/sync/profile_sync_service_autofill_unittest.cc46
-rw-r--r--chrome/browser/sync/profile_sync_service_bookmark_unittest.cc124
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc16
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.h4
-rw-r--r--chrome/browser/sync/profile_sync_service_mock.h12
-rw-r--r--chrome/browser/sync/profile_sync_service_password_unittest.cc28
-rw-r--r--chrome/browser/sync/profile_sync_service_preference_unittest.cc60
-rw-r--r--chrome/browser/sync/profile_sync_service_session_unittest.cc74
-rw-r--r--chrome/browser/sync/profile_sync_service_startup_unittest.cc5
-rw-r--r--chrome/browser/sync/profile_sync_service_typed_url_unittest.cc26
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc20
-rw-r--r--chrome/browser/sync/retry_verifier.cc12
-rw-r--r--chrome/browser/sync/retry_verifier.h8
-rw-r--r--chrome/browser/sync/sync_ui_util.cc28
-rw-r--r--chrome/browser/sync/sync_ui_util_unittest.cc4
-rw-r--r--chrome/browser/sync/test/integration/enable_disable_test.cc14
-rw-r--r--chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc8
-rw-r--r--chrome/browser/sync/test/integration/sync_errors_test.cc16
-rw-r--r--chrome/browser/sync/test/integration/sync_test.cc38
-rw-r--r--chrome/browser/sync/test/integration/sync_test.h2
-rw-r--r--chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc6
-rw-r--r--chrome/browser/sync/test/test_http_bridge_factory.cc4
-rw-r--r--chrome/browser/sync/test/test_http_bridge_factory.h14
-rw-r--r--chrome/browser/sync/test_profile_sync_service.cc22
-rw-r--r--chrome/browser/sync/test_profile_sync_service.h6
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui.cc8
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui.h18
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui_unittest.cc4
-rw-r--r--chrome/browser/webdata/autocomplete_syncable_service.cc67
-rw-r--r--chrome/browser/webdata/autocomplete_syncable_service.h34
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service.cc63
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service.h30
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc49
-rw-r--r--sync/api/fake_syncable_service.cc4
-rw-r--r--sync/api/fake_syncable_service.h4
-rw-r--r--sync/api/sync_change.cc4
-rw-r--r--sync/api/sync_change.h4
-rw-r--r--sync/api/sync_change_processor.cc4
-rw-r--r--sync/api/sync_change_processor.h4
-rw-r--r--sync/api/sync_change_unittest.cc4
-rw-r--r--sync/api/sync_data.cc14
-rw-r--r--sync/api/sync_data.h8
-rw-r--r--sync/api/sync_error.cc4
-rw-r--r--sync/api/sync_error.h4
-rw-r--r--sync/api/sync_error_factory.cc4
-rw-r--r--sync/api/sync_error_factory.h4
-rw-r--r--sync/api/sync_error_factory_mock.cc4
-rw-r--r--sync/api/sync_error_factory_mock.h4
-rw-r--r--sync/api/sync_error_unittest.cc4
-rw-r--r--sync/api/syncable_service.cc4
-rw-r--r--sync/api/syncable_service.h4
-rw-r--r--sync/engine/all_status.cc14
-rw-r--r--sync/engine/all_status.h12
-rw-r--r--sync/engine/apply_updates_command.cc4
-rw-r--r--sync/engine/apply_updates_command.h4
-rw-r--r--sync/engine/apply_updates_command_unittest.cc6
-rw-r--r--sync/engine/build_commit_command.cc4
-rw-r--r--sync/engine/build_commit_command.h4
-rw-r--r--sync/engine/build_commit_command_unittest.cc4
-rw-r--r--sync/engine/cleanup_disabled_types_command.cc4
-rw-r--r--sync/engine/cleanup_disabled_types_command.h4
-rw-r--r--sync/engine/cleanup_disabled_types_command_unittest.cc4
-rw-r--r--sync/engine/commit.cc4
-rw-r--r--sync/engine/commit.h4
-rw-r--r--sync/engine/conflict_resolver.cc4
-rw-r--r--sync/engine/conflict_resolver.h4
-rw-r--r--sync/engine/download_updates_command.cc4
-rw-r--r--sync/engine/download_updates_command.h4
-rw-r--r--sync/engine/download_updates_command_unittest.cc4
-rw-r--r--sync/engine/get_commit_ids_command.cc4
-rw-r--r--sync/engine/get_commit_ids_command.h4
-rw-r--r--sync/engine/model_changing_syncer_command.cc4
-rw-r--r--sync/engine/model_changing_syncer_command.h6
-rw-r--r--sync/engine/model_changing_syncer_command_unittest.cc4
-rw-r--r--sync/engine/net/server_connection_manager.cc4
-rw-r--r--sync/engine/net/server_connection_manager.h4
-rw-r--r--sync/engine/net/url_translator.cc4
-rw-r--r--sync/engine/net/url_translator.h4
-rw-r--r--sync/engine/nigori_util.cc10
-rw-r--r--sync/engine/nigori_util.h8
-rw-r--r--sync/engine/nudge_source.cc4
-rw-r--r--sync/engine/nudge_source.h4
-rw-r--r--sync/engine/process_commit_response_command.cc4
-rw-r--r--sync/engine/process_commit_response_command.h4
-rw-r--r--sync/engine/process_commit_response_command_unittest.cc20
-rw-r--r--sync/engine/process_updates_command.cc4
-rw-r--r--sync/engine/process_updates_command.h4
-rw-r--r--sync/engine/process_updates_command_unittest.cc4
-rw-r--r--sync/engine/resolve_conflicts_command.cc4
-rw-r--r--sync/engine/resolve_conflicts_command.h4
-rw-r--r--sync/engine/resolve_conflicts_command_unittest.cc4
-rw-r--r--sync/engine/store_timestamps_command.cc4
-rw-r--r--sync/engine/store_timestamps_command.h4
-rw-r--r--sync/engine/sync_engine_event.cc4
-rw-r--r--sync/engine/sync_engine_event.h4
-rw-r--r--sync/engine/sync_scheduler.cc26
-rw-r--r--sync/engine/sync_scheduler.h8
-rw-r--r--sync/engine/sync_scheduler_unittest.cc4
-rw-r--r--sync/engine/sync_scheduler_whitebox_unittest.cc6
-rw-r--r--sync/engine/syncer.cc4
-rw-r--r--sync/engine/syncer.h4
-rw-r--r--sync/engine/syncer_command.cc4
-rw-r--r--sync/engine/syncer_command.h4
-rw-r--r--sync/engine/syncer_proto_util.cc78
-rw-r--r--sync/engine/syncer_proto_util.h8
-rw-r--r--sync/engine/syncer_proto_util_unittest.cc10
-rw-r--r--sync/engine/syncer_types.h4
-rw-r--r--sync/engine/syncer_unittest.cc14
-rw-r--r--sync/engine/syncer_util.cc4
-rw-r--r--sync/engine/syncer_util.h4
-rw-r--r--sync/engine/syncproto.h4
-rw-r--r--sync/engine/syncproto_unittest.cc4
-rw-r--r--sync/engine/throttled_data_type_tracker.cc4
-rw-r--r--sync/engine/throttled_data_type_tracker.h4
-rw-r--r--sync/engine/throttled_data_type_tracker_unittest.cc4
-rw-r--r--sync/engine/traffic_logger.cc4
-rw-r--r--sync/engine/traffic_logger.h4
-rw-r--r--sync/engine/traffic_recorder.cc4
-rw-r--r--sync/engine/traffic_recorder.h4
-rw-r--r--sync/engine/traffic_recorder_unittest.cc5
-rw-r--r--sync/engine/update_applicator.cc4
-rw-r--r--sync/engine/update_applicator.h4
-rw-r--r--sync/engine/verify_updates_command.cc6
-rw-r--r--sync/engine/verify_updates_command.h4
-rw-r--r--sync/engine/verify_updates_command_unittest.cc4
-rw-r--r--sync/internal_api/base_node.cc6
-rw-r--r--sync/internal_api/base_transaction.cc10
-rw-r--r--sync/internal_api/change_record.cc8
-rw-r--r--sync/internal_api/change_reorder_buffer.cc4
-rw-r--r--sync/internal_api/change_reorder_buffer.h4
-rw-r--r--sync/internal_api/debug_info_event_listener.cc18
-rw-r--r--sync/internal_api/debug_info_event_listener.h18
-rw-r--r--sync/internal_api/debug_info_event_listener_unittest.cc12
-rw-r--r--sync/internal_api/http_bridge.cc4
-rw-r--r--sync/internal_api/js_mutation_event_observer.cc8
-rw-r--r--sync/internal_api/js_mutation_event_observer.h10
-rw-r--r--sync/internal_api/js_mutation_event_observer_unittest.cc16
-rw-r--r--sync/internal_api/js_sync_manager_observer.cc14
-rw-r--r--sync/internal_api/js_sync_manager_observer.h14
-rw-r--r--sync/internal_api/js_sync_manager_observer_unittest.cc30
-rw-r--r--sync/internal_api/public/base_node.h4
-rw-r--r--sync/internal_api/public/base_transaction.h8
-rw-r--r--sync/internal_api/public/change_record.h6
-rw-r--r--sync/internal_api/public/change_record_unittest.cc6
-rw-r--r--sync/internal_api/public/configure_reason.h4
-rw-r--r--sync/internal_api/public/engine/model_safe_worker.cc4
-rw-r--r--sync/internal_api/public/engine/model_safe_worker.h4
-rw-r--r--sync/internal_api/public/engine/model_safe_worker_unittest.cc4
-rw-r--r--sync/internal_api/public/engine/passive_model_worker.cc4
-rw-r--r--sync/internal_api/public/engine/passive_model_worker.h4
-rw-r--r--sync/internal_api/public/engine/polling_constants.cc4
-rw-r--r--sync/internal_api/public/engine/polling_constants.h4
-rw-r--r--sync/internal_api/public/engine/sync_status.cc4
-rw-r--r--sync/internal_api/public/engine/sync_status.h6
-rw-r--r--sync/internal_api/public/http_bridge.h12
-rw-r--r--sync/internal_api/public/http_post_provider_factory.h4
-rw-r--r--sync/internal_api/public/http_post_provider_interface.h4
-rw-r--r--sync/internal_api/public/read_node.h4
-rw-r--r--sync/internal_api/public/read_transaction.h4
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.cc4
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.h4
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.cc4
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.h4
-rw-r--r--sync/internal_api/public/sessions/sync_source_info.cc4
-rw-r--r--sync/internal_api/public/sessions/sync_source_info.h4
-rw-r--r--sync/internal_api/public/sync_manager.h48
-rw-r--r--sync/internal_api/public/syncable/model_type.h4
-rw-r--r--sync/internal_api/public/syncable/model_type_payload_map.cc6
-rw-r--r--sync/internal_api/public/syncable/model_type_payload_map.h4
-rw-r--r--sync/internal_api/public/test/test_entry_factory.h4
-rw-r--r--sync/internal_api/public/test/test_user_share.h12
-rw-r--r--sync/internal_api/public/user_share.h4
-rw-r--r--sync/internal_api/public/util/enum_set.h4
-rw-r--r--sync/internal_api/public/util/enum_set_unittest.cc4
-rw-r--r--sync/internal_api/public/util/experiments.h4
-rw-r--r--sync/internal_api/public/util/immutable.h6
-rw-r--r--sync/internal_api/public/util/immutable_unittest.cc12
-rw-r--r--sync/internal_api/public/util/report_unrecoverable_error_function.h4
-rw-r--r--sync/internal_api/public/util/syncer_error.cc5
-rw-r--r--sync/internal_api/public/util/syncer_error.h4
-rw-r--r--sync/internal_api/public/util/unrecoverable_error_handler.h5
-rw-r--r--sync/internal_api/public/util/unrecoverable_error_info.cc4
-rw-r--r--sync/internal_api/public/util/unrecoverable_error_info.h4
-rw-r--r--sync/internal_api/public/util/weak_handle.cc4
-rw-r--r--sync/internal_api/public/util/weak_handle.h6
-rw-r--r--sync/internal_api/public/util/weak_handle_unittest.cc4
-rw-r--r--sync/internal_api/public/write_node.h6
-rw-r--r--sync/internal_api/public/write_transaction.h4
-rw-r--r--sync/internal_api/read_node.cc4
-rw-r--r--sync/internal_api/read_transaction.cc4
-rw-r--r--sync/internal_api/sync_manager.cc196
-rw-r--r--sync/internal_api/syncapi_internal.cc12
-rw-r--r--sync/internal_api/syncapi_internal.h19
-rw-r--r--sync/internal_api/syncapi_server_connection_manager.cc10
-rw-r--r--sync/internal_api/syncapi_server_connection_manager.h12
-rw-r--r--sync/internal_api/syncapi_server_connection_manager_unittest.cc10
-rw-r--r--sync/internal_api/syncapi_unittest.cc122
-rw-r--r--sync/internal_api/test/test_entry_factory.cc4
-rw-r--r--sync/internal_api/test/test_user_share.cc8
-rw-r--r--sync/internal_api/user_share.cc4
-rw-r--r--sync/internal_api/write_node.cc8
-rw-r--r--sync/internal_api/write_transaction.cc4
-rw-r--r--sync/js/js_arg_list.cc4
-rw-r--r--sync/js/js_arg_list.h4
-rw-r--r--sync/js/js_arg_list_unittest.cc4
-rw-r--r--sync/js/js_backend.h4
-rw-r--r--sync/js/js_controller.h4
-rw-r--r--sync/js/js_event_details.cc4
-rw-r--r--sync/js/js_event_details.h4
-rw-r--r--sync/js/js_event_details_unittest.cc4
-rw-r--r--sync/js/js_event_handler.h4
-rw-r--r--sync/js/js_reply_handler.h4
-rw-r--r--sync/js/js_test_util.cc4
-rw-r--r--sync/js/js_test_util.h4
-rw-r--r--sync/js/sync_js_controller.cc4
-rw-r--r--sync/js/sync_js_controller.h4
-rw-r--r--sync/js/sync_js_controller_unittest.cc4
-rw-r--r--sync/notifier/chrome_invalidation_client.cc6
-rw-r--r--sync/notifier/chrome_invalidation_client.h8
-rw-r--r--sync/notifier/chrome_invalidation_client_unittest.cc6
-rw-r--r--sync/notifier/chrome_system_resources.cc4
-rw-r--r--sync/notifier/chrome_system_resources.h4
-rw-r--r--sync/notifier/chrome_system_resources_unittest.cc4
-rw-r--r--sync/notifier/invalidation_notifier.cc8
-rw-r--r--sync/notifier/invalidation_notifier.h8
-rw-r--r--sync/notifier/invalidation_notifier_unittest.cc6
-rw-r--r--sync/notifier/invalidation_state_tracker.h4
-rw-r--r--sync/notifier/invalidation_util.cc4
-rw-r--r--sync/notifier/invalidation_util.h4
-rw-r--r--sync/notifier/mock_invalidation_state_tracker.cc4
-rw-r--r--sync/notifier/mock_invalidation_state_tracker.h4
-rw-r--r--sync/notifier/mock_sync_notifier_observer.cc4
-rw-r--r--sync/notifier/mock_sync_notifier_observer.h4
-rw-r--r--sync/notifier/non_blocking_invalidation_notifier.cc18
-rw-r--r--sync/notifier/non_blocking_invalidation_notifier.h6
-rw-r--r--sync/notifier/non_blocking_invalidation_notifier_unittest.cc8
-rw-r--r--sync/notifier/notifications_disabled_reason.cc4
-rw-r--r--sync/notifier/notifications_disabled_reason.h4
-rw-r--r--sync/notifier/p2p_notifier.cc4
-rw-r--r--sync/notifier/p2p_notifier.h4
-rw-r--r--sync/notifier/p2p_notifier_unittest.cc4
-rw-r--r--sync/notifier/push_client_channel.cc4
-rw-r--r--sync/notifier/push_client_channel.h4
-rw-r--r--sync/notifier/push_client_channel_unittest.cc4
-rw-r--r--sync/notifier/registration_manager.cc4
-rw-r--r--sync/notifier/registration_manager.h4
-rw-r--r--sync/notifier/registration_manager_unittest.cc4
-rw-r--r--sync/notifier/state_writer.h4
-rw-r--r--sync/notifier/sync_notifier.h4
-rw-r--r--sync/notifier/sync_notifier_factory.cc6
-rw-r--r--sync/notifier/sync_notifier_factory.h6
-rw-r--r--sync/notifier/sync_notifier_factory_unittest.cc8
-rw-r--r--sync/notifier/sync_notifier_observer.h4
-rw-r--r--sync/protocol/proto_enum_conversions.cc4
-rw-r--r--sync/protocol/proto_enum_conversions.h4
-rw-r--r--sync/protocol/proto_enum_conversions_unittest.cc4
-rw-r--r--sync/protocol/proto_value_conversions.cc4
-rw-r--r--sync/protocol/proto_value_conversions.h4
-rw-r--r--sync/protocol/proto_value_conversions_unittest.cc4
-rw-r--r--sync/protocol/sync_protocol_error.cc4
-rw-r--r--sync/protocol/sync_protocol_error.h4
-rw-r--r--sync/sessions/debug_info_getter.h4
-rw-r--r--sync/sessions/ordered_commit_set.cc8
-rw-r--r--sync/sessions/ordered_commit_set.h12
-rw-r--r--sync/sessions/ordered_commit_set_unittest.cc16
-rw-r--r--sync/sessions/session_state.cc4
-rw-r--r--sync/sessions/session_state.h4
-rw-r--r--sync/sessions/session_state_unittest.cc4
-rw-r--r--sync/sessions/status_controller.cc4
-rw-r--r--sync/sessions/status_controller.h6
-rw-r--r--sync/sessions/status_controller_unittest.cc4
-rw-r--r--sync/sessions/sync_session.cc4
-rw-r--r--sync/sessions/sync_session.h4
-rw-r--r--sync/sessions/sync_session_context.cc6
-rw-r--r--sync/sessions/sync_session_context.h10
-rw-r--r--sync/sessions/sync_session_unittest.cc4
-rw-r--r--sync/sessions/test_util.cc4
-rw-r--r--sync/sessions/test_util.h4
-rw-r--r--sync/syncable/directory.cc16
-rw-r--r--sync/syncable/directory.h28
-rw-r--r--sync/syncable/directory_backing_store.cc6
-rw-r--r--sync/syncable/directory_backing_store_unittest.cc6
-rw-r--r--sync/syncable/entry.cc2
-rw-r--r--sync/syncable/entry.h6
-rw-r--r--sync/syncable/entry_kernel.cc4
-rw-r--r--sync/syncable/entry_kernel.h6
-rw-r--r--sync/syncable/model_type.cc4
-rw-r--r--sync/syncable/mutable_entry.h6
-rw-r--r--sync/syncable/read_transaction.h6
-rw-r--r--sync/syncable/syncable_id_unittest.cc2
-rw-r--r--sync/syncable/syncable_mock.cc2
-rw-r--r--sync/syncable/syncable_mock.h4
-rw-r--r--sync/syncable/syncable_unittest.cc10
-rw-r--r--sync/syncable/write_transaction_info.h2
-rw-r--r--sync/test/engine/fake_model_worker.cc4
-rw-r--r--sync/test/engine/fake_model_worker.h4
-rw-r--r--sync/test/engine/mock_connection_manager.cc14
-rw-r--r--sync/test/engine/mock_connection_manager.h4
-rw-r--r--sync/test/engine/syncer_command_test.cc4
-rw-r--r--sync/test/engine/syncer_command_test.h6
-rw-r--r--sync/test/engine/test_directory_setter_upper.cc4
-rw-r--r--sync/test/engine/test_directory_setter_upper.h4
-rw-r--r--sync/test/engine/test_id_factory.h4
-rw-r--r--sync/test/fake_encryptor.cc4
-rw-r--r--sync/test/fake_encryptor.h4
-rw-r--r--sync/test/fake_extensions_activity_monitor.cc4
-rw-r--r--sync/test/fake_extensions_activity_monitor.h4
-rw-r--r--sync/test/null_transaction_observer.cc4
-rw-r--r--sync/test/null_transaction_observer.h2
-rw-r--r--sync/test/sessions/test_scoped_session_event_listener.h4
-rw-r--r--sync/tools/sync_listen_notifications.cc24
-rw-r--r--sync/util/cryptographer.cc4
-rw-r--r--sync/util/cryptographer.h4
-rw-r--r--sync/util/cryptographer_unittest.cc4
-rw-r--r--sync/util/data_type_histogram_unittest.cc4
-rw-r--r--sync/util/encryptor.h4
-rw-r--r--sync/util/extensions_activity_monitor.cc4
-rw-r--r--sync/util/extensions_activity_monitor.h4
-rw-r--r--sync/util/get_session_name.cc4
-rw-r--r--sync/util/get_session_name.h4
-rw-r--r--sync/util/get_session_name_mac.h4
-rw-r--r--sync/util/get_session_name_mac.mm4
-rw-r--r--sync/util/get_session_name_unittest.cc4
-rw-r--r--sync/util/get_session_name_win.cc4
-rw-r--r--sync/util/get_session_name_win.h4
-rw-r--r--sync/util/logging.cc4
-rw-r--r--sync/util/logging.h6
-rw-r--r--sync/util/nigori.cc4
-rw-r--r--sync/util/nigori.h4
-rw-r--r--sync/util/nigori_unittest.cc4
-rw-r--r--sync/util/session_utils_android.cc4
-rw-r--r--sync/util/session_utils_android.h4
-rw-r--r--sync/util/test_unrecoverable_error_handler.cc4
-rw-r--r--sync/util/test_unrecoverable_error_handler.h4
-rw-r--r--sync/util/time.cc4
-rw-r--r--sync/util/time.h4
-rw-r--r--tools/heapcheck/suppressions.txt8
-rw-r--r--tools/valgrind/drmemory/suppressions_full.txt6
-rw-r--r--tools/valgrind/tsan/suppressions.txt8
506 files changed, 3860 insertions, 3834 deletions
diff --git a/chrome/browser/extensions/app_notification_manager.cc b/chrome/browser/extensions/app_notification_manager.cc
index 04d45c4..cf598e6 100644
--- a/chrome/browser/extensions/app_notification_manager.cc
+++ b/chrome/browser/extensions/app_notification_manager.cc
@@ -22,7 +22,7 @@
using content::BrowserThread;
-typedef std::map<std::string, csync::SyncData> SyncDataMap;
+typedef std::map<std::string, syncer::SyncData> SyncDataMap;
namespace {
@@ -54,9 +54,9 @@ void RemoveByGuid(AppNotificationList* list, const std::string& guid) {
list->erase(iter);
}
-void PopulateGuidToSyncDataMap(const csync::SyncDataList& sync_data,
+void PopulateGuidToSyncDataMap(const syncer::SyncDataList& sync_data,
SyncDataMap* data_map) {
- for (csync::SyncDataList::const_iterator iter = sync_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = sync_data.begin();
iter != sync_data.end(); ++iter) {
(*data_map)[iter->GetSpecifics().app_notification().guid()] = *iter;
}
@@ -178,12 +178,12 @@ void AppNotificationManager::Observe(
ClearAll(*content::Details<const std::string>(details).ptr());
}
-csync::SyncDataList AppNotificationManager::GetAllSyncData(
+syncer::SyncDataList AppNotificationManager::GetAllSyncData(
syncable::ModelType type) const {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(loaded());
DCHECK_EQ(syncable::APP_NOTIFICATIONS, type);
- csync::SyncDataList data;
+ syncer::SyncDataList data;
for (NotificationMap::const_iterator iter = notifications_->begin();
iter != notifications_->end(); ++iter) {
@@ -202,9 +202,9 @@ csync::SyncDataList AppNotificationManager::GetAllSyncData(
return data;
}
-csync::SyncError AppNotificationManager::ProcessSyncChanges(
+syncer::SyncError AppNotificationManager::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(loaded());
if (!models_associated_) {
@@ -215,12 +215,12 @@ csync::SyncError AppNotificationManager::ProcessSyncChanges(
AutoReset<bool> processing_changes(&processing_syncer_changes_, true);
- csync::SyncError error;
- for (csync::SyncChangeList::const_iterator iter = change_list.begin();
+ syncer::SyncError error;
+ for (syncer::SyncChangeList::const_iterator iter = change_list.begin();
iter != change_list.end(); ++iter) {
- csync::SyncData sync_data = iter->sync_data();
+ syncer::SyncData sync_data = iter->sync_data();
DCHECK_EQ(syncable::APP_NOTIFICATIONS, sync_data.GetDataType());
- csync::SyncChange::SyncChangeType change_type = iter->change_type();
+ syncer::SyncChange::SyncChangeType change_type = iter->change_type();
scoped_ptr<AppNotification> new_notif(CreateNotificationFromSyncData(
sync_data));
@@ -235,12 +235,12 @@ csync::SyncError AppNotificationManager::ProcessSyncChanges(
error = sync_error_factory_->CreateAndUploadError(
FROM_HERE,
"ProcessSyncChanges received a local only notification" +
- csync::SyncChange::ChangeTypeToString(change_type));
+ syncer::SyncChange::ChangeTypeToString(change_type));
continue;
}
switch (change_type) {
- case csync::SyncChange::ACTION_ADD:
+ case syncer::SyncChange::ACTION_ADD:
if (!existing_notif) {
Add(new_notif.release());
} else {
@@ -249,7 +249,7 @@ csync::SyncError AppNotificationManager::ProcessSyncChanges(
<< "\nItem in ADD change: " << new_notif->ToString();
}
break;
- case csync::SyncChange::ACTION_DELETE:
+ case syncer::SyncChange::ACTION_DELETE:
if (existing_notif) {
Remove(new_notif->extension_id(), new_notif->guid());
} else {
@@ -260,7 +260,7 @@ csync::SyncError AppNotificationManager::ProcessSyncChanges(
<< "Item in DELETE change: " << new_notif->ToString();
}
break;
- case csync::SyncChange::ACTION_UPDATE:
+ case syncer::SyncChange::ACTION_UPDATE:
// Although app notifications are immutable from the model perspective,
// sync can send UPDATE changes due to encryption / meta-data changes.
// So ignore UPDATE changes when the exitsing and new notification
@@ -283,11 +283,11 @@ csync::SyncError AppNotificationManager::ProcessSyncChanges(
return error;
}
-csync::SyncError AppNotificationManager::MergeDataAndStartSyncing(
+syncer::SyncError AppNotificationManager::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// AppNotificationDataTypeController ensures that modei is fully should before
// this method is called by waiting until the load notification is received
@@ -308,9 +308,9 @@ csync::SyncError AppNotificationManager::MergeDataAndStartSyncing(
PopulateGuidToSyncDataMap(GetAllSyncData(syncable::APP_NOTIFICATIONS),
&local_data_map);
- for (csync::SyncDataList::const_iterator iter = initial_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = initial_sync_data.begin();
iter != initial_sync_data.end(); ++iter) {
- const csync::SyncData& sync_data = *iter;
+ const syncer::SyncData& sync_data = *iter;
DCHECK_EQ(syncable::APP_NOTIFICATIONS, sync_data.GetDataType());
scoped_ptr<AppNotification> sync_notif(CreateNotificationFromSyncData(
sync_data));
@@ -334,14 +334,14 @@ csync::SyncError AppNotificationManager::MergeDataAndStartSyncing(
}
// TODO(munjal): crbug.com/10059. Work with Lingesh/Antony to resolve.
- csync::SyncChangeList new_changes;
+ syncer::SyncChangeList new_changes;
for (SyncDataMap::const_iterator iter = local_data_map.begin();
iter != local_data_map.end(); ++iter) {
new_changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_ADD, iter->second));
+ syncer::SyncChange(syncer::SyncChange::ACTION_ADD, iter->second));
}
- csync::SyncError error;
+ syncer::SyncError error;
if (new_changes.size() > 0)
error = sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
models_associated_ = !error.IsSet();
@@ -491,10 +491,10 @@ void AppNotificationManager::SyncAddChange(const AppNotification& notif) {
// TODO(munjal): crbug.com/10059. Work with Lingesh/Antony to resolve.
- csync::SyncChangeList changes;
- csync::SyncData sync_data = CreateSyncDataFromNotification(notif);
+ syncer::SyncChangeList changes;
+ syncer::SyncData sync_data = CreateSyncDataFromNotification(notif);
changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_ADD, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_ADD, sync_data));
sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
}
@@ -506,10 +506,10 @@ void AppNotificationManager::SyncRemoveChange(const AppNotification& notif) {
return;
}
- csync::SyncChangeList changes;
- csync::SyncData sync_data = CreateSyncDataFromNotification(notif);
+ syncer::SyncChangeList changes;
+ syncer::SyncData sync_data = CreateSyncDataFromNotification(notif);
changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE, sync_data));
sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
}
@@ -521,22 +521,22 @@ void AppNotificationManager::SyncClearAllChange(
if (!models_associated_ || processing_syncer_changes_)
return;
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
for (AppNotificationList::const_iterator iter = list.begin();
iter != list.end(); ++iter) {
const AppNotification& notif = *iter->get();
// Skip notifications marked as local.
if (notif.is_local())
continue;
- changes.push_back(csync::SyncChange(
- csync::SyncChange::ACTION_DELETE,
+ changes.push_back(syncer::SyncChange(
+ syncer::SyncChange::ACTION_DELETE,
CreateSyncDataFromNotification(notif)));
}
sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
}
// static
-csync::SyncData AppNotificationManager::CreateSyncDataFromNotification(
+syncer::SyncData AppNotificationManager::CreateSyncDataFromNotification(
const AppNotification& notification) {
DCHECK(!notification.is_local());
sync_pb::EntitySpecifics specifics;
@@ -550,13 +550,13 @@ csync::SyncData AppNotificationManager::CreateSyncDataFromNotification(
notif_specifics->set_link_text(notification.link_text());
notif_specifics->set_link_url(notification.link_url().spec());
notif_specifics->set_title(notification.title());
- return csync::SyncData::CreateLocalData(
+ return syncer::SyncData::CreateLocalData(
notif_specifics->guid(), notif_specifics->app_id(), specifics);
}
// static
AppNotification* AppNotificationManager::CreateNotificationFromSyncData(
- const csync::SyncData& sync_data) {
+ const syncer::SyncData& sync_data) {
sync_pb::AppNotification specifics =
sync_data.GetSpecifics().app_notification();
diff --git a/chrome/browser/extensions/app_notification_manager.h b/chrome/browser/extensions/app_notification_manager.h
index 9a84b5d..74104f3 100644
--- a/chrome/browser/extensions/app_notification_manager.h
+++ b/chrome/browser/extensions/app_notification_manager.h
@@ -26,7 +26,7 @@
class PerfTimer;
class Profile;
-namespace csync {
+namespace syncer {
class SyncErrorFactory;
}
@@ -36,7 +36,7 @@ class AppNotificationManager
AppNotificationManager,
content::BrowserThread::DeleteOnUIThread>,
public content::NotificationObserver,
- public csync::SyncableService {
+ public syncer::SyncableService {
public:
static const unsigned int kMaxNotificationPerApp;
explicit AppNotificationManager(Profile* profile);
@@ -64,22 +64,22 @@ class AppNotificationManager
bool loaded() const { return notifications_.get() != NULL; }
- // csync::SyncableService implementation.
+ // syncer::SyncableService implementation.
- // Returns all syncable notifications from this model as csync::SyncData.
- virtual csync::SyncDataList GetAllSyncData(
+ // Returns all syncable notifications from this model as syncer::SyncData.
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
// Process notifications related changes from Sync, merging them into
// our model.
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
// Associate and merge sync data model with our data model.
- virtual csync::SyncError MergeDataAndStartSyncing(
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
private:
@@ -150,11 +150,11 @@ class AppNotificationManager
// Sends changes to syncer to remove all notifications in the given list.
void SyncClearAllChange(const AppNotificationList& list);
- // Converters from AppNotification to csync::SyncData and vice versa.
- static csync::SyncData CreateSyncDataFromNotification(
+ // Converters from AppNotification to syncer::SyncData and vice versa.
+ static syncer::SyncData CreateSyncDataFromNotification(
const AppNotification& notification);
static AppNotification* CreateNotificationFromSyncData(
- const csync::SyncData& sync_data);
+ const syncer::SyncData& sync_data);
Profile* profile_;
content::NotificationRegistrar registrar_;
@@ -164,10 +164,10 @@ class AppNotificationManager
scoped_ptr<AppNotificationStorage> storage_;
// Sync change processor we use to push all our changes.
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
// Sync error handler that we use to create errors from.
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
// Whether the sync model is associated with the local model.
// In other words, whether we are ready to apply sync changes.
diff --git a/chrome/browser/extensions/app_notification_manager_sync_unittest.cc b/chrome/browser/extensions/app_notification_manager_sync_unittest.cc
index fc346d7..841754e 100644
--- a/chrome/browser/extensions/app_notification_manager_sync_unittest.cc
+++ b/chrome/browser/extensions/app_notification_manager_sync_unittest.cc
@@ -22,36 +22,36 @@ using ::testing::Return;
namespace {
-// Extract notification guid from csync::SyncData.
-std::string GetGuid(const csync::SyncData& sync_data) {
+// Extract notification guid from syncer::SyncData.
+std::string GetGuid(const syncer::SyncData& sync_data) {
return sync_data.GetSpecifics().app_notification().guid();
}
// Dummy SyncChangeProcessor used to help review what SyncChanges are pushed
// back up to Sync.
-class TestChangeProcessor : public csync::SyncChangeProcessor {
+class TestChangeProcessor : public syncer::SyncChangeProcessor {
public:
TestChangeProcessor() { }
virtual ~TestChangeProcessor() { }
// Store a copy of all the changes passed in so we can examine them later.
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
// change_map_.erase(change_map_.begin(), change_map_.end());
- for (csync::SyncChangeList::const_iterator iter = change_list.begin();
+ for (syncer::SyncChangeList::const_iterator iter = change_list.begin();
iter != change_list.end(); ++iter) {
change_map_[GetGuid(iter->sync_data())] = *iter;
}
- return csync::SyncError();
+ return syncer::SyncError();
}
bool ContainsGuid(const std::string& guid) {
return change_map_.find(guid) != change_map_.end();
}
- csync::SyncChange GetChangeByGuid(const std::string& guid) {
+ syncer::SyncChange GetChangeByGuid(const std::string& guid) {
DCHECK(ContainsGuid(guid));
return change_map_[guid];
}
@@ -60,29 +60,29 @@ class TestChangeProcessor : public csync::SyncChangeProcessor {
private:
// Track the changes received in ProcessSyncChanges.
- std::map<std::string, csync::SyncChange> change_map_;
+ std::map<std::string, syncer::SyncChange> change_map_;
DISALLOW_COPY_AND_ASSIGN(TestChangeProcessor);
};
-class SyncChangeProcessorDelegate : public csync::SyncChangeProcessor {
+class SyncChangeProcessorDelegate : public syncer::SyncChangeProcessor {
public:
- explicit SyncChangeProcessorDelegate(csync::SyncChangeProcessor* recipient)
+ explicit SyncChangeProcessorDelegate(syncer::SyncChangeProcessor* recipient)
: recipient_(recipient) {
DCHECK(recipient_);
}
virtual ~SyncChangeProcessorDelegate() {}
- // csync::SyncChangeProcessor implementation.
- virtual csync::SyncError ProcessSyncChanges(
+ // syncer::SyncChangeProcessor implementation.
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE {
+ const syncer::SyncChangeList& change_list) OVERRIDE {
return recipient_->ProcessSyncChanges(from_here, change_list);
}
private:
// The recipient of all sync changes.
- csync::SyncChangeProcessor* recipient_;
+ syncer::SyncChangeProcessor* recipient_;
DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate);
};
@@ -135,8 +135,8 @@ class AppNotificationManagerSyncTest : public testing::Test {
AppNotificationManager* model() { return model_.get(); }
TestChangeProcessor* processor() { return sync_processor_.get(); }
- scoped_ptr<csync::SyncChangeProcessor> PassProcessor() {
- return sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>();
+ scoped_ptr<syncer::SyncChangeProcessor> PassProcessor() {
+ return sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>();
}
// Creates a notification whose properties are set from the given integer.
@@ -188,29 +188,29 @@ class AppNotificationManagerSyncTest : public testing::Test {
return notif;
}
- static csync::SyncData CreateSyncData(int suffix) {
+ static syncer::SyncData CreateSyncData(int suffix) {
scoped_ptr<AppNotification> notif(CreateNotification(suffix));
return AppNotificationManager::CreateSyncDataFromNotification(*notif);
}
- static csync::SyncData CreateSyncData(
+ static syncer::SyncData CreateSyncData(
int suffix, const std::string& extension_id) {
scoped_ptr<AppNotification> notif(
CreateNotification(false, suffix, extension_id));
return AppNotificationManager::CreateSyncDataFromNotification(*notif);
}
- // Helper to create csync::SyncChange. Takes ownership of |notif|.
- static csync::SyncChange CreateSyncChange(
- csync::SyncChange::SyncChangeType type,
+ // Helper to create syncer::SyncChange. Takes ownership of |notif|.
+ static syncer::SyncChange CreateSyncChange(
+ syncer::SyncChange::SyncChangeType type,
AppNotification* notif) {
// Take control of notif to clean it up after we create data out of it.
scoped_ptr<AppNotification> scoped_notif(notif);
- return csync::SyncChange(
+ return syncer::SyncChange(
type, AppNotificationManager::CreateSyncDataFromNotification(*notif));
}
- void AssertSyncChange(const csync::SyncChange& change,
- csync::SyncChange::SyncChangeType type,
+ void AssertSyncChange(const syncer::SyncChange& change,
+ syncer::SyncChange::SyncChangeType type,
const AppNotification& notif) {
ASSERT_EQ(type, change.change_type());
scoped_ptr<AppNotification> notif2(
@@ -235,11 +235,11 @@ class AppNotificationManagerSyncTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(AppNotificationManagerSyncTest);
};
-// Create an AppNotification, convert it to csync::SyncData and convert it back.
+// Create an AppNotification, convert it to SyncData and convert it back.
TEST_F(AppNotificationManagerSyncTest, NotificationToSyncDataToNotification) {
{ // Partial properties set.
scoped_ptr<AppNotification> notif1(CreateNotificationNoLink(1));
- csync::SyncData sync_data =
+ syncer::SyncData sync_data =
AppNotificationManager::CreateSyncDataFromNotification(*notif1);
scoped_ptr<AppNotification> notif2(
AppNotificationManager::CreateNotificationFromSyncData(sync_data));
@@ -248,7 +248,7 @@ TEST_F(AppNotificationManagerSyncTest, NotificationToSyncDataToNotification) {
}
{ // All properties set.
scoped_ptr<AppNotification> notif1(CreateNotification(1));
- csync::SyncData sync_data =
+ syncer::SyncData sync_data =
AppNotificationManager::CreateSyncDataFromNotification(*notif1);
scoped_ptr<AppNotification> notif2(
AppNotificationManager::CreateNotificationFromSyncData(sync_data));
@@ -262,12 +262,12 @@ TEST_F(AppNotificationManagerSyncTest, GetAllSyncDataNoLocal) {
model()->Add(CreateNotificationNoLink(1));
model()->Add(CreateNotification(2));
model()->Add(CreateNotification(3));
- csync::SyncDataList all_sync_data =
+ syncer::SyncDataList all_sync_data =
model()->GetAllSyncData(syncable::APP_NOTIFICATIONS);
EXPECT_EQ(3U, all_sync_data.size());
- for (csync::SyncDataList::const_iterator iter = all_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = all_sync_data.begin();
iter != all_sync_data.end(); ++iter) {
scoped_ptr<AppNotification> notif1(
AppNotificationManager::CreateNotificationFromSyncData(*iter));
@@ -287,12 +287,12 @@ TEST_F(AppNotificationManagerSyncTest, GetAllSyncDataSomeLocal) {
model()->Add(CreateNotification(3));
model()->Add(CreateNotification(true, 4));
model()->Add(CreateNotification(5));
- csync::SyncDataList all_sync_data =
+ syncer::SyncDataList all_sync_data =
model()->GetAllSyncData(syncable::APP_NOTIFICATIONS);
EXPECT_EQ(3U, all_sync_data.size());
- for (csync::SyncDataList::const_iterator iter = all_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = all_sync_data.begin();
iter != all_sync_data.end(); ++iter) {
scoped_ptr<AppNotification> notif1(
AppNotificationManager::CreateNotificationFromSyncData(*iter));
@@ -308,9 +308,9 @@ TEST_F(AppNotificationManagerSyncTest, GetAllSyncDataSomeLocal) {
TEST_F(AppNotificationManagerSyncTest, ModelAssocBothEmpty) {
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(), // Empty.
+ syncer::SyncDataList(), // Empty.
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(0U, model()->GetAllSyncData(syncable::APP_NOTIFICATIONS).size());
EXPECT_EQ(0U, processor()->change_list_size());
@@ -318,7 +318,7 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothEmpty) {
// Model assocation: empty sync model and non-empty local model.
TEST_F(AppNotificationManagerSyncTest, ModelAssocModelEmpty) {
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
initial_data.push_back(CreateSyncData(1));
initial_data.push_back(CreateSyncData(2));
initial_data.push_back(CreateSyncData(3));
@@ -328,11 +328,11 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocModelEmpty) {
syncable::APP_NOTIFICATIONS,
initial_data,
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(4U, model()->GetAllSyncData(syncable::APP_NOTIFICATIONS).size());
// Model should all of the initial sync data.
- for (csync::SyncDataList::const_iterator iter = initial_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = initial_data.begin();
iter != initial_data.end(); ++iter) {
scoped_ptr<AppNotification> notif1(
AppNotificationManager::CreateNotificationFromSyncData(*iter));
@@ -356,7 +356,7 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptyNoOverlap) {
AppNotification* n3 = CreateNotification(3);
model()->Add(n3);
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
initial_data.push_back(CreateSyncData(4));
initial_data.push_back(CreateSyncData(5));
initial_data.push_back(CreateSyncData(6));
@@ -366,10 +366,10 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptyNoOverlap) {
syncable::APP_NOTIFICATIONS,
initial_data,
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(6U, model()->GetAllSyncData(syncable::APP_NOTIFICATIONS).size());
- for (csync::SyncDataList::const_iterator iter = initial_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = initial_data.begin();
iter != initial_data.end(); ++iter) {
scoped_ptr<AppNotification> notif1(
AppNotificationManager::CreateNotificationFromSyncData(*iter));
@@ -385,11 +385,11 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptyNoOverlap) {
EXPECT_EQ(2U, processor()->change_list_size());
EXPECT_TRUE(processor()->ContainsGuid(n1->guid()));
- EXPECT_EQ(csync::SyncChange::ACTION_ADD,
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD,
processor()->GetChangeByGuid(n1->guid()).change_type());
EXPECT_FALSE(processor()->ContainsGuid(n2->guid()));
EXPECT_TRUE(processor()->ContainsGuid(n3->guid()));
- EXPECT_EQ(csync::SyncChange::ACTION_ADD,
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD,
processor()->GetChangeByGuid(n3->guid()).change_type());
}
@@ -405,7 +405,7 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptySomeOverlap) {
AppNotification* n4 = CreateNotification(4);
model()->Add(n4);
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
initial_data.push_back(CreateSyncData(5));
initial_data.push_back(
AppNotificationManager::CreateSyncDataFromNotification(*n1));
@@ -418,10 +418,10 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptySomeOverlap) {
syncable::APP_NOTIFICATIONS,
initial_data,
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(6U, model()->GetAllSyncData(syncable::APP_NOTIFICATIONS).size());
- for (csync::SyncDataList::const_iterator iter = initial_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = initial_data.begin();
iter != initial_data.end(); ++iter) {
scoped_ptr<AppNotification> notif1(
AppNotificationManager::CreateNotificationFromSyncData(*iter));
@@ -440,7 +440,7 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptySomeOverlap) {
EXPECT_FALSE(processor()->ContainsGuid(n1->guid()));
EXPECT_FALSE(processor()->ContainsGuid(n2->guid()));
EXPECT_TRUE(processor()->ContainsGuid(n3->guid()));
- EXPECT_EQ(csync::SyncChange::ACTION_ADD,
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD,
processor()->GetChangeByGuid(n3->guid()).change_type());
EXPECT_FALSE(processor()->ContainsGuid(n4->guid()));
}
@@ -453,7 +453,7 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptyTitleMismatch) {
AppNotification* n2 = CreateNotification(true, 2);
model()->Add(n2);
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
initial_data.push_back(CreateSyncData(1));
scoped_ptr<AppNotification> n1_a(CreateNotification(
n1->is_local(), n1->creation_time().ToInternalValue(),
@@ -463,19 +463,19 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptyTitleMismatch) {
initial_data.push_back(
AppNotificationManager::CreateSyncDataFromNotification(*n1_a));
- scoped_ptr<csync::SyncErrorFactoryMock> error_handler(
- new csync::SyncErrorFactoryMock());
+ scoped_ptr<syncer::SyncErrorFactoryMock> error_handler(
+ new syncer::SyncErrorFactoryMock());
EXPECT_CALL(*error_handler, CreateAndUploadError(_, _)).
WillOnce(
Return(
- csync::SyncError(
+ syncer::SyncError(
FROM_HERE, "error", syncable::APP_NOTIFICATIONS)));
- csync::SyncError sync_error = model()->MergeDataAndStartSyncing(
+ syncer::SyncError sync_error = model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
initial_data,
PassProcessor(),
- error_handler.PassAs<csync::SyncErrorFactory>());
+ error_handler.PassAs<syncer::SyncErrorFactory>());
EXPECT_TRUE(sync_error.IsSet());
EXPECT_EQ(syncable::APP_NOTIFICATIONS, sync_error.type());
@@ -490,25 +490,25 @@ TEST_F(AppNotificationManagerSyncTest, ModelAssocBothNonEmptyMatchesLocal) {
AppNotification* n2 = CreateNotification(true, 2);
model()->Add(n2);
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
initial_data.push_back(CreateSyncData(1));
scoped_ptr<AppNotification> n2_a(CreateNotification(2));
initial_data.push_back(
AppNotificationManager::CreateSyncDataFromNotification(*n2_a));
- scoped_ptr<csync::SyncErrorFactoryMock> error_handler(
- new csync::SyncErrorFactoryMock());
+ scoped_ptr<syncer::SyncErrorFactoryMock> error_handler(
+ new syncer::SyncErrorFactoryMock());
EXPECT_CALL(*error_handler, CreateAndUploadError(_, _)).
WillOnce(
Return(
- csync::SyncError(
+ syncer::SyncError(
FROM_HERE, "error", syncable::APP_NOTIFICATIONS)));
- csync::SyncError sync_error = model()->MergeDataAndStartSyncing(
+ syncer::SyncError sync_error = model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
initial_data,
PassProcessor(),
- error_handler.PassAs<csync::SyncErrorFactory>());
+ error_handler.PassAs<syncer::SyncErrorFactory>());
EXPECT_TRUE(sync_error.IsSet());
EXPECT_EQ(syncable::APP_NOTIFICATIONS, sync_error.type());
@@ -520,18 +520,18 @@ TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesEmptyModel) {
// We initially have no data.
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Set up a bunch of ADDs.
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_ADD, CreateNotification(1)));
+ syncer::SyncChange::ACTION_ADD, CreateNotification(1)));
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_ADD, CreateNotification(2)));
+ syncer::SyncChange::ACTION_ADD, CreateNotification(2)));
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_ADD, CreateNotification(3)));
+ syncer::SyncChange::ACTION_ADD, CreateNotification(3)));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -547,18 +547,18 @@ TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesNonEmptyModel) {
model()->Add(n2);
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Some adds and some deletes.
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_ADD, CreateNotification(3)));
+ syncer::SyncChange::ACTION_ADD, CreateNotification(3)));
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_DELETE, n1->Copy()));
+ syncer::SyncChange::ACTION_DELETE, n1->Copy()));
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_ADD, CreateNotification(4)));
+ syncer::SyncChange::ACTION_ADD, CreateNotification(4)));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -574,16 +574,16 @@ TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesIgnoreBadAdd) {
model()->Add(n2);
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Some adds and some deletes.
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_ADD, CreateNotification(1)));
+ syncer::SyncChange::ACTION_ADD, CreateNotification(1)));
- csync::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes);
+ syncer::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes);
EXPECT_FALSE(error.IsSet());
EXPECT_EQ(2U, model()->GetAllSyncData(syncable::APP_NOTIFICATIONS).size());
@@ -598,16 +598,16 @@ TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesIgnoreBadDelete) {
model()->Add(n2);
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Some adds and some deletes.
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_DELETE, CreateNotification(3)));
+ syncer::SyncChange::ACTION_DELETE, CreateNotification(3)));
- csync::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes);
+ syncer::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes);
EXPECT_FALSE(error.IsSet());
EXPECT_EQ(2U, model()->GetAllSyncData(syncable::APP_NOTIFICATIONS).size());
@@ -622,20 +622,20 @@ TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesIgnoreBadUpdates) {
model()->Add(n2);
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Some adds and some deletes.
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_UPDATE, CreateNotification(3)));
+ syncer::SyncChange::ACTION_UPDATE, CreateNotification(3)));
AppNotification* n2_changed = n2->Copy();
n2_changed->set_link_text(n2_changed->link_text() + "-changed");
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_UPDATE, n2_changed));
+ syncer::SyncChange::ACTION_UPDATE, n2_changed));
- csync::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes);
+ syncer::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes);
EXPECT_FALSE(error.IsSet());
EXPECT_EQ(2U, model()->GetAllSyncData(syncable::APP_NOTIFICATIONS).size());
@@ -647,14 +647,14 @@ TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesEmptyModelWithMax) {
const std::string& ext_id = "e1";
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
for (unsigned int i = 0;
i < AppNotificationManager::kMaxNotificationPerApp * 2; i++) {
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
changes.push_back(CreateSyncChange(
- csync::SyncChange::ACTION_ADD, CreateNotification(false, i, ext_id)));
+ syncer::SyncChange::ACTION_ADD, CreateNotification(false, i, ext_id)));
model()->ProcessSyncChanges(FROM_HERE, changes);
if (i < AppNotificationManager::kMaxNotificationPerApp) {
EXPECT_EQ(i + 1,
@@ -678,9 +678,9 @@ TEST_F(AppNotificationManagerSyncTest, StopSyncing) {
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_TRUE(model()->sync_processor_.get());
EXPECT_TRUE(model()->models_associated_);
@@ -694,9 +694,9 @@ TEST_F(AppNotificationManagerSyncTest, StopSyncing) {
TEST_F(AppNotificationManagerSyncTest, AddsGetsSynced) {
model()->MergeDataAndStartSyncing(
syncable::APP_NOTIFICATIONS,
- csync::SyncDataList(),
+ syncer::SyncDataList(),
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
AppNotification* n1 = CreateNotification(1);
model()->Add(n1);
@@ -707,10 +707,10 @@ TEST_F(AppNotificationManagerSyncTest, AddsGetsSynced) {
EXPECT_EQ(2U, processor()->change_list_size());
EXPECT_TRUE(processor()->ContainsGuid(n1->guid()));
- csync::SyncChange c1 = processor()->GetChangeByGuid(n1->guid());
- AssertSyncChange(c1, csync::SyncChange::ACTION_ADD, *n1);
- csync::SyncChange c2 = processor()->GetChangeByGuid(n2->guid());
- AssertSyncChange(c2, csync::SyncChange::ACTION_ADD, *n2);
+ syncer::SyncChange c1 = processor()->GetChangeByGuid(n1->guid());
+ AssertSyncChange(c1, syncer::SyncChange::ACTION_ADD, *n1);
+ syncer::SyncChange c2 = processor()->GetChangeByGuid(n2->guid());
+ AssertSyncChange(c2, syncer::SyncChange::ACTION_ADD, *n2);
}
// Clear all gets pushed to sync.
@@ -721,7 +721,7 @@ TEST_F(AppNotificationManagerSyncTest, ClearAllGetsSynced) {
scoped_ptr<AppNotification> n3(CreateNotification(false, 3, ext_id));
scoped_ptr<AppNotification> n4(CreateNotification(4));
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
initial_data.push_back(
AppNotificationManager::CreateSyncDataFromNotification(*n1));
initial_data.push_back(
@@ -734,16 +734,16 @@ TEST_F(AppNotificationManagerSyncTest, ClearAllGetsSynced) {
syncable::APP_NOTIFICATIONS,
initial_data,
PassProcessor(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
model()->ClearAll(ext_id);
EXPECT_EQ(3U, processor()->change_list_size());
EXPECT_TRUE(processor()->ContainsGuid(n1->guid()));
- csync::SyncChange c1 = processor()->GetChangeByGuid(n1->guid());
- AssertSyncChange(c1, csync::SyncChange::ACTION_DELETE, *n1);
- csync::SyncChange c2 = processor()->GetChangeByGuid(n2->guid());
- AssertSyncChange(c2, csync::SyncChange::ACTION_DELETE, *n2);
- csync::SyncChange c3 = processor()->GetChangeByGuid(n3->guid());
- AssertSyncChange(c3, csync::SyncChange::ACTION_DELETE, *n3);
+ syncer::SyncChange c1 = processor()->GetChangeByGuid(n1->guid());
+ AssertSyncChange(c1, syncer::SyncChange::ACTION_DELETE, *n1);
+ syncer::SyncChange c2 = processor()->GetChangeByGuid(n2->guid());
+ AssertSyncChange(c2, syncer::SyncChange::ACTION_DELETE, *n2);
+ syncer::SyncChange c3 = processor()->GetChangeByGuid(n3->guid());
+ AssertSyncChange(c3, syncer::SyncChange::ACTION_DELETE, *n3);
}
diff --git a/chrome/browser/extensions/app_sync_bundle.cc b/chrome/browser/extensions/app_sync_bundle.cc
index 79bd765..af26282 100644
--- a/chrome/browser/extensions/app_sync_bundle.cc
+++ b/chrome/browser/extensions/app_sync_bundle.cc
@@ -20,13 +20,14 @@ AppSyncBundle::AppSyncBundle(ExtensionService* extension_service)
AppSyncBundle::~AppSyncBundle() {}
-void AppSyncBundle::SetupSync(csync::SyncChangeProcessor* sync_change_processor,
- csync::SyncErrorFactory* sync_error_factory,
- const csync::SyncDataList& initial_sync_data) {
+void AppSyncBundle::SetupSync(
+ syncer::SyncChangeProcessor* sync_change_processor,
+ syncer::SyncErrorFactory* sync_error_factory,
+ const syncer::SyncDataList& initial_sync_data) {
sync_processor_.reset(sync_change_processor);
sync_error_factory_.reset(sync_error_factory);
- for (csync::SyncDataList::const_iterator i = initial_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator i = initial_sync_data.begin();
i != initial_sync_data.end();
++i) {
AppSyncData app_sync_data(*i);
@@ -42,34 +43,34 @@ void AppSyncBundle::Reset() {
pending_sync_data_.clear();
}
-csync::SyncChange AppSyncBundle::CreateSyncChangeToDelete(
+syncer::SyncChange AppSyncBundle::CreateSyncChangeToDelete(
const Extension* extension)
const {
AppSyncData sync_data = extension_service_->GetAppSyncData(*extension);
- return sync_data.GetSyncChange(csync::SyncChange::ACTION_DELETE);
+ return sync_data.GetSyncChange(syncer::SyncChange::ACTION_DELETE);
}
void AppSyncBundle::ProcessDeletion(std::string extension_id,
- const csync::SyncChange& sync_change) {
+ const syncer::SyncChange& sync_change) {
RemoveApp(extension_id);
sync_processor_->ProcessSyncChanges(FROM_HERE,
- csync::SyncChangeList(1, sync_change));
+ syncer::SyncChangeList(1, sync_change));
}
-csync::SyncChange AppSyncBundle::CreateSyncChange(
- const csync::SyncData& sync_data) {
+syncer::SyncChange AppSyncBundle::CreateSyncChange(
+ const syncer::SyncData& sync_data) {
if (HasExtensionId(sync_data.GetTag())) {
- return csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data);
+ return syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data);
} else {
AddApp(sync_data.GetTag());
- return csync::SyncChange(csync::SyncChange::ACTION_ADD, sync_data);
+ return syncer::SyncChange(syncer::SyncChange::ACTION_ADD, sync_data);
}
}
-csync::SyncDataList AppSyncBundle::GetAllSyncData() const {
+syncer::SyncDataList AppSyncBundle::GetAllSyncData() const {
std::vector<AppSyncData> app_sync_data =
extension_service_->GetAppSyncDataList();
- csync::SyncDataList result(app_sync_data.size());
+ syncer::SyncDataList result(app_sync_data.size());
for (int i = 0; i < static_cast<int>(app_sync_data.size()); ++i) {
result[i] = app_sync_data[i].GetSyncData();
}
@@ -79,9 +80,9 @@ csync::SyncDataList AppSyncBundle::GetAllSyncData() const {
void AppSyncBundle::SyncChangeIfNeeded(const Extension& extension) {
AppSyncData app_sync_data = extension_service_->GetAppSyncData(extension);
- csync::SyncChangeList sync_change_list(1, app_sync_data.GetSyncChange(
+ syncer::SyncChangeList sync_change_list(1, app_sync_data.GetSyncChange(
HasExtensionId(extension.id()) ?
- csync::SyncChange::ACTION_UPDATE : csync::SyncChange::ACTION_ADD));
+ syncer::SyncChange::ACTION_UPDATE : syncer::SyncChange::ACTION_ADD));
sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list);
MarkPendingAppSynced(extension.id());
}
@@ -95,7 +96,7 @@ void AppSyncBundle::ProcessSyncChange(AppSyncData app_sync_data) {
}
void AppSyncBundle::ProcessSyncChangeList(
- csync::SyncChangeList sync_change_list) {
+ syncer::SyncChangeList sync_change_list) {
sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list);
extension_service_->extension_prefs()->extension_sorting()->
FixNTPOrdinalCollisions();
diff --git a/chrome/browser/extensions/app_sync_bundle.h b/chrome/browser/extensions/app_sync_bundle.h
index 7088139..0e8635c 100644
--- a/chrome/browser/extensions/app_sync_bundle.h
+++ b/chrome/browser/extensions/app_sync_bundle.h
@@ -19,7 +19,7 @@
class ExtensionService;
class ExtensionSet;
-namespace csync {
+namespace syncer {
class SyncChangeProcessor;
class SyncErrorFactory;
}
@@ -35,26 +35,26 @@ class AppSyncBundle {
virtual ~AppSyncBundle();
// Setup this bundle to be sync application data.
- void SetupSync(csync::SyncChangeProcessor* sync_proccessor,
- csync::SyncErrorFactory* sync_error_factory,
- const csync::SyncDataList& initial_sync_data);
+ void SetupSync(syncer::SyncChangeProcessor* sync_proccessor,
+ syncer::SyncErrorFactory* sync_error_factory,
+ const syncer::SyncDataList& initial_sync_data);
// Resets this class back to it default values, which will disable all syncing
// until a new sync processor is set.
void Reset();
- // Returns a csync::SyncChange that will delete the given application.
- csync::SyncChange CreateSyncChangeToDelete(const Extension* extension) const;
+ // Returns a syncer::SyncChange that will delete the given application.
+ syncer::SyncChange CreateSyncChangeToDelete(const Extension* extension) const;
// Process the sync deletion of the given application.
void ProcessDeletion(
- std::string extension_id, const csync::SyncChange& sync_change);
+ std::string extension_id, const syncer::SyncChange& sync_change);
// Create a sync change based on |sync_data|.
- csync::SyncChange CreateSyncChange(const csync::SyncData& sync_data);
+ syncer::SyncChange CreateSyncChange(const syncer::SyncData& sync_data);
// Get all the sync data contained in this bundle.
- csync::SyncDataList GetAllSyncData() const;
+ syncer::SyncDataList GetAllSyncData() const;
// Sync a newly-installed application or change an existing one.
void SyncChangeIfNeeded(const Extension& extension);
@@ -63,7 +63,7 @@ class AppSyncBundle {
void ProcessSyncChange(AppSyncData app_sync_data);
// Process the list of sync changes.
- void ProcessSyncChangeList(csync::SyncChangeList sync_change_list);
+ void ProcessSyncChangeList(syncer::SyncChangeList sync_change_list);
// Check to see if the given |id| is either synced or pending to be synced.
bool HasExtensionId(const std::string& id) const;
@@ -95,8 +95,8 @@ class AppSyncBundle {
void MarkPendingAppSynced(const std::string& id);
ExtensionService* extension_service_; // Own us.
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
std::set<std::string> synced_apps_;
std::map<std::string, AppSyncData> pending_sync_data_;
diff --git a/chrome/browser/extensions/app_sync_data.cc b/chrome/browser/extensions/app_sync_data.cc
index 62927ee..babdedc 100644
--- a/chrome/browser/extensions/app_sync_data.cc
+++ b/chrome/browser/extensions/app_sync_data.cc
@@ -13,16 +13,16 @@ namespace extensions {
AppSyncData::AppSyncData() : notifications_disabled_(false) {}
-AppSyncData::AppSyncData(const csync::SyncData& sync_data)
+AppSyncData::AppSyncData(const syncer::SyncData& sync_data)
: notifications_disabled_(false) {
PopulateFromSyncData(sync_data);
}
-AppSyncData::AppSyncData(const csync::SyncChange& sync_change)
+AppSyncData::AppSyncData(const syncer::SyncChange& sync_change)
: notifications_disabled_(false) {
PopulateFromSyncData(sync_change.sync_data());
extension_sync_data_.set_uninstalled(
- sync_change.change_type() == csync::SyncChange::ACTION_DELETE);
+ sync_change.change_type() == syncer::SyncChange::ACTION_DELETE);
}
AppSyncData::AppSyncData(const Extension& extension,
@@ -41,18 +41,18 @@ AppSyncData::AppSyncData(const Extension& extension,
AppSyncData::~AppSyncData() {}
-csync::SyncData AppSyncData::GetSyncData() const {
+syncer::SyncData AppSyncData::GetSyncData() const {
sync_pb::EntitySpecifics specifics;
PopulateAppSpecifics(specifics.mutable_app());
- return csync::SyncData::CreateLocalData(extension_sync_data_.id(),
+ return syncer::SyncData::CreateLocalData(extension_sync_data_.id(),
extension_sync_data_.name(),
specifics);
}
-csync::SyncChange AppSyncData::GetSyncChange(
- csync::SyncChange::SyncChangeType change_type) const {
- return csync::SyncChange(change_type, GetSyncData());
+syncer::SyncChange AppSyncData::GetSyncChange(
+ syncer::SyncChange::SyncChangeType change_type) const {
+ return syncer::SyncChange(change_type, GetSyncData());
}
void AppSyncData::PopulateAppSpecifics(sync_pb::AppSpecifics* specifics) const {
@@ -92,7 +92,7 @@ void AppSyncData::PopulateFromAppSpecifics(
page_ordinal_ = StringOrdinal(specifics.page_ordinal());
}
-void AppSyncData::PopulateFromSyncData(const csync::SyncData& sync_data) {
+void AppSyncData::PopulateFromSyncData(const syncer::SyncData& sync_data) {
PopulateFromAppSpecifics(sync_data.GetSpecifics().app());
}
diff --git a/chrome/browser/extensions/app_sync_data.h b/chrome/browser/extensions/app_sync_data.h
index 353acd5..bf830cf 100644
--- a/chrome/browser/extensions/app_sync_data.h
+++ b/chrome/browser/extensions/app_sync_data.h
@@ -10,7 +10,7 @@
#include "chrome/common/string_ordinal.h"
#include "sync/api/sync_change.h"
-namespace csync {
+namespace syncer {
class SyncData;
}
@@ -27,8 +27,8 @@ class ExtensionSyncData;
class AppSyncData {
public:
AppSyncData();
- explicit AppSyncData(const csync::SyncData& sync_data);
- explicit AppSyncData(const csync::SyncChange& sync_change);
+ explicit AppSyncData(const syncer::SyncData& sync_data);
+ explicit AppSyncData(const syncer::SyncChange& sync_change);
AppSyncData(const Extension& extension,
bool enabled,
bool incognito_enabled,
@@ -39,9 +39,9 @@ class AppSyncData {
~AppSyncData();
// Retrive sync data from this class.
- csync::SyncData GetSyncData() const;
- csync::SyncChange GetSyncChange(
- csync::SyncChange::SyncChangeType change_type) const;
+ syncer::SyncData GetSyncData() const;
+ syncer::SyncChange GetSyncChange(
+ syncer::SyncChange::SyncChangeType change_type) const;
const std::string& id() const { return extension_sync_data_.id(); }
@@ -73,7 +73,7 @@ class AppSyncData {
// Populate this class from sync inputs.
void PopulateFromAppSpecifics(
const sync_pb::AppSpecifics& specifics);
- void PopulateFromSyncData(const csync::SyncData& sync_data);
+ void PopulateFromSyncData(const syncer::SyncData& sync_data);
ExtensionSyncData extension_sync_data_;
std::string notifications_client_id_;
diff --git a/chrome/browser/extensions/app_sync_data_unittest.cc b/chrome/browser/extensions/app_sync_data_unittest.cc
index b7397e0..18f676f 100644
--- a/chrome/browser/extensions/app_sync_data_unittest.cc
+++ b/chrome/browser/extensions/app_sync_data_unittest.cc
@@ -51,8 +51,8 @@ TEST_F(AppSyncDataTest, SyncDataToExtensionSyncDataForApp) {
SetRequiredExtensionValues(app_specifics->mutable_extension());
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
AppSyncData app_sync_data(sync_data);
EXPECT_EQ(app_specifics->app_launch_ordinal(),
@@ -81,11 +81,11 @@ TEST_F(AppSyncDataTest, ExtensionSyncDataToSyncDataForApp) {
SetRequiredExtensionValues(input_specifics->mutable_extension());
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
AppSyncData app_sync_data(sync_data);
- csync::SyncData output_sync_data = app_sync_data.GetSyncData();
+ syncer::SyncData output_sync_data = app_sync_data.GetSyncData();
EXPECT_TRUE(sync_data.GetSpecifics().has_app());
const sync_pb::AppSpecifics& output_specifics =
output_sync_data.GetSpecifics().app();
@@ -108,8 +108,8 @@ TEST_F(AppSyncDataTest, ExtensionSyncDataInvalidOrdinal) {
SetRequiredExtensionValues(app_specifics->mutable_extension());
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
// There should be no issue loading the sync data.
AppSyncData app_sync_data(sync_data);
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 8ca041b..d2830b8 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -706,7 +706,7 @@ bool ExtensionService::UninstallExtension(
// Extract the data we need for sync now, but don't actually sync until we've
// completed the uninstallation.
- csync::SyncChange sync_change;
+ syncer::SyncChange sync_change;
if (app_sync_bundle_.HandlesApp(*extension)) {
sync_change = app_sync_bundle_.CreateSyncChangeToDelete(extension);
} else if (extension_sync_bundle_.HandlesExtension(*extension)) {
@@ -1191,11 +1191,11 @@ void ExtensionService::CheckForUpdatesSoon() {
}
}
-csync::SyncError ExtensionService::MergeDataAndStartSyncing(
+syncer::SyncError ExtensionService::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
CHECK(sync_processor.get());
CHECK(sync_error_factory.get());
@@ -1219,9 +1219,9 @@ csync::SyncError ExtensionService::MergeDataAndStartSyncing(
// Process local extensions.
// TODO(yoz): Determine whether pending extensions should be considered too.
// See crbug.com/104399.
- csync::SyncDataList sync_data_list = GetAllSyncData(type);
- csync::SyncChangeList sync_change_list;
- for (csync::SyncDataList::const_iterator i = sync_data_list.begin();
+ syncer::SyncDataList sync_data_list = GetAllSyncData(type);
+ syncer::SyncChangeList sync_change_list;
+ for (syncer::SyncDataList::const_iterator i = sync_data_list.begin();
i != sync_data_list.end();
++i) {
switch (type) {
@@ -1244,7 +1244,7 @@ csync::SyncError ExtensionService::MergeDataAndStartSyncing(
app_sync_bundle_.ProcessSyncChangeList(sync_change_list);
}
- return csync::SyncError();
+ return syncer::SyncError();
}
void ExtensionService::StopSyncing(syncable::ModelType type) {
@@ -1255,7 +1255,7 @@ void ExtensionService::StopSyncing(syncable::ModelType type) {
}
}
-csync::SyncDataList ExtensionService::GetAllSyncData(
+syncer::SyncDataList ExtensionService::GetAllSyncData(
syncable::ModelType type) const {
if (type == syncable::EXTENSIONS) {
return extension_sync_bundle_.GetAllSyncData();
@@ -1267,13 +1267,13 @@ csync::SyncDataList ExtensionService::GetAllSyncData(
// We should only get sync data for extensions and apps.
NOTREACHED();
- return csync::SyncDataList();
+ return syncer::SyncDataList();
}
-csync::SyncError ExtensionService::ProcessSyncChanges(
+syncer::SyncError ExtensionService::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
- for (csync::SyncChangeList::const_iterator i = change_list.begin();
+ const syncer::SyncChangeList& change_list) {
+ for (syncer::SyncChangeList::const_iterator i = change_list.begin();
i != change_list.end();
++i) {
syncable::ModelType type = i->sync_data().GetDataType();
@@ -1287,7 +1287,7 @@ csync::SyncError ExtensionService::ProcessSyncChanges(
extension_prefs()->extension_sorting()->FixNTPOrdinalCollisions();
- return csync::SyncError();
+ return syncer::SyncError();
}
extensions::ExtensionSyncData ExtensionService::GetExtensionSyncData(
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 9e27b3a..eb23402 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -72,7 +72,7 @@ class ExtensionBluetoothEventRouter;
class ExtensionInputMethodEventRouter;
}
-namespace csync {
+namespace syncer {
class SyncData;
class SyncErrorFactory;
}
@@ -91,7 +91,7 @@ class WebNavigationEventRouter;
// This is an interface class to encapsulate the dependencies that
// various classes have on ExtensionService. This allows easy mocking.
-class ExtensionServiceInterface : public csync::SyncableService {
+class ExtensionServiceInterface : public syncer::SyncableService {
public:
// A function that returns true if the given extension should be
// included and false if it should be filtered out. Identical to
@@ -421,18 +421,18 @@ class ExtensionService
virtual void CheckForUpdatesSoon() OVERRIDE;
- // csync::SyncableService implementation.
- virtual csync::SyncError MergeDataAndStartSyncing(
+ // syncer::SyncableService implementation.
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
- virtual csync::SyncDataList GetAllSyncData(
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
// Gets the sync data for the given extension, assuming that the extension is
// syncable.
@@ -619,7 +619,7 @@ class ExtensionService
AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; }
- // Specialization of csync::SyncableService::AsWeakPtr.
+ // Specialization of syncer::SyncableService::AsWeakPtr.
base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); }
private:
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index a7991f5..e55a254 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -4208,11 +4208,11 @@ TEST_F(ExtensionServiceTest, ComponentExtensions) {
}
namespace {
- class TestSyncProcessorStub : public csync::SyncChangeProcessor {
- virtual csync::SyncError ProcessSyncChanges(
+ class TestSyncProcessorStub : public syncer::SyncChangeProcessor {
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE {
- return csync::SyncError();
+ const syncer::SyncChangeList& change_list) OVERRIDE {
+ return syncer::SyncError();
}
};
}
@@ -4224,11 +4224,11 @@ TEST_F(ExtensionServiceTest, GetSyncData) {
ASSERT_TRUE(extension);
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
- csync::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
ASSERT_EQ(list.size(), 1U);
extensions::ExtensionSyncData data(list[0]);
EXPECT_EQ(extension->id(), data.id());
@@ -4249,11 +4249,11 @@ TEST_F(ExtensionServiceTest, GetSyncDataTerminated) {
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
- csync::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
ASSERT_EQ(list.size(), 1U);
extensions::ExtensionSyncData data(list[0]);
EXPECT_EQ(extension->id(), data.id());
@@ -4272,11 +4272,11 @@ TEST_F(ExtensionServiceTest, GetSyncDataFilter) {
ASSERT_TRUE(extension);
TestSyncProcessorStub processor;
- service_->MergeDataAndStartSyncing(syncable::APPS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ service_->MergeDataAndStartSyncing(syncable::APPS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
- csync::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
ASSERT_EQ(list.size(), 0U);
}
@@ -4288,12 +4288,12 @@ TEST_F(ExtensionServiceTest, GetSyncExtensionDataUserSettings) {
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
ASSERT_EQ(list.size(), 1U);
extensions::ExtensionSyncData data(list[0]);
EXPECT_TRUE(data.enabled());
@@ -4302,7 +4302,7 @@ TEST_F(ExtensionServiceTest, GetSyncExtensionDataUserSettings) {
service_->DisableExtension(good_crx, Extension::DISABLE_USER_ACTION);
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
ASSERT_EQ(list.size(), 1U);
extensions::ExtensionSyncData data(list[0]);
EXPECT_FALSE(data.enabled());
@@ -4311,7 +4311,7 @@ TEST_F(ExtensionServiceTest, GetSyncExtensionDataUserSettings) {
service_->SetIsIncognitoEnabled(good_crx, true);
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
ASSERT_EQ(list.size(), 1U);
extensions::ExtensionSyncData data(list[0]);
EXPECT_FALSE(data.enabled());
@@ -4320,7 +4320,7 @@ TEST_F(ExtensionServiceTest, GetSyncExtensionDataUserSettings) {
service_->EnableExtension(good_crx);
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::EXTENSIONS);
ASSERT_EQ(list.size(), 1U);
extensions::ExtensionSyncData data(list[0]);
EXPECT_TRUE(data.enabled());
@@ -4337,9 +4337,9 @@ TEST_F(ExtensionServiceTest, SyncForUninstalledExternalExtension) {
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
UninstallExtension(good_crx, false);
EXPECT_TRUE(service_->IsExternalExtensionUninstalled(good_crx));
@@ -4352,10 +4352,10 @@ TEST_F(ExtensionServiceTest, SyncForUninstalledExternalExtension) {
extension_specifics->set_version("1.0");
extension_specifics->set_enabled(true);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
service_->ProcessSyncChanges(FROM_HERE, list);
@@ -4370,13 +4370,13 @@ TEST_F(ExtensionServiceTest, GetSyncAppDataUserSettings) {
ASSERT_TRUE(app->is_app());
TestSyncProcessorStub processor;
- service_->MergeDataAndStartSyncing(syncable::APPS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ service_->MergeDataAndStartSyncing(syncable::APPS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
StringOrdinal initial_ordinal = StringOrdinal::CreateInitialOrdinal();
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
ASSERT_EQ(list.size(), 1U);
extensions::AppSyncData app_sync_data(list[0]);
@@ -4387,7 +4387,7 @@ TEST_F(ExtensionServiceTest, GetSyncAppDataUserSettings) {
ExtensionSorting* sorting = service_->extension_prefs()->extension_sorting();
sorting->SetAppLaunchOrdinal(app->id(), initial_ordinal.CreateAfter());
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
ASSERT_EQ(list.size(), 1U);
extensions::AppSyncData app_sync_data(list[0]);
@@ -4397,7 +4397,7 @@ TEST_F(ExtensionServiceTest, GetSyncAppDataUserSettings) {
sorting->SetPageOrdinal(app->id(), initial_ordinal.CreateAfter());
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
ASSERT_EQ(list.size(), 1U);
extensions::AppSyncData app_sync_data(list[0]);
@@ -4419,13 +4419,13 @@ TEST_F(ExtensionServiceTest, GetSyncAppDataUserSettingsOnExtensionMoved) {
}
TestSyncProcessorStub processor;
- service_->MergeDataAndStartSyncing(syncable::APPS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ service_->MergeDataAndStartSyncing(syncable::APPS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
service_->OnExtensionMoved(apps[0]->id(), apps[1]->id(), apps[2]->id());
{
- csync::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
+ syncer::SyncDataList list = service_->GetAllSyncData(syncable::APPS);
ASSERT_EQ(list.size(), 3U);
extensions::AppSyncData data[kAppCount];
@@ -4458,13 +4458,13 @@ TEST_F(ExtensionServiceTest, GetSyncDataList) {
InstallCRX(data_dir_.AppendASCII("theme2.crx"), INSTALL_NEW);
TestSyncProcessorStub processor;
- service_->MergeDataAndStartSyncing(syncable::APPS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ service_->MergeDataAndStartSyncing(syncable::APPS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
service_->DisableExtension(page_action, Extension::DISABLE_USER_ACTION);
TerminateExtension(theme2_crx);
@@ -4477,18 +4477,18 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataUninstall) {
InitializeEmptyExtensionService();
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
sync_pb::EntitySpecifics specifics;
sync_pb::ExtensionSpecifics* ext_specifics = specifics.mutable_extension();
ext_specifics->set_id(good_crx);
ext_specifics->set_version("1.0");
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_DELETE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(syncer::SyncChange::ACTION_DELETE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
// Should do nothing.
@@ -4527,10 +4527,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataWrongType) {
{
extension_specifics->set_enabled(true);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_DELETE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_DELETE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
// Should do nothing
@@ -4540,10 +4541,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataWrongType) {
{
extension_specifics->set_enabled(false);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
// Should again do nothing.
@@ -4557,9 +4559,9 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataSettings) {
InitializeExtensionProcessManager();
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
InstallCRX(data_dir_.AppendASCII("good.crx"), INSTALL_NEW);
EXPECT_TRUE(service_->IsExtensionEnabled(good_crx));
@@ -4573,10 +4575,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataSettings) {
ext_specifics->set_enabled(false);
{
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
service_->ProcessSyncChanges(FROM_HERE, list);
EXPECT_FALSE(service_->IsExtensionEnabled(good_crx));
@@ -4586,10 +4589,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataSettings) {
{
ext_specifics->set_enabled(true);
ext_specifics->set_incognito_enabled(true);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
service_->ProcessSyncChanges(FROM_HERE, list);
EXPECT_TRUE(service_->IsExtensionEnabled(good_crx));
@@ -4599,10 +4603,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataSettings) {
{
ext_specifics->set_enabled(false);
ext_specifics->set_incognito_enabled(true);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
service_->ProcessSyncChanges(FROM_HERE, list);
EXPECT_FALSE(service_->IsExtensionEnabled(good_crx));
@@ -4616,9 +4621,9 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataTerminatedExtension) {
InitializeExtensionServiceWithUpdater();
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
InstallCRX(data_dir_.AppendASCII("good.crx"), INSTALL_NEW);
TerminateExtension(good_crx);
@@ -4632,10 +4637,10 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataTerminatedExtension) {
service_->GetInstalledExtension(good_crx)->version()->GetString());
ext_specifics->set_enabled(false);
ext_specifics->set_incognito_enabled(true);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
service_->ProcessSyncChanges(FROM_HERE, list);
@@ -4650,9 +4655,9 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataVersionCheck) {
InitializeRequestContext();
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
InstallCRX(data_dir_.AppendASCII("good.crx"), INSTALL_NEW);
EXPECT_TRUE(service_->IsExtensionEnabled(good_crx));
@@ -4666,10 +4671,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataVersionCheck) {
{
ext_specifics->set_version(
service_->GetInstalledExtension(good_crx)->version()->GetString());
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
// Should do nothing if extension version == sync version.
@@ -4681,10 +4687,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataVersionCheck) {
// the TODO in ProcessExtensionSyncData).
{
ext_specifics->set_version("0.0.0.0");
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
service_->ProcessSyncChanges(FROM_HERE, list);
@@ -4694,10 +4701,11 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataVersionCheck) {
// Should kick off an update if extension version < sync version.
{
ext_specifics->set_version("9.9.9.9");
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(
+ syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
service_->ProcessSyncChanges(FROM_HERE, list);
@@ -4712,9 +4720,9 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataNotInstalled) {
InitializeRequestContext();
TestSyncProcessorStub processor;
service_->MergeDataAndStartSyncing(
- syncable::EXTENSIONS, csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(new TestSyncProcessorStub),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncable::EXTENSIONS, syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessorStub),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
sync_pb::EntitySpecifics specifics;
sync_pb::ExtensionSpecifics* ext_specifics = specifics.mutable_extension();
@@ -4723,10 +4731,10 @@ TEST_F(ExtensionServiceTest, ProcessSyncDataNotInstalled) {
ext_specifics->set_incognito_enabled(true);
ext_specifics->set_update_url("http://www.google.com/");
ext_specifics->set_version("1.2.3.4");
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData(good_crx, "Name", specifics);
- csync::SyncChange sync_change(csync::SyncChange::ACTION_UPDATE, sync_data);
- csync::SyncChangeList list(1);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData(good_crx, "Name", specifics);
+ syncer::SyncChange sync_change(syncer::SyncChange::ACTION_UPDATE, sync_data);
+ syncer::SyncChangeList list(1);
list[0] = sync_change;
diff --git a/chrome/browser/extensions/extension_sync_bundle.cc b/chrome/browser/extensions/extension_sync_bundle.cc
index 37fa530..91c71bb 100644
--- a/chrome/browser/extensions/extension_sync_bundle.cc
+++ b/chrome/browser/extensions/extension_sync_bundle.cc
@@ -20,13 +20,13 @@ ExtensionSyncBundle::ExtensionSyncBundle(ExtensionService* extension_service)
ExtensionSyncBundle::~ExtensionSyncBundle() {}
void ExtensionSyncBundle::SetupSync(
- csync::SyncChangeProcessor* sync_processor,
- csync::SyncErrorFactory* sync_error_factory,
- const csync::SyncDataList& initial_sync_data) {
+ syncer::SyncChangeProcessor* sync_processor,
+ syncer::SyncErrorFactory* sync_error_factory,
+ const syncer::SyncDataList& initial_sync_data) {
sync_processor_.reset(sync_processor);
sync_error_factory_.reset(sync_error_factory);
- for (csync::SyncDataList::const_iterator i = initial_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator i = initial_sync_data.begin();
i != initial_sync_data.end();
++i) {
ExtensionSyncData extension_sync_data(*i);
@@ -42,34 +42,34 @@ void ExtensionSyncBundle::Reset() {
pending_sync_data_.clear();
}
-csync::SyncChange ExtensionSyncBundle::CreateSyncChangeToDelete(
+syncer::SyncChange ExtensionSyncBundle::CreateSyncChangeToDelete(
const Extension* extension) const {
extensions::ExtensionSyncData sync_data =
extension_service_->GetExtensionSyncData(*extension);
- return sync_data.GetSyncChange(csync::SyncChange::ACTION_DELETE);
+ return sync_data.GetSyncChange(syncer::SyncChange::ACTION_DELETE);
}
void ExtensionSyncBundle::ProcessDeletion(
- std::string extension_id, const csync::SyncChange& sync_change) {
+ std::string extension_id, const syncer::SyncChange& sync_change) {
RemoveExtension(extension_id);
sync_processor_->ProcessSyncChanges(FROM_HERE,
- csync::SyncChangeList(1, sync_change));
+ syncer::SyncChangeList(1, sync_change));
}
-csync::SyncChange ExtensionSyncBundle::CreateSyncChange(
- const csync::SyncData& sync_data) {
+syncer::SyncChange ExtensionSyncBundle::CreateSyncChange(
+ const syncer::SyncData& sync_data) {
if (HasExtensionId(sync_data.GetTag())) {
- return csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data);
+ return syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data);
} else {
AddExtension(sync_data.GetTag());
- return csync::SyncChange(csync::SyncChange::ACTION_ADD, sync_data);
+ return syncer::SyncChange(syncer::SyncChange::ACTION_ADD, sync_data);
}
}
-csync::SyncDataList ExtensionSyncBundle::GetAllSyncData() const {
+syncer::SyncDataList ExtensionSyncBundle::GetAllSyncData() const {
std::vector<ExtensionSyncData> extension_sync_data =
extension_service_->GetExtensionSyncDataList();
- csync::SyncDataList result(extension_sync_data.size());
+ syncer::SyncDataList result(extension_sync_data.size());
for (int i = 0; i < static_cast<int>(extension_sync_data.size()); ++i) {
result[i] = extension_sync_data[i].GetSyncData();
}
@@ -80,9 +80,9 @@ void ExtensionSyncBundle::SyncChangeIfNeeded(const Extension& extension) {
ExtensionSyncData extension_sync_data =
extension_service_->GetExtensionSyncData(extension);
- csync::SyncChangeList sync_change_list(1, extension_sync_data.GetSyncChange(
+ syncer::SyncChangeList sync_change_list(1, extension_sync_data.GetSyncChange(
HasExtensionId(extension.id()) ?
- csync::SyncChange::ACTION_UPDATE : csync::SyncChange::ACTION_ADD));
+ syncer::SyncChange::ACTION_UPDATE : syncer::SyncChange::ACTION_ADD));
sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list);
MarkPendingExtensionSynced(extension.id());
}
@@ -97,7 +97,7 @@ void ExtensionSyncBundle::ProcessSyncChange(
}
void ExtensionSyncBundle::ProcessSyncChangeList(
- csync::SyncChangeList sync_change_list) {
+ syncer::SyncChangeList sync_change_list) {
sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list);
}
diff --git a/chrome/browser/extensions/extension_sync_bundle.h b/chrome/browser/extensions/extension_sync_bundle.h
index 6c4fe1b..ec29d76 100644
--- a/chrome/browser/extensions/extension_sync_bundle.h
+++ b/chrome/browser/extensions/extension_sync_bundle.h
@@ -19,7 +19,7 @@
class ExtensionService;
class ExtensionSet;
-namespace csync {
+namespace syncer {
class SyncChangeProcessor;
class SyncErrorFactory;
}
@@ -35,26 +35,26 @@ class ExtensionSyncBundle {
~ExtensionSyncBundle();
// Setup this bundle to be sync extension data.
- void SetupSync(csync::SyncChangeProcessor* sync_processor,
- csync::SyncErrorFactory* sync_error_factory,
- const csync::SyncDataList& initial_sync_data);
+ void SetupSync(syncer::SyncChangeProcessor* sync_processor,
+ syncer::SyncErrorFactory* sync_error_factory,
+ const syncer::SyncDataList& initial_sync_data);
// Resets this class back to it default values, which will disable all syncing
// until a new sync processor is set.
void Reset();
- // Returns a csync::SyncChange that will delete the given extension.
- csync::SyncChange CreateSyncChangeToDelete(const Extension* extension) const;
+ // Returns a syncer::SyncChange that will delete the given extension.
+ syncer::SyncChange CreateSyncChangeToDelete(const Extension* extension) const;
// Process the sync deletion of the given extension.
void ProcessDeletion(
- std::string extension_id, const csync::SyncChange& sync_change);
+ std::string extension_id, const syncer::SyncChange& sync_change);
// Create a sync change based on |sync_data|.
- csync::SyncChange CreateSyncChange(const csync::SyncData& sync_data);
+ syncer::SyncChange CreateSyncChange(const syncer::SyncData& sync_data);
// Get all the sync data contained in this bundle.
- csync::SyncDataList GetAllSyncData() const;
+ syncer::SyncDataList GetAllSyncData() const;
// Process the given sync change and apply it.
void ProcessSyncChange(ExtensionSyncData extension_sync_data);
@@ -63,7 +63,7 @@ class ExtensionSyncBundle {
void SyncChangeIfNeeded(const Extension& extension);
// Process the list of sync changes.
- void ProcessSyncChangeList(csync::SyncChangeList sync_change_list);
+ void ProcessSyncChangeList(syncer::SyncChangeList sync_change_list);
// Check to see if the given |id| is either synced or pending to be synced.
bool HasExtensionId(const std::string& id) const;
@@ -95,8 +95,8 @@ class ExtensionSyncBundle {
void MarkPendingExtensionSynced(const std::string& id);
ExtensionService* extension_service_; // Owns us.
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
std::set<std::string> synced_extensions_;
std::map<std::string, ExtensionSyncData> pending_sync_data_;
diff --git a/chrome/browser/extensions/extension_sync_data.cc b/chrome/browser/extensions/extension_sync_data.cc
index ced1cbf..d395b19 100644
--- a/chrome/browser/extensions/extension_sync_data.cc
+++ b/chrome/browser/extensions/extension_sync_data.cc
@@ -20,16 +20,16 @@ ExtensionSyncData::ExtensionSyncData()
incognito_enabled_(false) {
}
-ExtensionSyncData::ExtensionSyncData(const csync::SyncData& sync_data)
+ExtensionSyncData::ExtensionSyncData(const syncer::SyncData& sync_data)
: uninstalled_(false),
enabled_(false),
incognito_enabled_(false) {
PopulateFromSyncData(sync_data);
}
-ExtensionSyncData::ExtensionSyncData(const csync::SyncChange& sync_change)
+ExtensionSyncData::ExtensionSyncData(const syncer::SyncChange& sync_change)
: uninstalled_(
- sync_change.change_type() == csync::SyncChange::ACTION_DELETE),
+ sync_change.change_type() == syncer::SyncChange::ACTION_DELETE),
enabled_(false),
incognito_enabled_(false) {
PopulateFromSyncData(sync_change.sync_data());
@@ -49,16 +49,16 @@ ExtensionSyncData::ExtensionSyncData(const Extension& extension,
ExtensionSyncData::~ExtensionSyncData() {}
-csync::SyncData ExtensionSyncData::GetSyncData() const {
+syncer::SyncData ExtensionSyncData::GetSyncData() const {
sync_pb::EntitySpecifics specifics;
PopulateExtensionSpecifics(specifics.mutable_extension());
- return csync::SyncData::CreateLocalData(id_, name_, specifics);
+ return syncer::SyncData::CreateLocalData(id_, name_, specifics);
}
-csync::SyncChange ExtensionSyncData::GetSyncChange(
- csync::SyncChange::SyncChangeType change_type) const {
- return csync::SyncChange(change_type, GetSyncData());
+syncer::SyncChange ExtensionSyncData::GetSyncChange(
+ syncer::SyncChange::SyncChangeType change_type) const {
+ return syncer::SyncChange(change_type, GetSyncData());
}
void ExtensionSyncData::PopulateExtensionSpecifics(
@@ -100,7 +100,8 @@ void ExtensionSyncData::set_uninstalled(bool uninstalled) {
uninstalled_ = uninstalled;
}
-void ExtensionSyncData::PopulateFromSyncData(const csync::SyncData& sync_data) {
+void ExtensionSyncData::PopulateFromSyncData(
+ const syncer::SyncData& sync_data) {
const sync_pb::EntitySpecifics& entity_specifics = sync_data.GetSpecifics();
if (entity_specifics.has_extension()) {
diff --git a/chrome/browser/extensions/extension_sync_data.h b/chrome/browser/extensions/extension_sync_data.h
index bbd3cdd..3b54f57 100644
--- a/chrome/browser/extensions/extension_sync_data.h
+++ b/chrome/browser/extensions/extension_sync_data.h
@@ -13,7 +13,7 @@
#include "googleurl/src/gurl.h"
#include "sync/api/sync_change.h"
-namespace csync {
+namespace syncer {
class SyncData;
}
@@ -29,17 +29,17 @@ class Extension;
class ExtensionSyncData {
public:
ExtensionSyncData();
- explicit ExtensionSyncData(const csync::SyncData& sync_data);
- explicit ExtensionSyncData(const csync::SyncChange& sync_change);
+ explicit ExtensionSyncData(const syncer::SyncData& sync_data);
+ explicit ExtensionSyncData(const syncer::SyncChange& sync_change);
ExtensionSyncData(const Extension& extension,
bool enabled,
bool incognito_enabled);
~ExtensionSyncData();
// Retrieve sync data from this class.
- csync::SyncData GetSyncData() const;
- csync::SyncChange GetSyncChange(
- csync::SyncChange::SyncChangeType change_type) const;
+ syncer::SyncData GetSyncData() const;
+ syncer::SyncChange GetSyncChange(
+ syncer::SyncChange::SyncChangeType change_type) const;
// Convert an ExtensionSyncData back out to a sync structure.
void PopulateExtensionSpecifics(sync_pb::ExtensionSpecifics* specifics) const;
@@ -68,7 +68,7 @@ class ExtensionSyncData {
private:
// Populate this class from sync inputs.
- void PopulateFromSyncData(const csync::SyncData& sync_data);
+ void PopulateFromSyncData(const syncer::SyncData& sync_data);
std::string id_;
bool uninstalled_;
diff --git a/chrome/browser/extensions/extension_sync_data_unittest.cc b/chrome/browser/extensions/extension_sync_data_unittest.cc
index 5ccdf63..df8d11a 100644
--- a/chrome/browser/extensions/extension_sync_data_unittest.cc
+++ b/chrome/browser/extensions/extension_sync_data_unittest.cc
@@ -44,8 +44,8 @@ TEST_F(ExtensionSyncDataTest, SyncDataToExtensionSyncDataForExtension) {
extension_specifics->set_incognito_enabled(true);
extension_specifics->set_version(kVersion1);
extension_specifics->set_name(kName);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
extensions::ExtensionSyncData extension_sync_data(sync_data);
EXPECT_EQ(extension_specifics->id(), extension_sync_data.id());
@@ -69,11 +69,11 @@ TEST_F(ExtensionSyncDataTest, ExtensionSyncDataToSyncDataForExtension) {
input_extension->set_incognito_enabled(false);
input_extension->set_version(kVersion1);
input_extension->set_name(kName);
- csync::SyncData sync_data =
- csync::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
+ syncer::SyncData sync_data =
+ syncer::SyncData::CreateLocalData("sync_tag", "non_unique_title", entity);
extensions::ExtensionSyncData extension_sync_data(sync_data);
- csync::SyncData output_sync_data = extension_sync_data.GetSyncData();
+ syncer::SyncData output_sync_data = extension_sync_data.GetSyncData();
const sync_pb::ExtensionSpecifics& output_specifics =
output_sync_data.GetSpecifics().extension();
EXPECT_EQ(extension_sync_data.id(), output_specifics.id());
diff --git a/chrome/browser/extensions/settings/setting_sync_data.cc b/chrome/browser/extensions/settings/setting_sync_data.cc
index 54546b4..4baf04c 100644
--- a/chrome/browser/extensions/settings/setting_sync_data.cc
+++ b/chrome/browser/extensions/settings/setting_sync_data.cc
@@ -14,18 +14,18 @@
namespace extensions {
SettingSyncData::SettingSyncData(
- const csync::SyncChange& sync_change) {
+ const syncer::SyncChange& sync_change) {
Init(sync_change.change_type(), sync_change.sync_data());
}
SettingSyncData::SettingSyncData(
- const csync::SyncData& sync_data) {
- Init(csync::SyncChange::ACTION_INVALID, sync_data);
+ const syncer::SyncData& sync_data) {
+ Init(syncer::SyncChange::ACTION_INVALID, sync_data);
}
void SettingSyncData::Init(
- csync::SyncChange::SyncChangeType change_type,
- const csync::SyncData& sync_data) {
+ syncer::SyncChange::SyncChangeType change_type,
+ const syncer::SyncData& sync_data) {
DCHECK(!internal_.get());
sync_pb::EntitySpecifics specifics = sync_data.GetSpecifics();
// The data must only be either extension or app specfics.
@@ -43,7 +43,7 @@ void SettingSyncData::Init(
}
void SettingSyncData::InitFromExtensionSettingSpecifics(
- csync::SyncChange::SyncChangeType change_type,
+ syncer::SyncChange::SyncChangeType change_type,
const sync_pb::ExtensionSettingSpecifics& specifics) {
DCHECK(!internal_.get());
scoped_ptr<Value> value(
@@ -61,7 +61,7 @@ void SettingSyncData::InitFromExtensionSettingSpecifics(
}
SettingSyncData::SettingSyncData(
- csync::SyncChange::SyncChangeType change_type,
+ syncer::SyncChange::SyncChangeType change_type,
const std::string& extension_id,
const std::string& key,
scoped_ptr<Value> value)
@@ -69,7 +69,7 @@ SettingSyncData::SettingSyncData(
SettingSyncData::~SettingSyncData() {}
-csync::SyncChange::SyncChangeType SettingSyncData::change_type() const {
+syncer::SyncChange::SyncChangeType SettingSyncData::change_type() const {
return internal_->change_type_;
}
@@ -86,7 +86,7 @@ const Value& SettingSyncData::value() const {
}
SettingSyncData::Internal::Internal(
- csync::SyncChange::SyncChangeType change_type,
+ syncer::SyncChange::SyncChangeType change_type,
const std::string& extension_id,
const std::string& key,
scoped_ptr<Value> value)
diff --git a/chrome/browser/extensions/settings/setting_sync_data.h b/chrome/browser/extensions/settings/setting_sync_data.h
index 070e3ee..72957a5 100644
--- a/chrome/browser/extensions/settings/setting_sync_data.h
+++ b/chrome/browser/extensions/settings/setting_sync_data.h
@@ -11,7 +11,7 @@
#include "base/values.h"
#include "sync/api/sync_change.h"
-namespace csync {
+namespace syncer {
class SyncData;
}
@@ -26,14 +26,14 @@ namespace extensions {
class SettingSyncData {
public:
// Creates from a sync change.
- explicit SettingSyncData(const csync::SyncChange& sync_change);
+ explicit SettingSyncData(const syncer::SyncChange& sync_change);
// Creates from sync data. |change_type| will be ACTION_INVALID.
- explicit SettingSyncData(const csync::SyncData& sync_data);
+ explicit SettingSyncData(const syncer::SyncData& sync_data);
// Creates explicitly.
SettingSyncData(
- csync::SyncChange::SyncChangeType change_type,
+ syncer::SyncChange::SyncChangeType change_type,
const std::string& extension_id,
const std::string& key,
scoped_ptr<Value> value);
@@ -41,7 +41,7 @@ class SettingSyncData {
~SettingSyncData();
// Returns the type of the sync change; may be ACTION_INVALID.
- csync::SyncChange::SyncChangeType change_type() const;
+ syncer::SyncChange::SyncChangeType change_type() const;
// Returns the extension id the setting is for.
const std::string& extension_id() const;
@@ -58,12 +58,12 @@ class SettingSyncData {
class Internal : public base::RefCountedThreadSafe<Internal> {
public:
Internal(
- csync::SyncChange::SyncChangeType change_type,
+ syncer::SyncChange::SyncChangeType change_type,
const std::string& extension_id,
const std::string& key,
scoped_ptr<Value> value);
- csync::SyncChange::SyncChangeType change_type_;
+ syncer::SyncChange::SyncChangeType change_type_;
std::string extension_id_;
std::string key_;
scoped_ptr<Value> value_;
@@ -74,12 +74,12 @@ class SettingSyncData {
};
// Initializes internal_ from sync data for an extension or app setting.
- void Init(csync::SyncChange::SyncChangeType change_type,
- const csync::SyncData& sync_data);
+ void Init(syncer::SyncChange::SyncChangeType change_type,
+ const syncer::SyncData& sync_data);
// Initializes internal_ from extension specifics.
void InitFromExtensionSettingSpecifics(
- csync::SyncChange::SyncChangeType change_type,
+ syncer::SyncChange::SyncChangeType change_type,
const sync_pb::ExtensionSettingSpecifics& specifics);
scoped_refptr<Internal> internal_;
diff --git a/chrome/browser/extensions/settings/settings_apitest.cc b/chrome/browser/extensions/settings/settings_apitest.cc
index 32f1128..b2a336c 100644
--- a/chrome/browser/extensions/settings/settings_apitest.cc
+++ b/chrome/browser/extensions/settings/settings_apitest.cc
@@ -33,35 +33,35 @@ namespace {
// TODO(kalman): test both EXTENSION_SETTINGS and APP_SETTINGS.
const syncable::ModelType kModelType = syncable::EXTENSION_SETTINGS;
-class NoopSyncChangeProcessor : public csync::SyncChangeProcessor {
+class NoopSyncChangeProcessor : public syncer::SyncChangeProcessor {
public:
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE {
- return csync::SyncError();
+ const syncer::SyncChangeList& change_list) OVERRIDE {
+ return syncer::SyncError();
}
virtual ~NoopSyncChangeProcessor() {};
};
-class SyncChangeProcessorDelegate : public csync::SyncChangeProcessor {
+class SyncChangeProcessorDelegate : public syncer::SyncChangeProcessor {
public:
- explicit SyncChangeProcessorDelegate(csync::SyncChangeProcessor* recipient)
+ explicit SyncChangeProcessorDelegate(syncer::SyncChangeProcessor* recipient)
: recipient_(recipient) {
DCHECK(recipient_);
}
virtual ~SyncChangeProcessorDelegate() {}
- // csync::SyncChangeProcessor implementation.
- virtual csync::SyncError ProcessSyncChanges(
+ // syncer::SyncChangeProcessor implementation.
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE {
+ const syncer::SyncChangeList& change_list) OVERRIDE {
return recipient_->ProcessSyncChanges(from_here, change_list);
}
private:
// The recipient of all sync changes.
- csync::SyncChangeProcessor* recipient_;
+ syncer::SyncChangeProcessor* recipient_;
DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate);
};
@@ -99,7 +99,7 @@ class ExtensionSettingsApiTest : public ExtensionApiTest {
settings_namespace, normal_action, incognito_action, NULL, true);
}
- void InitSync(csync::SyncChangeProcessor* sync_processor) {
+ void InitSync(syncer::SyncChangeProcessor* sync_processor) {
MessageLoop::current()->RunAllPending();
InitSyncWithSyncableService(
sync_processor,
@@ -107,7 +107,7 @@ class ExtensionSettingsApiTest : public ExtensionApiTest {
GetBackendForSync(kModelType));
}
- void SendChanges(const csync::SyncChangeList& change_list) {
+ void SendChanges(const syncer::SyncChangeList& change_list) {
MessageLoop::current()->RunAllPending();
SendChangesToSyncableService(
change_list,
@@ -159,20 +159,20 @@ class ExtensionSettingsApiTest : public ExtensionApiTest {
}
void InitSyncWithSyncableService(
- csync::SyncChangeProcessor* sync_processor,
- csync::SyncableService* settings_service) {
+ syncer::SyncChangeProcessor* sync_processor,
+ syncer::SyncableService* settings_service) {
EXPECT_FALSE(settings_service->MergeDataAndStartSyncing(
kModelType,
- csync::SyncDataList(),
- scoped_ptr<csync::SyncChangeProcessor>(
+ syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(
new SyncChangeProcessorDelegate(sync_processor)),
- scoped_ptr<csync::SyncErrorFactory>(
- new csync::SyncErrorFactoryMock())).IsSet());
+ scoped_ptr<syncer::SyncErrorFactory>(
+ new syncer::SyncErrorFactoryMock())).IsSet());
}
void SendChangesToSyncableService(
- const csync::SyncChangeList& change_list,
- csync::SyncableService* settings_service) {
+ const syncer::SyncChangeList& change_list,
+ syncer::SyncableService* settings_service) {
EXPECT_FALSE(
settings_service->ProcessSyncChanges(FROM_HERE, change_list).IsSet());
}
@@ -315,7 +315,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest,
InitSync(&sync_processor);
// Set "foo" to "bar" via sync.
- csync::SyncChangeList sync_changes;
+ syncer::SyncChangeList sync_changes;
StringValue bar("bar");
sync_changes.push_back(settings_sync_util::CreateAdd(
extension_id, "foo", bar, kModelType));
@@ -363,7 +363,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionSettingsApiTest,
InitSync(&sync_processor);
// Set "foo" to "bar" via sync.
- csync::SyncChangeList sync_changes;
+ syncer::SyncChangeList sync_changes;
StringValue bar("bar");
sync_changes.push_back(settings_sync_util::CreateAdd(
extension_id, "foo", bar, kModelType));
diff --git a/chrome/browser/extensions/settings/settings_backend.cc b/chrome/browser/extensions/settings/settings_backend.cc
index dee0f7b..617cff6 100644
--- a/chrome/browser/extensions/settings/settings_backend.cc
+++ b/chrome/browser/extensions/settings/settings_backend.cc
@@ -74,7 +74,7 @@ SyncableSettingsStorage* SettingsBackend::GetOrCreateStorageWithSyncData(
storage_objs_[extension_id] = syncable_storage;
if (sync_processor_.get()) {
- csync::SyncError error =
+ syncer::SyncError error =
syncable_storage->StartSyncing(
sync_data,
CreateSettingsSyncProcessor(extension_id).Pass());
@@ -136,14 +136,14 @@ static void AddAllSyncData(
const std::string& extension_id,
const DictionaryValue& src,
syncable::ModelType type,
- csync::SyncDataList* dst) {
+ syncer::SyncDataList* dst) {
for (DictionaryValue::Iterator it(src); it.HasNext(); it.Advance()) {
dst->push_back(settings_sync_util::CreateData(
extension_id, it.key(), it.value(), type));
}
}
-csync::SyncDataList SettingsBackend::GetAllSyncData(
+syncer::SyncDataList SettingsBackend::GetAllSyncData(
syncable::ModelType type) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Ignore the type, it's just for sanity checking; assume that whatever base
@@ -153,7 +153,7 @@ csync::SyncDataList SettingsBackend::GetAllSyncData(
// For all extensions, get all their settings. This has the effect
// of bringing in the entire state of extension settings in memory; sad.
- csync::SyncDataList all_sync_data;
+ syncer::SyncDataList all_sync_data;
std::set<std::string> known_extension_ids(GetKnownExtensionIDs());
for (std::set<std::string>::const_iterator it = known_extension_ids.begin();
@@ -171,11 +171,11 @@ csync::SyncDataList SettingsBackend::GetAllSyncData(
return all_sync_data;
}
-csync::SyncError SettingsBackend::MergeDataAndStartSyncing(
+syncer::SyncError SettingsBackend::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(type == syncable::EXTENSION_SETTINGS ||
type == syncable::APP_SETTINGS);
@@ -190,7 +190,7 @@ csync::SyncError SettingsBackend::MergeDataAndStartSyncing(
// Group the initial sync data by extension id.
std::map<std::string, linked_ptr<DictionaryValue> > grouped_sync_data;
- for (csync::SyncDataList::const_iterator it = initial_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator it = initial_sync_data.begin();
it != initial_sync_data.end(); ++it) {
SettingSyncData data(*it);
linked_ptr<DictionaryValue> sync_data =
@@ -210,7 +210,7 @@ csync::SyncError SettingsBackend::MergeDataAndStartSyncing(
it != storage_objs_.end(); ++it) {
std::map<std::string, linked_ptr<DictionaryValue> >::iterator
maybe_sync_data = grouped_sync_data.find(it->first);
- csync::SyncError error;
+ syncer::SyncError error;
if (maybe_sync_data != grouped_sync_data.end()) {
error = it->second->StartSyncing(
*maybe_sync_data->second,
@@ -234,18 +234,18 @@ csync::SyncError SettingsBackend::MergeDataAndStartSyncing(
GetOrCreateStorageWithSyncData(it->first, *it->second);
}
- return csync::SyncError();
+ return syncer::SyncError();
}
-csync::SyncError SettingsBackend::ProcessSyncChanges(
+syncer::SyncError SettingsBackend::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& sync_changes) {
+ const syncer::SyncChangeList& sync_changes) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(sync_processor_.get());
// Group changes by extension, to pass all changes in a single method call.
std::map<std::string, SettingSyncDataList> grouped_sync_data;
- for (csync::SyncChangeList::const_iterator it = sync_changes.begin();
+ for (syncer::SyncChangeList::const_iterator it = sync_changes.begin();
it != sync_changes.end(); ++it) {
SettingSyncData data(*it);
grouped_sync_data[data.extension_id()].push_back(data);
@@ -257,12 +257,12 @@ csync::SyncError SettingsBackend::ProcessSyncChanges(
it = grouped_sync_data.begin(); it != grouped_sync_data.end(); ++it) {
SyncableSettingsStorage* storage =
GetOrCreateStorageWithSyncData(it->first, empty);
- csync::SyncError error = storage->ProcessSyncChanges(it->second);
+ syncer::SyncError error = storage->ProcessSyncChanges(it->second);
if (error.IsSet())
storage->StopSyncing();
}
- return csync::SyncError();
+ return syncer::SyncError();
}
void SettingsBackend::StopSyncing(syncable::ModelType type) {
diff --git a/chrome/browser/extensions/settings/settings_backend.h b/chrome/browser/extensions/settings/settings_backend.h
index 6baa100..3e9d833 100644
--- a/chrome/browser/extensions/settings/settings_backend.h
+++ b/chrome/browser/extensions/settings/settings_backend.h
@@ -18,7 +18,7 @@
#include "chrome/browser/value_store/leveldb_value_store.h"
#include "sync/api/syncable_service.h"
-namespace csync {
+namespace syncer {
class SyncErrorFactory;
}
@@ -27,7 +27,7 @@ namespace extensions {
// Manages ValueStore objects for extensions, including routing
// changes from sync to them.
// Lives entirely on the FILE thread.
-class SettingsBackend : public csync::SyncableService {
+class SettingsBackend : public syncer::SyncableService {
public:
// |storage_factory| is use to create leveldb storage areas.
// |base_path| is the base of the extension settings directory, so the
@@ -48,17 +48,17 @@ class SettingsBackend : public csync::SyncableService {
// Deletes all setting data for an extension. Call on the FILE thread.
void DeleteStorage(const std::string& extension_id);
- // csync::SyncableService implementation.
- virtual csync::SyncDataList GetAllSyncData(
+ // syncer::SyncableService implementation.
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
- virtual csync::SyncError MergeDataAndStartSyncing(
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
- virtual csync::SyncError ProcessSyncChanges(
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
private:
@@ -99,10 +99,10 @@ class SettingsBackend : public csync::SyncableService {
syncable::ModelType sync_type_;
// Current sync processor, if any.
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
// Current sync error handler if any.
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
DISALLOW_COPY_AND_ASSIGN(SettingsBackend);
};
diff --git a/chrome/browser/extensions/settings/settings_frontend.cc b/chrome/browser/extensions/settings/settings_frontend.cc
index a56ec57..b3fd10a 100644
--- a/chrome/browser/extensions/settings/settings_frontend.cc
+++ b/chrome/browser/extensions/settings/settings_frontend.cc
@@ -263,7 +263,7 @@ SettingsFrontend::~SettingsFrontend() {
observers_->RemoveObserver(profile_observer_.get());
}
-csync::SyncableService* SettingsFrontend::GetBackendForSync(
+syncer::SyncableService* SettingsFrontend::GetBackendForSync(
syncable::ModelType type) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::map<settings_namespace::Namespace, BackendWrappers>::const_iterator
diff --git a/chrome/browser/extensions/settings/settings_frontend.h b/chrome/browser/extensions/settings/settings_frontend.h
index ac4ea15..8dc4c26 100644
--- a/chrome/browser/extensions/settings/settings_frontend.h
+++ b/chrome/browser/extensions/settings/settings_frontend.h
@@ -43,12 +43,13 @@ class SettingsFrontend {
virtual ~SettingsFrontend();
- typedef base::Callback<void(csync::SyncableService*)> SyncableServiceCallback;
+ typedef base::Callback<void(syncer::SyncableService*)>
+ SyncableServiceCallback;
typedef base::Callback<void(ValueStore*)> StorageCallback;
// Must only be called from the FILE thread. |type| should be either
// APP_SETTINGS or EXTENSION_SETTINGS.
- csync::SyncableService* GetBackendForSync(syncable::ModelType type) const;
+ syncer::SyncableService* GetBackendForSync(syncable::ModelType type) const;
// Runs |callback| on the FILE thread with the storage area for
// |extension_id|. If there is no extension with that ID, the storage area
diff --git a/chrome/browser/extensions/settings/settings_sync_processor.cc b/chrome/browser/extensions/settings/settings_sync_processor.cc
index 6ea00d0..a4707ef 100644
--- a/chrome/browser/extensions/settings/settings_sync_processor.cc
+++ b/chrome/browser/extensions/settings/settings_sync_processor.cc
@@ -17,7 +17,7 @@ namespace extensions {
SettingsSyncProcessor::SettingsSyncProcessor(
const std::string& extension_id,
syncable::ModelType type,
- csync::SyncChangeProcessor* sync_processor)
+ syncer::SyncChangeProcessor* sync_processor)
: extension_id_(extension_id),
type_(type),
sync_processor_(sync_processor),
@@ -42,12 +42,12 @@ void SettingsSyncProcessor::Init(const DictionaryValue& initial_state) {
initialized_ = true;
}
-csync::SyncError SettingsSyncProcessor::SendChanges(
+syncer::SyncError SettingsSyncProcessor::SendChanges(
const ValueStoreChangeList& changes) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
CHECK(initialized_) << "Init not called";
- csync::SyncChangeList sync_changes;
+ syncer::SyncChangeList sync_changes;
std::set<std::string> added_keys;
std::set<std::string> deleted_keys;
@@ -79,9 +79,9 @@ csync::SyncError SettingsSyncProcessor::SendChanges(
}
if (sync_changes.empty())
- return csync::SyncError();
+ return syncer::SyncError();
- csync::SyncError error =
+ syncer::SyncError error =
sync_processor_->ProcessSyncChanges(FROM_HERE, sync_changes);
if (error.IsSet())
return error;
@@ -92,7 +92,7 @@ csync::SyncError SettingsSyncProcessor::SendChanges(
synced_keys_.erase(*i);
}
- return csync::SyncError();
+ return syncer::SyncError();
}
void SettingsSyncProcessor::NotifyChanges(const ValueStoreChangeList& changes) {
diff --git a/chrome/browser/extensions/settings/settings_sync_processor.h b/chrome/browser/extensions/settings/settings_sync_processor.h
index 8567006..42c5d6b 100644
--- a/chrome/browser/extensions/settings/settings_sync_processor.h
+++ b/chrome/browser/extensions/settings/settings_sync_processor.h
@@ -12,9 +12,9 @@
#include "chrome/browser/value_store/value_store_change.h"
#include "sync/api/sync_error.h"
-namespace csync {
+namespace syncer {
class SyncChangeProcessor;
-} // namespace csync
+} // namespace syncer
namespace extensions {
@@ -28,14 +28,14 @@ class SettingsSyncProcessor {
public:
SettingsSyncProcessor(const std::string& extension_id,
syncable::ModelType type,
- csync::SyncChangeProcessor* sync_processor);
+ syncer::SyncChangeProcessor* sync_processor);
~SettingsSyncProcessor();
// Initializes this with the initial state of sync.
void Init(const DictionaryValue& initial_state);
// Sends |changes| to sync.
- csync::SyncError SendChanges(const ValueStoreChangeList& changes);
+ syncer::SyncError SendChanges(const ValueStoreChangeList& changes);
// Informs this that |changes| have been receieved from sync. No action will
// be taken, but this must be notified for internal bookkeeping.
@@ -51,7 +51,7 @@ class SettingsSyncProcessor {
const syncable::ModelType type_;
// The sync processor used to send changes to sync.
- csync::SyncChangeProcessor* const sync_processor_;
+ syncer::SyncChangeProcessor* const sync_processor_;
// Whether Init() has been called.
bool initialized_;
diff --git a/chrome/browser/extensions/settings/settings_sync_unittest.cc b/chrome/browser/extensions/settings/settings_sync_unittest.cc
index a6bd714..483ffe8 100644
--- a/chrome/browser/extensions/settings/settings_sync_unittest.cc
+++ b/chrome/browser/extensions/settings/settings_sync_unittest.cc
@@ -82,25 +82,25 @@ testing::AssertionResult SettingsEq(
// SyncChangeProcessor which just records the changes made, accessed after
// being converted to the more useful SettingSyncData via changes().
-class MockSyncChangeProcessor : public csync::SyncChangeProcessor {
+class MockSyncChangeProcessor : public syncer::SyncChangeProcessor {
public:
MockSyncChangeProcessor() : fail_all_requests_(false) {}
- // csync::SyncChangeProcessor implementation.
- virtual csync::SyncError ProcessSyncChanges(
+ // syncer::SyncChangeProcessor implementation.
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE {
+ const syncer::SyncChangeList& change_list) OVERRIDE {
if (fail_all_requests_) {
- return csync::SyncError(
+ return syncer::SyncError(
FROM_HERE,
"MockSyncChangeProcessor: configured to fail",
change_list[0].sync_data().GetDataType());
}
- for (csync::SyncChangeList::const_iterator it = change_list.begin();
+ for (syncer::SyncChangeList::const_iterator it = change_list.begin();
it != change_list.end(); ++it) {
changes_.push_back(SettingSyncData(*it));
}
- return csync::SyncError();
+ return syncer::SyncError();
}
// Mock methods.
@@ -130,7 +130,7 @@ class MockSyncChangeProcessor : public csync::SyncChangeProcessor {
ADD_FAILURE() << "No matching changes for " << extension_id << "/" <<
key << " (out of " << changes_.size() << ")";
return SettingSyncData(
- csync::SyncChange::ACTION_INVALID, "", "",
+ syncer::SyncChange::ACTION_INVALID, "", "",
scoped_ptr<Value>(new DictionaryValue()));
}
if (matching_changes.size() != 1u) {
@@ -145,24 +145,24 @@ class MockSyncChangeProcessor : public csync::SyncChangeProcessor {
bool fail_all_requests_;
};
-class SyncChangeProcessorDelegate : public csync::SyncChangeProcessor {
+class SyncChangeProcessorDelegate : public syncer::SyncChangeProcessor {
public:
- explicit SyncChangeProcessorDelegate(csync::SyncChangeProcessor* recipient)
+ explicit SyncChangeProcessorDelegate(syncer::SyncChangeProcessor* recipient)
: recipient_(recipient) {
DCHECK(recipient_);
}
virtual ~SyncChangeProcessorDelegate() {}
- // csync::SyncChangeProcessor implementation.
- virtual csync::SyncError ProcessSyncChanges(
+ // syncer::SyncChangeProcessor implementation.
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE {
+ const syncer::SyncChangeList& change_list) OVERRIDE {
return recipient_->ProcessSyncChanges(from_here, change_list);
}
private:
// The recipient of all sync changes.
- csync::SyncChangeProcessor* recipient_;
+ syncer::SyncChangeProcessor* recipient_;
DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate);
};
@@ -194,7 +194,7 @@ class TestingValueStoreFactory : public SettingsStorageFactory {
std::map<std::string, TestingValueStore*> created_;
};
-void AssignSettingsService(csync::SyncableService** dst,
+void AssignSettingsService(syncer::SyncableService** dst,
const SettingsFrontend* frontend,
syncable::ModelType type) {
*dst = frontend->GetBackendForSync(type);
@@ -234,8 +234,8 @@ class ExtensionSettingsSyncTest : public testing::Test {
return util::GetStorage(id, frontend_.get());
}
- // Gets the csync::SyncableService for the given sync type.
- csync::SyncableService* GetSyncableService(syncable::ModelType model_type) {
+ // Gets the syncer::SyncableService for the given sync type.
+ syncer::SyncableService* GetSyncableService(syncable::ModelType model_type) {
MessageLoop::current()->RunAllPending();
return frontend_->GetBackendForSync(model_type);
}
@@ -244,10 +244,10 @@ class ExtensionSettingsSyncTest : public testing::Test {
// from extension id to its sync data.
std::map<std::string, SettingSyncDataList> GetAllSyncData(
syncable::ModelType model_type) {
- csync::SyncDataList as_list =
+ syncer::SyncDataList as_list =
GetSyncableService(model_type)->GetAllSyncData(model_type);
std::map<std::string, SettingSyncDataList> as_map;
- for (csync::SyncDataList::iterator it = as_list.begin();
+ for (syncer::SyncDataList::iterator it = as_list.begin();
it != as_list.end(); ++it) {
SettingSyncData sync_data(*it);
as_map[sync_data.extension_id()].push_back(sync_data);
@@ -283,9 +283,9 @@ TEST_F(ExtensionSettingsSyncTest, NoDataDoesNotInvokeSync) {
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
AddExtensionAndGetStorage("s2", type);
EXPECT_EQ(0u, GetAllSyncData(model_type).size());
@@ -318,7 +318,7 @@ TEST_F(ExtensionSettingsSyncTest, InSyncDataDoesNotInvokeSync) {
EXPECT_EQ(1u, all_sync_data["s2"].size());
EXPECT_PRED_FORMAT2(ValuesEq, &value2, &all_sync_data["s2"][0].value());
- csync::SyncDataList sync_data;
+ syncer::SyncDataList sync_data;
sync_data.push_back(settings_sync_util::CreateData(
"s1", "foo", value1, model_type));
sync_data.push_back(settings_sync_util::CreateData(
@@ -326,8 +326,8 @@ TEST_F(ExtensionSettingsSyncTest, InSyncDataDoesNotInvokeSync) {
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type, sync_data,
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Already in sync, so no changes.
EXPECT_EQ(0u, sync_processor_->changes().size());
@@ -340,7 +340,7 @@ TEST_F(ExtensionSettingsSyncTest, InSyncDataDoesNotInvokeSync) {
storage1->Set(DEFAULTS, "foo", value2);
EXPECT_EQ(1u, sync_processor_->changes().size());
SettingSyncData change = sync_processor_->GetOnlyChange("s1", "foo");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_TRUE(value2.Equals(&change.value()));
GetSyncableService(model_type)->StopSyncing(model_type);
@@ -362,17 +362,17 @@ TEST_F(ExtensionSettingsSyncTest, LocalDataWithNoSyncDataIsPushedToSync) {
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// All settings should have been pushed to sync.
EXPECT_EQ(2u, sync_processor_->changes().size());
SettingSyncData change = sync_processor_->GetOnlyChange("s1", "foo");
- EXPECT_EQ(csync::SyncChange::ACTION_ADD, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD, change.change_type());
EXPECT_TRUE(value1.Equals(&change.value()));
change = sync_processor_->GetOnlyChange("s2", "bar");
- EXPECT_EQ(csync::SyncChange::ACTION_ADD, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD, change.change_type());
EXPECT_TRUE(value2.Equals(&change.value()));
GetSyncableService(model_type)->StopSyncing(model_type);
@@ -394,15 +394,15 @@ TEST_F(ExtensionSettingsSyncTest, AnySyncDataOverwritesLocalData) {
ValueStore* storage1 = AddExtensionAndGetStorage("s1", type);
storage1->Set(DEFAULTS, "overwriteMe", value1);
- csync::SyncDataList sync_data;
+ syncer::SyncDataList sync_data;
sync_data.push_back(settings_sync_util::CreateData(
"s1", "foo", value1, model_type));
sync_data.push_back(settings_sync_util::CreateData(
"s2", "bar", value2, model_type));
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type, sync_data,
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
expected1.Set("foo", value1.DeepCopy());
expected2.Set("bar", value2.DeepCopy());
@@ -437,18 +437,18 @@ TEST_F(ExtensionSettingsSyncTest, ProcessSyncChanges) {
storage1->Set(DEFAULTS, "foo", value1);
expected1.Set("foo", value1.DeepCopy());
- csync::SyncDataList sync_data;
+ syncer::SyncDataList sync_data;
sync_data.push_back(settings_sync_util::CreateData(
"s2", "bar", value2, model_type));
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type, sync_data,
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
expected2.Set("bar", value2.DeepCopy());
// Make sync add some settings.
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateAdd(
"s1", "bar", value2, model_type));
change_list.push_back(settings_sync_util::CreateAdd(
@@ -509,7 +509,7 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) {
storage1->Set(DEFAULTS, "foo", value1);
storage2->Set(DEFAULTS, "foo", value1);
- csync::SyncDataList sync_data;
+ syncer::SyncDataList sync_data;
sync_data.push_back(settings_sync_util::CreateData(
"s3", "bar", value2, model_type));
sync_data.push_back(settings_sync_util::CreateData(
@@ -517,8 +517,8 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) {
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type, sync_data,
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Add something locally.
storage1->Set(DEFAULTS, "bar", value2);
@@ -527,16 +527,16 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) {
storage4->Set(DEFAULTS, "foo", value1);
SettingSyncData change = sync_processor_->GetOnlyChange("s1", "bar");
- EXPECT_EQ(csync::SyncChange::ACTION_ADD, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD, change.change_type());
EXPECT_TRUE(value2.Equals(&change.value()));
sync_processor_->GetOnlyChange("s2", "bar");
- EXPECT_EQ(csync::SyncChange::ACTION_ADD, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD, change.change_type());
EXPECT_TRUE(value2.Equals(&change.value()));
change = sync_processor_->GetOnlyChange("s3", "foo");
- EXPECT_EQ(csync::SyncChange::ACTION_ADD, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD, change.change_type());
EXPECT_TRUE(value1.Equals(&change.value()));
change = sync_processor_->GetOnlyChange("s4", "foo");
- EXPECT_EQ(csync::SyncChange::ACTION_ADD, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD, change.change_type());
EXPECT_TRUE(value1.Equals(&change.value()));
// Change something locally, storage1/3 the new setting and storage2/4 the
@@ -549,16 +549,16 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) {
storage4->Set(DEFAULTS, "foo", value2);
change = sync_processor_->GetOnlyChange("s1", "bar");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_TRUE(value1.Equals(&change.value()));
change = sync_processor_->GetOnlyChange("s2", "foo");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_TRUE(value2.Equals(&change.value()));
change = sync_processor_->GetOnlyChange("s3", "bar");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_TRUE(value1.Equals(&change.value()));
change = sync_processor_->GetOnlyChange("s4", "foo");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_TRUE(value2.Equals(&change.value()));
// Remove something locally, storage1/3 the new setting and storage2/4 the
@@ -571,16 +571,16 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) {
storage4->Remove("bar");
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s1", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s2", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s3", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s4", "bar").change_type());
// Remove some nonexistent settings.
@@ -606,28 +606,28 @@ TEST_F(ExtensionSettingsSyncTest, PushToSync) {
storage4->Clear();
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s1", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s1", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s2", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s2", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s3", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s3", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s4", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
sync_processor_->GetOnlyChange("s4", "bar").change_type());
GetSyncableService(model_type)->StopSyncing(model_type);
@@ -660,15 +660,15 @@ TEST_F(ExtensionSettingsSyncTest, ExtensionAndAppSettingsSyncSeparately) {
EXPECT_PRED_FORMAT2(ValuesEq, &value2, &app_sync_data["s2"][0].value());
// Stop each separately, there should be no changes either time.
- csync::SyncDataList sync_data;
+ syncer::SyncDataList sync_data;
sync_data.push_back(settings_sync_util::CreateData(
"s1", "foo", value1, syncable::EXTENSION_SETTINGS));
GetSyncableService(syncable::EXTENSION_SETTINGS)->MergeDataAndStartSyncing(
syncable::EXTENSION_SETTINGS,
sync_data,
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
GetSyncableService(syncable::EXTENSION_SETTINGS)->
StopSyncing(syncable::EXTENSION_SETTINGS);
EXPECT_EQ(0u, sync_processor_->changes().size());
@@ -682,8 +682,8 @@ TEST_F(ExtensionSettingsSyncTest, ExtensionAndAppSettingsSyncSeparately) {
GetSyncableService(syncable::APP_SETTINGS)->MergeDataAndStartSyncing(
syncable::APP_SETTINGS,
sync_data,
- app_settings_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ app_settings_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
GetSyncableService(syncable::APP_SETTINGS)->
StopSyncing(syncable::APP_SETTINGS);
EXPECT_EQ(0u, sync_processor_->changes().size());
@@ -708,7 +708,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
// Make bad fail for incoming sync changes.
testing_factory->GetExisting("bad")->SetFailAllRequests(true);
{
- csync::SyncDataList sync_data;
+ syncer::SyncDataList sync_data;
sync_data.push_back(settings_sync_util::CreateData(
"good", "foo", fooValue, model_type));
sync_data.push_back(settings_sync_util::CreateData(
@@ -716,8 +716,9 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
sync_data,
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(
+ new syncer::SyncErrorFactoryMock()));
}
testing_factory->GetExisting("bad")->SetFailAllRequests(false);
@@ -737,7 +738,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
bad->Set(DEFAULTS, "bar", barValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
@@ -756,7 +757,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
// Changes received from sync should go to good but not bad (even when it's
// not failing).
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateUpdate(
"good", "foo", barValue, model_type));
// (Sending UPDATE here even though it's adding, since that's what the state
@@ -785,7 +786,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
bad->Set(DEFAULTS, "bar", fooValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
@@ -804,7 +805,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
// Failing ProcessSyncChanges shouldn't go to the storage.
testing_factory->GetExisting("bad")->SetFailAllRequests(true);
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateUpdate(
"good", "foo", fooValue, model_type));
// (Ditto.)
@@ -833,20 +834,20 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
sync_processor_.get()));
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Local settings will have been pushed to sync, since it's empty (in this
// test; presumably it wouldn't be live, since we've been getting changes).
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("bad", "bar").change_type());
EXPECT_EQ(3u, sync_processor_->changes().size());
@@ -856,16 +857,16 @@ TEST_F(ExtensionSettingsSyncTest, FailingStartSyncingDisablesSync) {
bad->Set(DEFAULTS, "bar", barValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("bad", "bar").change_type());
EXPECT_EQ(2u, sync_processor_->changes().size());
// And ProcessSyncChanges work, too.
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateUpdate(
"good", "bar", fooValue, model_type));
change_list.push_back(settings_sync_util::CreateUpdate(
@@ -903,7 +904,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingProcessChangesDisablesSync) {
// Unlike before, initially succeeding MergeDataAndStartSyncing.
{
- csync::SyncDataList sync_data;
+ syncer::SyncDataList sync_data;
sync_data.push_back(settings_sync_util::CreateData(
"good", "foo", fooValue, model_type));
sync_data.push_back(settings_sync_util::CreateData(
@@ -911,8 +912,9 @@ TEST_F(ExtensionSettingsSyncTest, FailingProcessChangesDisablesSync) {
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
sync_data,
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(
+ new syncer::SyncErrorFactoryMock()));
}
EXPECT_EQ(0u, sync_processor_->changes().size());
@@ -931,7 +933,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingProcessChangesDisablesSync) {
// Now fail ProcessSyncChanges for bad.
testing_factory->GetExisting("bad")->SetFailAllRequests(true);
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateAdd(
"good", "bar", barValue, model_type));
change_list.push_back(settings_sync_util::CreateAdd(
@@ -958,13 +960,13 @@ TEST_F(ExtensionSettingsSyncTest, FailingProcessChangesDisablesSync) {
bad->Set(DEFAULTS, "foo", barValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
// No more changes received from sync should go to bad.
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateAdd(
"good", "foo", fooValue, model_type));
change_list.push_back(settings_sync_util::CreateAdd(
@@ -1005,7 +1007,7 @@ TEST_F(ExtensionSettingsSyncTest, FailingGetAllSyncDataDoesntStopSync) {
// include that from good.
testing_factory->GetExisting("bad")->SetFailAllRequests(true);
{
- csync::SyncDataList all_sync_data =
+ syncer::SyncDataList all_sync_data =
GetSyncableService(model_type)->GetAllSyncData(model_type);
EXPECT_EQ(1u, all_sync_data.size());
EXPECT_EQ("good/foo", all_sync_data[0].GetTag());
@@ -1015,15 +1017,15 @@ TEST_F(ExtensionSettingsSyncTest, FailingGetAllSyncDataDoesntStopSync) {
// Sync shouldn't be disabled for good (nor bad -- but this is unimportant).
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("bad", "foo").change_type());
EXPECT_EQ(2u, sync_processor_->changes().size());
@@ -1032,10 +1034,10 @@ TEST_F(ExtensionSettingsSyncTest, FailingGetAllSyncDataDoesntStopSync) {
bad->Set(DEFAULTS, "bar", barValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("bad", "bar").change_type());
EXPECT_EQ(2u, sync_processor_->changes().size());
}
@@ -1061,13 +1063,13 @@ TEST_F(ExtensionSettingsSyncTest, FailureToReadChangesToPushDisablesSync) {
testing_factory->GetExisting("bad")->SetFailAllRequests(true);
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
testing_factory->GetExisting("bad")->SetFailAllRequests(false);
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
@@ -1077,12 +1079,12 @@ TEST_F(ExtensionSettingsSyncTest, FailureToReadChangesToPushDisablesSync) {
bad->Set(DEFAULTS, "bar", barValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateUpdate(
"good", "foo", barValue, model_type));
// (Sending ADD here even though it's updating, since that's what the state
@@ -1113,21 +1115,21 @@ TEST_F(ExtensionSettingsSyncTest, FailureToReadChangesToPushDisablesSync) {
sync_processor_.get()));
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("bad", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("bad", "bar").change_type());
EXPECT_EQ(4u, sync_processor_->changes().size());
@@ -1136,10 +1138,10 @@ TEST_F(ExtensionSettingsSyncTest, FailureToReadChangesToPushDisablesSync) {
bad->Set(DEFAULTS, "bar", fooValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(2u, sync_processor_->changes().size());
}
@@ -1163,9 +1165,9 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalStateDisablesSync) {
sync_processor_->SetFailAllRequests(true);
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
sync_processor_->SetFailAllRequests(false);
// Changes from good will be send to sync, changes from bad won't.
@@ -1174,13 +1176,13 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalStateDisablesSync) {
bad->Set(DEFAULTS, "foo", barValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
// Changes from sync will be sent to good, not to bad.
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateAdd(
"good", "bar", barValue, model_type));
change_list.push_back(settings_sync_util::CreateAdd(
@@ -1207,18 +1209,18 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalStateDisablesSync) {
sync_processor_.get()));
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("bad", "foo").change_type());
EXPECT_EQ(3u, sync_processor_->changes().size());
@@ -1227,10 +1229,10 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalStateDisablesSync) {
bad->Set(DEFAULTS, "foo", fooValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(2u, sync_processor_->changes().size());
}
@@ -1250,9 +1252,9 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalChangeDisablesSync) {
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// bad will fail to send changes.
good->Set(DEFAULTS, "foo", fooValue);
@@ -1261,7 +1263,7 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalChangeDisablesSync) {
sync_processor_->SetFailAllRequests(false);
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
@@ -1271,13 +1273,13 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalChangeDisablesSync) {
bad->Set(DEFAULTS, "foo", barValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(1u, sync_processor_->changes().size());
// Changes from sync will be sent to good, not to bad.
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateAdd(
"good", "bar", barValue, model_type));
change_list.push_back(settings_sync_util::CreateAdd(
@@ -1304,18 +1306,18 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalChangeDisablesSync) {
sync_processor_.get()));
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("good", "bar").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
sync_processor_->GetOnlyChange("bad", "foo").change_type());
EXPECT_EQ(3u, sync_processor_->changes().size());
@@ -1324,10 +1326,10 @@ TEST_F(ExtensionSettingsSyncTest, FailureToPushLocalChangeDisablesSync) {
bad->Set(DEFAULTS, "foo", fooValue);
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
sync_processor_->GetOnlyChange("good", "foo").change_type());
EXPECT_EQ(2u, sync_processor_->changes().size());
}
@@ -1346,9 +1348,9 @@ TEST_F(ExtensionSettingsSyncTest,
GetSyncableService(model_type)->MergeDataAndStartSyncing(
model_type,
- csync::SyncDataList(),
- sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ syncer::SyncDataList(),
+ sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
// Large local change rejected and doesn't get sent out.
ValueStore* storage1 = AddExtensionAndGetStorage("s1", type);
@@ -1358,7 +1360,7 @@ TEST_F(ExtensionSettingsSyncTest,
// Large incoming change should still get accepted.
ValueStore* storage2 = AddExtensionAndGetStorage("s2", type);
{
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
change_list.push_back(settings_sync_util::CreateAdd(
"s1", "large_value", large_value, model_type));
change_list.push_back(settings_sync_util::CreateAdd(
diff --git a/chrome/browser/extensions/settings/settings_sync_util.cc b/chrome/browser/extensions/settings/settings_sync_util.cc
index 53c2d24..1a6ff74 100644
--- a/chrome/browser/extensions/settings/settings_sync_util.cc
+++ b/chrome/browser/extensions/settings/settings_sync_util.cc
@@ -41,7 +41,7 @@ void PopulateAppSettingSpecifics(
} // namespace
-csync::SyncData CreateData(
+syncer::SyncData CreateData(
const std::string& extension_id,
const std::string& key,
const Value& value,
@@ -68,37 +68,37 @@ csync::SyncData CreateData(
NOTREACHED();
}
- return csync::SyncData::CreateLocalData(
+ return syncer::SyncData::CreateLocalData(
extension_id + "/" + key, key, specifics);
}
-csync::SyncChange CreateAdd(
+syncer::SyncChange CreateAdd(
const std::string& extension_id,
const std::string& key,
const Value& value,
syncable::ModelType type) {
- return csync::SyncChange(
- csync::SyncChange::ACTION_ADD,
+ return syncer::SyncChange(
+ syncer::SyncChange::ACTION_ADD,
CreateData(extension_id, key, value, type));
}
-csync::SyncChange CreateUpdate(
+syncer::SyncChange CreateUpdate(
const std::string& extension_id,
const std::string& key,
const Value& value,
syncable::ModelType type) {
- return csync::SyncChange(
- csync::SyncChange::ACTION_UPDATE,
+ return syncer::SyncChange(
+ syncer::SyncChange::ACTION_UPDATE,
CreateData(extension_id, key, value, type));
}
-csync::SyncChange CreateDelete(
+syncer::SyncChange CreateDelete(
const std::string& extension_id,
const std::string& key,
syncable::ModelType type) {
DictionaryValue no_value;
- return csync::SyncChange(
- csync::SyncChange::ACTION_DELETE,
+ return syncer::SyncChange(
+ syncer::SyncChange::ACTION_DELETE,
CreateData(extension_id, key, no_value, type));
}
diff --git a/chrome/browser/extensions/settings/settings_sync_util.h b/chrome/browser/extensions/settings/settings_sync_util.h
index 1800b8f..dede098 100644
--- a/chrome/browser/extensions/settings/settings_sync_util.h
+++ b/chrome/browser/extensions/settings/settings_sync_util.h
@@ -18,29 +18,29 @@ namespace extensions {
namespace settings_sync_util {
-// Creates a csync::SyncData object for an extension or app setting.
-csync::SyncData CreateData(
+// Creates a syncer::SyncData object for an extension or app setting.
+syncer::SyncData CreateData(
const std::string& extension_id,
const std::string& key,
const base::Value& value,
syncable::ModelType type);
// Creates an "add" sync change for an extension or app setting.
-csync::SyncChange CreateAdd(
+syncer::SyncChange CreateAdd(
const std::string& extension_id,
const std::string& key,
const base::Value& value,
syncable::ModelType type);
// Creates an "update" sync change for an extension or app setting.
-csync::SyncChange CreateUpdate(
+syncer::SyncChange CreateUpdate(
const std::string& extension_id,
const std::string& key,
const base::Value& value,
syncable::ModelType type);
// Creates a "delete" sync change for an extension or app setting.
-csync::SyncChange CreateDelete(
+syncer::SyncChange CreateDelete(
const std::string& extension_id,
const std::string& key,
syncable::ModelType type);
diff --git a/chrome/browser/extensions/settings/syncable_settings_storage.cc b/chrome/browser/extensions/settings/syncable_settings_storage.cc
index 22fd671..a111b19 100644
--- a/chrome/browser/extensions/settings/syncable_settings_storage.cc
+++ b/chrome/browser/extensions/settings/syncable_settings_storage.cc
@@ -121,7 +121,7 @@ ValueStore::WriteResult SyncableSettingsStorage::Clear() {
void SyncableSettingsStorage::SyncResultIfEnabled(
const ValueStore::WriteResult& result) {
if (sync_processor_.get() && !result->changes().empty()) {
- csync::SyncError error = sync_processor_->SendChanges(result->changes());
+ syncer::SyncError error = sync_processor_->SendChanges(result->changes());
if (error.IsSet())
StopSyncing();
}
@@ -129,7 +129,7 @@ void SyncableSettingsStorage::SyncResultIfEnabled(
// Sync-related methods.
-csync::SyncError SyncableSettingsStorage::StartSyncing(
+syncer::SyncError SyncableSettingsStorage::StartSyncing(
const DictionaryValue& sync_state,
scoped_ptr<SettingsSyncProcessor> sync_processor) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
@@ -140,7 +140,7 @@ csync::SyncError SyncableSettingsStorage::StartSyncing(
ReadResult maybe_settings = delegate_->Get();
if (maybe_settings->HasError()) {
- return csync::SyncError(
+ return syncer::SyncError(
FROM_HERE,
std::string("Failed to get settings: ") + maybe_settings->error(),
sync_processor_->type());
@@ -153,7 +153,7 @@ csync::SyncError SyncableSettingsStorage::StartSyncing(
return OverwriteLocalSettingsWithSync(sync_state, settings);
}
-csync::SyncError SyncableSettingsStorage::SendLocalSettingsToSync(
+syncer::SyncError SyncableSettingsStorage::SendLocalSettingsToSync(
const DictionaryValue& settings) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
@@ -163,16 +163,16 @@ csync::SyncError SyncableSettingsStorage::SendLocalSettingsToSync(
}
if (changes.empty())
- return csync::SyncError();
+ return syncer::SyncError();
- csync::SyncError error = sync_processor_->SendChanges(changes);
+ syncer::SyncError error = sync_processor_->SendChanges(changes);
if (error.IsSet())
StopSyncing();
return error;
}
-csync::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync(
+syncer::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync(
const DictionaryValue& sync_state, const DictionaryValue& settings) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Treat this as a list of changes to sync and use ProcessSyncChanges.
@@ -191,7 +191,7 @@ csync::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync(
// Sync value is different, update local setting with new value.
changes.push_back(
SettingSyncData(
- csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange::ACTION_UPDATE,
extension_id_,
it.key(),
sync_value.Pass()));
@@ -200,7 +200,7 @@ csync::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync(
// Not synced, delete local setting.
changes.push_back(
SettingSyncData(
- csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange::ACTION_DELETE,
extension_id_,
it.key(),
scoped_ptr<Value>(new DictionaryValue())));
@@ -214,14 +214,14 @@ csync::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync(
CHECK(new_sync_state->RemoveWithoutPathExpansion(key, &value));
changes.push_back(
SettingSyncData(
- csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange::ACTION_ADD,
extension_id_,
key,
scoped_ptr<Value>(value)));
}
if (changes.empty())
- return csync::SyncError();
+ return syncer::SyncError();
return ProcessSyncChanges(changes);
}
@@ -231,19 +231,19 @@ void SyncableSettingsStorage::StopSyncing() {
sync_processor_.reset();
}
-csync::SyncError SyncableSettingsStorage::ProcessSyncChanges(
+syncer::SyncError SyncableSettingsStorage::ProcessSyncChanges(
const SettingSyncDataList& sync_changes) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(!sync_changes.empty()) << "No sync changes for " << extension_id_;
if (!sync_processor_.get()) {
- return csync::SyncError(
+ return syncer::SyncError(
FROM_HERE,
std::string("Sync is inactive for ") + extension_id_,
syncable::UNSPECIFIED);
}
- std::vector<csync::SyncError> errors;
+ std::vector<syncer::SyncError> errors;
ValueStoreChangeList changes;
for (SettingSyncDataList::const_iterator it = sync_changes.begin();
@@ -257,7 +257,7 @@ csync::SyncError SyncableSettingsStorage::ProcessSyncChanges(
{
ReadResult maybe_settings = Get(it->key());
if (maybe_settings->HasError()) {
- errors.push_back(csync::SyncError(
+ errors.push_back(syncer::SyncError(
FROM_HERE,
std::string("Error getting current sync state for ") +
extension_id_ + "/" + key + ": " + maybe_settings->error(),
@@ -270,10 +270,10 @@ csync::SyncError SyncableSettingsStorage::ProcessSyncChanges(
}
}
- csync::SyncError error;
+ syncer::SyncError error;
switch (it->change_type()) {
- case csync::SyncChange::ACTION_ADD:
+ case syncer::SyncChange::ACTION_ADD:
if (!current_value.get()) {
error = OnSyncAdd(key, value.DeepCopy(), &changes);
} else {
@@ -286,7 +286,7 @@ csync::SyncError SyncableSettingsStorage::ProcessSyncChanges(
}
break;
- case csync::SyncChange::ACTION_UPDATE:
+ case syncer::SyncChange::ACTION_UPDATE:
if (current_value.get()) {
error = OnSyncUpdate(
key, current_value.release(), value.DeepCopy(), &changes);
@@ -298,7 +298,7 @@ csync::SyncError SyncableSettingsStorage::ProcessSyncChanges(
}
break;
- case csync::SyncChange::ACTION_DELETE:
+ case syncer::SyncChange::ACTION_DELETE:
if (current_value.get()) {
error = OnSyncDelete(key, current_value.release(), &changes);
} else {
@@ -326,27 +326,27 @@ csync::SyncError SyncableSettingsStorage::ProcessSyncChanges(
ValueStoreChange::ToJson(changes));
// TODO(kalman): Something sensible with multiple errors.
- return errors.empty() ? csync::SyncError() : errors[0];
+ return errors.empty() ? syncer::SyncError() : errors[0];
}
-csync::SyncError SyncableSettingsStorage::OnSyncAdd(
+syncer::SyncError SyncableSettingsStorage::OnSyncAdd(
const std::string& key,
Value* new_value,
ValueStoreChangeList* changes) {
DCHECK(new_value);
WriteResult result = delegate_->Set(IGNORE_QUOTA, key, *new_value);
if (result->HasError()) {
- return csync::SyncError(
+ return syncer::SyncError(
FROM_HERE,
std::string("Error pushing sync add to local settings: ") +
result->error(),
sync_processor_->type());
}
changes->push_back(ValueStoreChange(key, NULL, new_value));
- return csync::SyncError();
+ return syncer::SyncError();
}
-csync::SyncError SyncableSettingsStorage::OnSyncUpdate(
+syncer::SyncError SyncableSettingsStorage::OnSyncUpdate(
const std::string& key,
Value* old_value,
Value* new_value,
@@ -355,31 +355,31 @@ csync::SyncError SyncableSettingsStorage::OnSyncUpdate(
DCHECK(new_value);
WriteResult result = delegate_->Set(IGNORE_QUOTA, key, *new_value);
if (result->HasError()) {
- return csync::SyncError(
+ return syncer::SyncError(
FROM_HERE,
std::string("Error pushing sync update to local settings: ") +
result->error(),
sync_processor_->type());
}
changes->push_back(ValueStoreChange(key, old_value, new_value));
- return csync::SyncError();
+ return syncer::SyncError();
}
-csync::SyncError SyncableSettingsStorage::OnSyncDelete(
+syncer::SyncError SyncableSettingsStorage::OnSyncDelete(
const std::string& key,
Value* old_value,
ValueStoreChangeList* changes) {
DCHECK(old_value);
WriteResult result = delegate_->Remove(key);
if (result->HasError()) {
- return csync::SyncError(
+ return syncer::SyncError(
FROM_HERE,
std::string("Error pushing sync remove to local settings: ") +
result->error(),
sync_processor_->type());
}
changes->push_back(ValueStoreChange(key, old_value, NULL));
- return csync::SyncError();
+ return syncer::SyncError();
}
} // namespace extensions
diff --git a/chrome/browser/extensions/settings/syncable_settings_storage.h b/chrome/browser/extensions/settings/syncable_settings_storage.h
index e8403bf..3cac0ab 100644
--- a/chrome/browser/extensions/settings/syncable_settings_storage.h
+++ b/chrome/browser/extensions/settings/syncable_settings_storage.h
@@ -53,7 +53,7 @@ class SyncableSettingsStorage : public ValueStore {
// can be called.
// Must only be called if sync isn't already active.
- csync::SyncError StartSyncing(
+ syncer::SyncError StartSyncing(
const DictionaryValue& sync_state,
scoped_ptr<SettingsSyncProcessor> sync_processor);
@@ -61,32 +61,32 @@ class SyncableSettingsStorage : public ValueStore {
void StopSyncing();
// May be called at any time; changes will be ignored if sync isn't active.
- csync::SyncError ProcessSyncChanges(const SettingSyncDataList& sync_changes);
+ syncer::SyncError ProcessSyncChanges(const SettingSyncDataList& sync_changes);
private:
// Sends the changes from |result| to sync if it's enabled.
void SyncResultIfEnabled(const ValueStore::WriteResult& result);
// Sends all local settings to sync (synced settings assumed to be empty).
- csync::SyncError SendLocalSettingsToSync(
+ syncer::SyncError SendLocalSettingsToSync(
const DictionaryValue& settings);
// Overwrites local state with sync state.
- csync::SyncError OverwriteLocalSettingsWithSync(
+ syncer::SyncError OverwriteLocalSettingsWithSync(
const DictionaryValue& sync_state, const DictionaryValue& settings);
// Called when an Add/Update/Remove comes from sync. Ownership of Value*s
// are taken.
- csync::SyncError OnSyncAdd(
+ syncer::SyncError OnSyncAdd(
const std::string& key,
Value* new_value,
ValueStoreChangeList* changes);
- csync::SyncError OnSyncUpdate(
+ syncer::SyncError OnSyncUpdate(
const std::string& key,
Value* old_value,
Value* new_value,
ValueStoreChangeList* changes);
- csync::SyncError OnSyncDelete(
+ syncer::SyncError OnSyncDelete(
const std::string& key,
Value* old_value,
ValueStoreChangeList* changes);
diff --git a/chrome/browser/extensions/test_extension_service.cc b/chrome/browser/extensions/test_extension_service.cc
index 3846b2f..47f03c7 100644
--- a/chrome/browser/extensions/test_extension_service.cc
+++ b/chrome/browser/extensions/test_extension_service.cc
@@ -73,30 +73,30 @@ void TestExtensionService::CheckForUpdatesSoon() {
ADD_FAILURE();
}
-csync::SyncError TestExtensionService::MergeDataAndStartSyncing(
+syncer::SyncError TestExtensionService::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
ADD_FAILURE();
- return csync::SyncError();
+ return syncer::SyncError();
}
void TestExtensionService::StopSyncing(syncable::ModelType type) {
ADD_FAILURE();
}
-csync::SyncDataList TestExtensionService::GetAllSyncData(
+syncer::SyncDataList TestExtensionService::GetAllSyncData(
syncable::ModelType type) const {
ADD_FAILURE();
- return csync::SyncDataList();
+ return syncer::SyncDataList();
}
-csync::SyncError TestExtensionService::ProcessSyncChanges(
+syncer::SyncError TestExtensionService::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
ADD_FAILURE();
- return csync::SyncError();
+ return syncer::SyncError();
}
bool TestExtensionService::is_ready() {
diff --git a/chrome/browser/extensions/test_extension_service.h b/chrome/browser/extensions/test_extension_service.h
index 4785b6c..72a012a 100644
--- a/chrome/browser/extensions/test_extension_service.h
+++ b/chrome/browser/extensions/test_extension_service.h
@@ -13,7 +13,7 @@
class CrxInstaller;
-namespace csync {
+namespace syncer {
class SyncErrorFactory;
}
@@ -52,17 +52,17 @@ class TestExtensionService : public ExtensionServiceInterface {
virtual void CheckAdminBlacklist() OVERRIDE;
virtual void CheckForUpdatesSoon() OVERRIDE;
- virtual csync::SyncError MergeDataAndStartSyncing(
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
- virtual csync::SyncDataList GetAllSyncData(
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
virtual bool is_ready() OVERRIDE;
diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc
index acef08a..04bd97a 100644
--- a/chrome/browser/prefs/pref_model_associator.cc
+++ b/chrome/browser/prefs/pref_model_associator.cc
@@ -33,9 +33,9 @@ PrefModelAssociator::~PrefModelAssociator() {
}
void PrefModelAssociator::InitPrefAndAssociate(
- const csync::SyncData& sync_pref,
+ const syncer::SyncData& sync_pref,
const std::string& pref_name,
- csync::SyncChangeList* sync_changes) {
+ syncer::SyncChangeList* sync_changes) {
const PrefService::Preference* pref =
pref_service_->FindPreference(pref_name.c_str());
DCHECK(pref);
@@ -74,24 +74,24 @@ void PrefModelAssociator::InitPrefAndAssociate(
// If the merge resulted in an updated value, inform the syncer.
if (!value->Equals(new_value.get())) {
- csync::SyncData sync_data;
+ syncer::SyncData sync_data;
if (!CreatePrefSyncData(pref->name(), *new_value, &sync_data)) {
LOG(ERROR) << "Failed to update preference.";
return;
}
sync_changes->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
}
} else if (pref->IsUserControlled()) {
// The server does not know about this preference and should be added
// to the syncer's database.
- csync::SyncData sync_data;
+ syncer::SyncData sync_data;
if (!CreatePrefSyncData(pref->name(), *pref->GetValue(), &sync_data)) {
LOG(ERROR) << "Failed to update preference.";
return;
}
sync_changes->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_ADD, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_ADD, sync_data));
} else {
// This pref does not have a sync value but also does not have a user
// controlled value (either it's a default value or it's policy controlled,
@@ -106,11 +106,11 @@ void PrefModelAssociator::InitPrefAndAssociate(
return;
}
-csync::SyncError PrefModelAssociator::MergeDataAndStartSyncing(
+syncer::SyncError PrefModelAssociator::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
DCHECK_EQ(type, PREFERENCES);
DCHECK(CalledOnValidThread());
DCHECK(pref_service_);
@@ -120,12 +120,12 @@ csync::SyncError PrefModelAssociator::MergeDataAndStartSyncing(
sync_processor_ = sync_processor.Pass();
sync_error_factory_ = sync_error_factory.Pass();
- csync::SyncChangeList new_changes;
+ syncer::SyncChangeList new_changes;
std::set<std::string> remaining_preferences = registered_preferences_;
// Go through and check for all preferences we care about that sync already
// knows about.
- for (csync::SyncDataList::const_iterator sync_iter =
+ for (syncer::SyncDataList::const_iterator sync_iter =
initial_sync_data.begin();
sync_iter != initial_sync_data.end();
++sync_iter) {
@@ -149,18 +149,18 @@ csync::SyncError PrefModelAssociator::MergeDataAndStartSyncing(
remaining_preferences.begin();
pref_name_iter != remaining_preferences.end();
++pref_name_iter) {
- InitPrefAndAssociate(csync::SyncData(), *pref_name_iter, &new_changes);
+ InitPrefAndAssociate(syncer::SyncData(), *pref_name_iter, &new_changes);
}
// Push updates to sync.
- csync::SyncError error =
+ syncer::SyncError error =
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
if (error.IsSet()) {
return error;
}
models_associated_ = true;
- return csync::SyncError();
+ return syncer::SyncError();
}
void PrefModelAssociator::StopSyncing(syncable::ModelType type) {
@@ -193,7 +193,7 @@ Value* PrefModelAssociator::MergePreference(
bool PrefModelAssociator::CreatePrefSyncData(
const std::string& name,
const Value& value,
- csync::SyncData* sync_data) {
+ syncer::SyncData* sync_data) {
std::string serialized;
// TODO(zea): consider JSONWriter::Write since you don't have to check
// failures to deserialize.
@@ -207,7 +207,7 @@ bool PrefModelAssociator::CreatePrefSyncData(
sync_pb::PreferenceSpecifics* pref_specifics = specifics.mutable_preference();
pref_specifics->set_name(name);
pref_specifics->set_value(serialized);
- *sync_data = csync::SyncData::CreateLocalData(name, name, specifics);
+ *sync_data = syncer::SyncData::CreateLocalData(name, name, specifics);
return true;
}
@@ -273,11 +273,11 @@ Value* PrefModelAssociator::MergeDictionaryValues(
// with user controlled data. We do not track any information for preferences
// not registered locally as syncable and do not inform the syncer of
// non-user controlled preferences.
-csync::SyncDataList PrefModelAssociator::GetAllSyncData(
+syncer::SyncDataList PrefModelAssociator::GetAllSyncData(
syncable::ModelType type)
const {
DCHECK_EQ(PREFERENCES, type);
- csync::SyncDataList current_data;
+ syncer::SyncDataList current_data;
for (PreferenceSet::const_iterator iter = synced_preferences_.begin();
iter != synced_preferences_.end();
++iter) {
@@ -288,7 +288,7 @@ csync::SyncDataList PrefModelAssociator::GetAllSyncData(
if (!pref->IsUserControlled() || pref->IsDefaultValue())
continue; // This is not data we care about.
// TODO(zea): plumb a way to read the user controlled value.
- csync::SyncData sync_data;
+ syncer::SyncData sync_data;
if (!CreatePrefSyncData(name, *pref->GetValue(), &sync_data))
continue;
current_data.push_back(sync_data);
@@ -296,17 +296,17 @@ csync::SyncDataList PrefModelAssociator::GetAllSyncData(
return current_data;
}
-csync::SyncError PrefModelAssociator::ProcessSyncChanges(
+syncer::SyncError PrefModelAssociator::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
if (!models_associated_) {
- csync::SyncError error(FROM_HERE,
+ syncer::SyncError error(FROM_HERE,
"Models not yet associated.",
PREFERENCES);
return error;
}
AutoReset<bool> processing_changes(&processing_syncer_changes_, true);
- csync::SyncChangeList::const_iterator iter;
+ syncer::SyncChangeList::const_iterator iter;
for (iter = change_list.begin(); iter != change_list.end(); ++iter) {
DCHECK_EQ(PREFERENCES, iter->sync_data().GetDataType());
@@ -316,7 +316,7 @@ csync::SyncError PrefModelAssociator::ProcessSyncChanges(
scoped_ptr<Value> value(ReadPreferenceSpecifics(pref_specifics,
&name));
- if (iter->change_type() == csync::SyncChange::ACTION_DELETE) {
+ if (iter->change_type() == syncer::SyncChange::ACTION_DELETE) {
// We never delete preferences.
NOTREACHED() << "Attempted to process sync delete change for " << name
<< ". Skipping.";
@@ -347,11 +347,11 @@ csync::SyncError PrefModelAssociator::ProcessSyncChanges(
pref_service_->Set(pref_name, *value);
// Keep track of any newly synced preferences.
- if (iter->change_type() == csync::SyncChange::ACTION_ADD) {
+ if (iter->change_type() == syncer::SyncChange::ACTION_ADD) {
synced_preferences_.insert(name);
}
}
- return csync::SyncError();
+ return syncer::SyncError();
}
Value* PrefModelAssociator::ReadPreferenceSpecifics(
@@ -403,7 +403,7 @@ void PrefModelAssociator::ProcessPrefChange(const std::string& name) {
if (!IsPrefRegistered(name.c_str()))
return; // We are not syncing this preference.
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
if (!preference->IsUserModifiable()) {
// If the preference is no longer user modifiable, it must now be controlled
@@ -419,19 +419,19 @@ void PrefModelAssociator::ProcessPrefChange(const std::string& name) {
// Not in synced_preferences_ means no synced data. InitPrefAndAssociate(..)
// will determine if we care about its data (e.g. if it has a default value
// and hasn't been changed yet we don't) and take care syncing any new data.
- InitPrefAndAssociate(csync::SyncData(), name, &changes);
+ InitPrefAndAssociate(syncer::SyncData(), name, &changes);
} else {
// We are already syncing this preference, just update it's sync node.
- csync::SyncData sync_data;
+ syncer::SyncData sync_data;
if (!CreatePrefSyncData(name, *preference->GetValue(), &sync_data)) {
LOG(ERROR) << "Failed to update preference.";
return;
}
changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
}
- csync::SyncError error =
+ syncer::SyncError error =
sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
}
diff --git a/chrome/browser/prefs/pref_model_associator.h b/chrome/browser/prefs/pref_model_associator.h
index 21e3fdd..4588b92 100644
--- a/chrome/browser/prefs/pref_model_associator.h
+++ b/chrome/browser/prefs/pref_model_associator.h
@@ -29,23 +29,23 @@ class Value;
// TODO(sync): Merge this into PrefService once we separate the profile
// PrefService from the local state PrefService.
class PrefModelAssociator
- : public csync::SyncableService,
+ : public syncer::SyncableService,
public base::NonThreadSafe {
public:
PrefModelAssociator();
virtual ~PrefModelAssociator();
- // csync::SyncableService implementation.
- virtual csync::SyncDataList GetAllSyncData(
+ // syncer::SyncableService implementation.
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
- virtual csync::SyncError MergeDataAndStartSyncing(
+ const syncer::SyncChangeList& change_list) OVERRIDE;
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
// Returns the list of preference names that are registered as syncable, and
@@ -85,7 +85,7 @@ class PrefModelAssociator
// provided.
static bool CreatePrefSyncData(const std::string& name,
const base::Value& value,
- csync::SyncData* sync_data);
+ syncer::SyncData* sync_data);
// Extract preference value and name from sync specifics.
base::Value* ReadPreferenceSpecifics(
@@ -95,7 +95,7 @@ class PrefModelAssociator
protected:
friend class ProfileSyncServicePreferenceTest;
- typedef std::map<std::string, csync::SyncData> SyncDataMap;
+ typedef std::map<std::string, syncer::SyncData> SyncDataMap;
// Create an association for a given preference. If |sync_pref| is valid,
// signifying that sync has data for this preference, we reconcile their data
@@ -105,9 +105,9 @@ class PrefModelAssociator
// Note: We do not modify the sync data for preferences that are either
// controlled by policy (are not user modifiable) or have their default value
// (are not user controlled).
- void InitPrefAndAssociate(const csync::SyncData& sync_pref,
+ void InitPrefAndAssociate(const syncer::SyncData& sync_pref,
const std::string& pref_name,
- csync::SyncChangeList* sync_changes);
+ syncer::SyncChangeList* sync_changes);
static base::Value* MergeListValues(
const base::Value& from_value, const base::Value& to_value);
@@ -142,11 +142,11 @@ class PrefModelAssociator
// The PrefService we are syncing to.
PrefService* pref_service_;
- // Sync's csync::SyncChange handler. We push all our changes through this.
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
+ // Sync's syncer::SyncChange handler. We push all our changes through this.
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
// Sync's error handler. We use this to create sync errors.
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator);
};
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index e39f928..fff62ff 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -920,7 +920,7 @@ void PrefService::SetUserPrefValue(const char* path, Value* new_value) {
user_pref_store_->SetValue(path, owned_value.release());
}
-csync::SyncableService* PrefService::GetSyncableService() {
+syncer::SyncableService* PrefService::GetSyncableService() {
return pref_sync_associator_.get();
}
diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
index b76f32a..29b3e7e 100644
--- a/chrome/browser/prefs/pref_service.h
+++ b/chrome/browser/prefs/pref_service.h
@@ -34,7 +34,7 @@ namespace content {
class NotificationObserver;
}
-namespace csync {
+namespace syncer {
class SyncableService;
}
@@ -321,9 +321,9 @@ class PrefService : public base::NonThreadSafe {
PrefInitializationStatus GetInitializationStatus() const;
- // csync::SyncableService getter.
- // TODO(zea): Have PrefService implement csync::SyncableService directly.
- csync::SyncableService* GetSyncableService();
+ // syncer::SyncableService getter.
+ // TODO(zea): Have PrefService implement syncer::SyncableService directly.
+ syncer::SyncableService* GetSyncableService();
// Tell our PrefValueStore to update itself using |command_line|.
// Do not call this after having derived an incognito or per tab pref service.
diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc
index d5b92d4..f29c6e3 100644
--- a/chrome/browser/search_engines/template_url_service.cc
+++ b/chrome/browser/search_engines/template_url_service.cc
@@ -110,24 +110,24 @@ TemplateURL* FirstPotentialDefaultEngine(
// 3) There is an update after an update for the same GUID. We prune earlier
// ones just to save bandwidth (Sync would normally coalesce them).
bool ShouldRemoveSyncChange(size_t index,
- csync::SyncChangeList* change_list,
+ syncer::SyncChangeList* change_list,
const SyncDataMap* sync_data) {
DCHECK(index < change_list->size());
- const csync::SyncChange& change_i = (*change_list)[index];
+ const syncer::SyncChange& change_i = (*change_list)[index];
const std::string guid = change_i.sync_data().GetSpecifics()
.search_engine().sync_guid();
- csync::SyncChange::SyncChangeType type = change_i.change_type();
- if ((type == csync::SyncChange::ACTION_UPDATE ||
- type == csync::SyncChange::ACTION_DELETE) &&
+ syncer::SyncChange::SyncChangeType type = change_i.change_type();
+ if ((type == syncer::SyncChange::ACTION_UPDATE ||
+ type == syncer::SyncChange::ACTION_DELETE) &&
sync_data->find(guid) == sync_data->end())
return true;
- if (type == csync::SyncChange::ACTION_ADD &&
+ if (type == syncer::SyncChange::ACTION_ADD &&
sync_data->find(guid) != sync_data->end())
return true;
- if (type == csync::SyncChange::ACTION_UPDATE) {
+ if (type == syncer::SyncChange::ACTION_UPDATE) {
for (size_t j = index + 1; j < change_list->size(); j++) {
- const csync::SyncChange& change_j = (*change_list)[j];
- if ((csync::SyncChange::ACTION_UPDATE == change_j.change_type()) &&
+ const syncer::SyncChange& change_j = (*change_list)[j];
+ if ((syncer::SyncChange::ACTION_UPDATE == change_j.change_type()) &&
(change_j.sync_data().GetSpecifics().search_engine().sync_guid() ==
guid))
return true;
@@ -137,12 +137,12 @@ bool ShouldRemoveSyncChange(size_t index,
}
// Remove SyncChanges that should not be sent to the server from |change_list|.
-// This is done to eliminate incorrect csync::SyncChanges added by the merge and
+// This is done to eliminate incorrect SyncChanges added by the merge and
// conflict resolution logic when it is unsure of whether or not an entry is new
// from Sync or originally from the local model. This also removes changes that
// would be otherwise be coalesced by Sync in order to save bandwidth.
void PruneSyncChanges(const SyncDataMap* sync_data,
- csync::SyncChangeList* change_list) {
+ syncer::SyncChangeList* change_list) {
for (size_t i = 0; i < change_list->size(); ) {
if (ShouldRemoveSyncChange(i, change_list, sync_data))
change_list->erase(change_list->begin() + i);
@@ -863,11 +863,11 @@ void TemplateURLService::Observe(int type,
}
}
-csync::SyncDataList TemplateURLService::GetAllSyncData(
+syncer::SyncDataList TemplateURLService::GetAllSyncData(
syncable::ModelType type) const {
DCHECK_EQ(syncable::SEARCH_ENGINES, type);
- csync::SyncDataList current_data;
+ syncer::SyncDataList current_data;
for (TemplateURLVector::const_iterator iter = template_urls_.begin();
iter != template_urls_.end(); ++iter) {
// We don't sync extension keywords.
@@ -884,11 +884,11 @@ csync::SyncDataList TemplateURLService::GetAllSyncData(
return current_data;
}
-csync::SyncError TemplateURLService::ProcessSyncChanges(
+syncer::SyncError TemplateURLService::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
if (!models_associated_) {
- csync::SyncError error(FROM_HERE, "Models not yet associated.",
+ syncer::SyncError error(FROM_HERE, "Models not yet associated.",
syncable::SEARCH_ENGINES);
return error;
}
@@ -902,9 +902,9 @@ csync::SyncError TemplateURLService::ProcessSyncChanges(
AutoReset<DefaultSearchChangeOrigin> change_origin(&dsp_change_origin_,
DSP_CHANGE_SYNC_UNINTENTIONAL);
- csync::SyncChangeList new_changes;
- csync::SyncError error;
- for (csync::SyncChangeList::const_iterator iter = change_list.begin();
+ syncer::SyncChangeList new_changes;
+ syncer::SyncError error;
+ for (syncer::SyncChangeList::const_iterator iter = change_list.begin();
iter != change_list.end(); ++iter) {
DCHECK_EQ(syncable::SEARCH_ENGINES, iter->sync_data().GetDataType());
@@ -923,7 +923,7 @@ csync::SyncError TemplateURLService::ProcessSyncChanges(
// need to undergo conflict resolution.
TemplateURL* existing_keyword_turl =
FindNonExtensionTemplateURLForKeyword(turl->keyword());
- if (iter->change_type() == csync::SyncChange::ACTION_DELETE) {
+ if (iter->change_type() == syncer::SyncChange::ACTION_DELETE) {
if (!existing_turl) {
NOTREACHED() << "Unexpected sync change state.";
error = sync_error_factory_->CreateAndUploadError(
@@ -948,7 +948,7 @@ csync::SyncError TemplateURLService::ProcessSyncChanges(
SetDefaultSearchProvider(FindNewDefaultSearchProvider());
}
}
- } else if (iter->change_type() == csync::SyncChange::ACTION_ADD) {
+ } else if (iter->change_type() == syncer::SyncChange::ACTION_ADD) {
if (existing_turl) {
NOTREACHED() << "Unexpected sync change state.";
error = sync_error_factory_->CreateAndUploadError(
@@ -968,7 +968,7 @@ csync::SyncError TemplateURLService::ProcessSyncChanges(
// Possibly set the newly added |turl| as the default search provider.
SetDefaultSearchProviderIfNewlySynced(guid);
}
- } else if (iter->change_type() == csync::SyncChange::ACTION_UPDATE) {
+ } else if (iter->change_type() == syncer::SyncChange::ACTION_UPDATE) {
if (!existing_turl) {
NOTREACHED() << "Unexpected sync change state.";
error = sync_error_factory_->CreateAndUploadError(
@@ -1010,11 +1010,11 @@ csync::SyncError TemplateURLService::ProcessSyncChanges(
return error;
}
-csync::SyncError TemplateURLService::MergeDataAndStartSyncing(
+syncer::SyncError TemplateURLService::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
DCHECK(loaded_);
DCHECK_EQ(type, syncable::SEARCH_ENGINES);
DCHECK(!sync_processor_.get());
@@ -1045,9 +1045,9 @@ csync::SyncError TemplateURLService::MergeDataAndStartSyncing(
AutoReset<DefaultSearchChangeOrigin> change_origin(&dsp_change_origin_,
DSP_CHANGE_SYNC_UNINTENTIONAL);
- csync::SyncChangeList new_changes;
+ syncer::SyncChangeList new_changes;
- // Build maps of our sync GUIDs to csync::SyncData.
+ // Build maps of our sync GUIDs to syncer::SyncData.
SyncDataMap local_data_map = CreateGUIDToSyncDataMap(
GetAllSyncData(syncable::SEARCH_ENGINES));
SyncDataMap sync_data_map = CreateGUIDToSyncDataMap(initial_sync_data);
@@ -1066,8 +1066,9 @@ csync::SyncError TemplateURLService::MergeDataAndStartSyncing(
// This entry was deleted before the initial sync began (possibly through
// preprocessing in TemplateURLService's loading code). Ignore it and send
// an ACTION_DELETE up to the server.
- new_changes.push_back(csync::SyncChange(csync::SyncChange::ACTION_DELETE,
- iter->second));
+ new_changes.push_back(
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE,
+ iter->second));
continue;
}
@@ -1088,7 +1089,7 @@ csync::SyncError TemplateURLService::MergeDataAndStartSyncing(
// Otherwise, we know we have newer data, so update Sync with our
// data fields.
new_changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE,
local_data_map[local_turl->sync_guid()]));
}
local_data_map.erase(iter->first);
@@ -1131,14 +1132,14 @@ csync::SyncError TemplateURLService::MergeDataAndStartSyncing(
for (SyncDataMap::const_iterator iter = local_data_map.begin();
iter != local_data_map.end(); ++iter) {
new_changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_ADD, iter->second));
+ syncer::SyncChange(syncer::SyncChange::ACTION_ADD, iter->second));
}
// Do some post-processing on the change list to ensure that we are sending
// valid changes to sync_processor_.
PruneSyncChanges(&sync_data_map, &new_changes);
- csync::SyncError error =
+ syncer::SyncError error =
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
if (error.IsSet())
return error;
@@ -1148,7 +1149,7 @@ csync::SyncError TemplateURLService::MergeDataAndStartSyncing(
pre_sync_deletes_.clear();
models_associated_ = true;
- return csync::SyncError();
+ return syncer::SyncError();
}
void TemplateURLService::StopSyncing(syncable::ModelType type) {
@@ -1160,8 +1161,8 @@ void TemplateURLService::StopSyncing(syncable::ModelType type) {
void TemplateURLService::ProcessTemplateURLChange(
const TemplateURL* turl,
- csync::SyncChange::SyncChangeType type) {
- DCHECK_NE(type, csync::SyncChange::ACTION_INVALID);
+ syncer::SyncChange::SyncChangeType type) {
+ DCHECK_NE(type, syncer::SyncChange::ACTION_INVALID);
DCHECK(turl);
if (!models_associated_)
@@ -1180,16 +1181,16 @@ void TemplateURLService::ProcessTemplateURLChange(
if (turl->created_by_policy())
return;
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*turl);
- changes.push_back(csync::SyncChange(type, sync_data));
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*turl);
+ changes.push_back(syncer::SyncChange(type, sync_data));
sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
}
// static
-csync::SyncData TemplateURLService::CreateSyncDataFromTemplateURL(
+syncer::SyncData TemplateURLService::CreateSyncDataFromTemplateURL(
const TemplateURL& turl) {
sync_pb::EntitySpecifics specifics;
sync_pb::SearchEngineSpecifics* se_specifics =
@@ -1208,7 +1209,7 @@ csync::SyncData TemplateURLService::CreateSyncDataFromTemplateURL(
se_specifics->set_instant_url(turl.instant_url());
se_specifics->set_last_modified(turl.last_modified().ToInternalValue());
se_specifics->set_sync_guid(turl.sync_guid());
- return csync::SyncData::CreateLocalData(se_specifics->sync_guid(),
+ return syncer::SyncData::CreateLocalData(se_specifics->sync_guid(),
se_specifics->keyword(),
specifics);
}
@@ -1217,8 +1218,8 @@ csync::SyncData TemplateURLService::CreateSyncDataFromTemplateURL(
TemplateURL* TemplateURLService::CreateTemplateURLFromTemplateURLAndSyncData(
Profile* profile,
TemplateURL* existing_turl,
- const csync::SyncData& sync_data,
- csync::SyncChangeList* change_list) {
+ const syncer::SyncData& sync_data,
+ syncer::SyncChangeList* change_list) {
DCHECK(change_list);
sync_pb::SearchEngineSpecifics specifics =
@@ -1228,7 +1229,7 @@ TemplateURL* TemplateURLService::CreateTemplateURLFromTemplateURLAndSyncData(
// delete this data off the server.
if (specifics.url().empty() || specifics.sync_guid().empty()) {
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE, sync_data));
return NULL;
}
@@ -1269,9 +1270,9 @@ TemplateURL* TemplateURLService::CreateTemplateURLFromTemplateURLAndSyncData(
if (reset_keyword || deduped) {
if (reset_keyword)
turl->ResetKeywordIfNecessary(true);
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*turl);
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*turl);
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
} else if (turl->IsGoogleSearchURLWithReplaceableKeyword()) {
if (!existing_turl) {
// We're adding a new TemplateURL that uses the Google base URL, so set
@@ -1292,9 +1293,9 @@ TemplateURL* TemplateURLService::CreateTemplateURLFromTemplateURLAndSyncData(
// static
SyncDataMap TemplateURLService::CreateGUIDToSyncDataMap(
- const csync::SyncDataList& sync_data) {
+ const syncer::SyncDataList& sync_data) {
SyncDataMap data_map;
- for (csync::SyncDataList::const_iterator i(sync_data.begin());
+ for (syncer::SyncDataList::const_iterator i(sync_data.begin());
i != sync_data.end();
++i)
data_map[i->GetSpecifics().search_engine().sync_guid()] = *i;
@@ -1727,7 +1728,7 @@ bool TemplateURLService::UpdateNoNotify(
service_->UpdateKeyword(existing_turl->data());
// Inform sync of the update.
- ProcessTemplateURLChange(existing_turl, csync::SyncChange::ACTION_UPDATE);
+ ProcessTemplateURLChange(existing_turl, syncer::SyncChange::ACTION_UPDATE);
if (default_search_provider_ == existing_turl) {
bool success = SetDefaultSearchProviderNoNotify(existing_turl);
@@ -2058,7 +2059,7 @@ bool TemplateURLService::SetDefaultSearchProviderNoNotify(TemplateURL* url) {
// Inform sync the change to the show_in_default_list flag.
if (url)
- ProcessTemplateURLChange(url, csync::SyncChange::ACTION_UPDATE);
+ ProcessTemplateURLChange(url, syncer::SyncChange::ACTION_UPDATE);
return true;
}
@@ -2107,7 +2108,7 @@ bool TemplateURLService::AddNoNotify(TemplateURL* template_url,
// Inform sync of the addition. Note that this will assign a GUID to
// template_url and add it to the guid_to_template_map_.
- ProcessTemplateURLChange(template_url, csync::SyncChange::ACTION_ADD);
+ ProcessTemplateURLChange(template_url, syncer::SyncChange::ACTION_ADD);
}
return true;
@@ -2137,7 +2138,7 @@ void TemplateURLService::RemoveNoNotify(TemplateURL* template_url) {
service_->RemoveKeyword(template_url->id());
// Inform sync of the deletion.
- ProcessTemplateURLChange(template_url, csync::SyncChange::ACTION_DELETE);
+ ProcessTemplateURLChange(template_url, syncer::SyncChange::ACTION_DELETE);
if (profile_) {
content::Source<Profile> source(profile_);
@@ -2249,7 +2250,7 @@ string16 TemplateURLService::UniquifyKeyword(const TemplateURL& turl) {
bool TemplateURLService::ResolveSyncKeywordConflict(
TemplateURL* sync_turl,
TemplateURL* local_turl,
- csync::SyncChangeList* change_list) {
+ syncer::SyncChangeList* change_list) {
DCHECK(loaded_);
DCHECK(sync_turl);
DCHECK(local_turl);
@@ -2263,9 +2264,9 @@ bool TemplateURLService::ResolveSyncKeywordConflict(
(local_turl == GetDefaultSearchProvider());
const bool can_replace_local = CanReplace(local_turl);
if (CanReplace(sync_turl) && (local_is_better || !can_replace_local)) {
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*sync_turl);
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*sync_turl);
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE, sync_data));
return false;
}
if (can_replace_local) {
@@ -2276,9 +2277,9 @@ bool TemplateURLService::ResolveSyncKeywordConflict(
// than having just been brought down, then this is wrong, because the
// server doesn't yet know about this entity; but in this case,
// PruneSyncChanges() will prune out the ACTION_DELETE we create here.
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE, sync_data));
Remove(local_turl);
} else if (local_is_better) {
string16 new_keyword = UniquifyKeyword(*sync_turl);
@@ -2286,9 +2287,9 @@ bool TemplateURLService::ResolveSyncKeywordConflict(
sync_turl->data_.SetKeyword(new_keyword);
// If we update the cloud TURL, we need to push an update back to sync
// informing it that something has changed.
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*sync_turl);
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*sync_turl);
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
} else {
string16 new_keyword = UniquifyKeyword(*local_turl);
TemplateURLData data(local_turl->data());
@@ -2305,9 +2306,9 @@ bool TemplateURLService::ResolveSyncKeywordConflict(
// server won't know about this entity until it processes the ACTION_ADD our
// caller will later generate; but in this case, PruneSyncChanges() will
// prune out the ACTION_UPDATE we create here.
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
}
return true;
}
@@ -2322,7 +2323,7 @@ TemplateURL* TemplateURLService::FindDuplicateOfSyncTemplateURL(
void TemplateURLService::MergeSyncAndLocalURLDuplicates(
TemplateURL* sync_turl,
TemplateURL* local_turl,
- csync::SyncChangeList* change_list) {
+ syncer::SyncChangeList* change_list) {
DCHECK(loaded_);
DCHECK(sync_turl);
DCHECK(local_turl);
@@ -2340,9 +2341,9 @@ void TemplateURLService::MergeSyncAndLocalURLDuplicates(
// See comments in ResolveSyncKeywordConflict() regarding generating an
// ACTION_DELETE manually since Remove() won't do it.
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE, sync_data));
Remove(local_turl);
// Force the local ID to kInvalidTemplateURLID so we can add it.
@@ -2356,9 +2357,9 @@ void TemplateURLService::MergeSyncAndLocalURLDuplicates(
// the server, and the next time local_url is synced, it is recognized by
// having the same GUID.
ResetTemplateURLGUID(local_turl, sync_turl->sync_guid());
- csync::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
+ syncer::SyncData sync_data = CreateSyncDataFromTemplateURL(*local_turl);
change_list->push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
}
}
diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h
index 11ee4a4..050a59c 100644
--- a/chrome/browser/search_engines/template_url_service.h
+++ b/chrome/browser/search_engines/template_url_service.h
@@ -31,7 +31,7 @@ class SearchHostToURLsMap;
class SearchTermsData;
class TemplateURLServiceObserver;
-namespace csync {
+namespace syncer {
class SyncData;
class SyncErrorFactory;
}
@@ -68,13 +68,13 @@ struct URLVisitedDetails;
class TemplateURLService : public WebDataServiceConsumer,
public ProfileKeyedService,
public content::NotificationObserver,
- public csync::SyncableService {
+ public syncer::SyncableService {
public:
typedef std::map<std::string, std::string> QueryTerms;
typedef std::vector<TemplateURL*> TemplateURLVector;
// Type for a static function pointer that acts as a time source.
typedef base::Time(TimeProvider)();
- typedef std::map<std::string, csync::SyncData> SyncDataMap;
+ typedef std::map<std::string, syncer::SyncData> SyncDataMap;
// Struct used for initializing the data store with fake data.
// Each initializer is mapped to a TemplateURL.
@@ -265,26 +265,26 @@ class TemplateURLService : public WebDataServiceConsumer,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // csync::SyncableService implementation.
+ // syncer::SyncableService implementation.
// Returns all syncable TemplateURLs from this model as SyncData. This should
// include every search engine and no Extension keywords.
- virtual csync::SyncDataList GetAllSyncData(
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
// Process new search engine changes from Sync, merging them into our local
// data. This may send notifications if local search engines are added,
// updated or removed.
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
// Merge initial search engine data from Sync and push any local changes up
// to Sync. This may send notifications if local search engines are added,
// updated or removed.
- virtual csync::SyncError MergeDataAndStartSyncing(
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
// Processes a local TemplateURL change for Sync. |turl| is the TemplateURL
@@ -293,13 +293,14 @@ class TemplateURLService : public WebDataServiceConsumer,
// associated with Sync, or if this is triggered by a Sync change, then this
// does nothing.
void ProcessTemplateURLChange(const TemplateURL* turl,
- csync::SyncChange::SyncChangeType type);
+ syncer::SyncChange::SyncChangeType type);
Profile* profile() const { return profile_; }
// Returns a SyncData with a sync representation of the search engine data
// from |turl|.
- static csync::SyncData CreateSyncDataFromTemplateURL(const TemplateURL& turl);
+ static syncer::SyncData CreateSyncDataFromTemplateURL(
+ const TemplateURL& turl);
// Creates a new heap-allocated TemplateURL* which is populated by overlaying
// |sync_data| atop |existing_turl|. |existing_turl| may be NULL; if not it
@@ -312,12 +313,12 @@ class TemplateURLService : public WebDataServiceConsumer,
static TemplateURL* CreateTemplateURLFromTemplateURLAndSyncData(
Profile* profile,
TemplateURL* existing_turl,
- const csync::SyncData& sync_data,
- csync::SyncChangeList* change_list);
+ const syncer::SyncData& sync_data,
+ syncer::SyncChangeList* change_list);
- // Returns a map mapping Sync GUIDs to pointers to csync::SyncData.
+ // Returns a map mapping Sync GUIDs to pointers to syncer::SyncData.
static SyncDataMap CreateGUIDToSyncDataMap(
- const csync::SyncDataList& sync_data);
+ const syncer::SyncDataList& sync_data);
#if defined(UNIT_TEST)
// Set a different time provider function, such as
@@ -539,7 +540,7 @@ class TemplateURLService : public WebDataServiceConsumer,
// * Otherwise |sync_turl| is better.
// Then resolves the conflict:
// * If the "worse" entry is |sync_turl|, and it is replaceable, add a
- // csync::SyncChange to delete it, and return false.
+ // syncer::SyncChange to delete it, and return false.
// * If the "worse" entry is |local_turl|, and it is replaceable, remove it
// from the service and return true.
// * Otherwise, uniquify the keyword of the "worse" entry. If it is
@@ -557,7 +558,7 @@ class TemplateURLService : public WebDataServiceConsumer,
// extension- vs. non-extension-based TemplateURLs with the same keyword.
bool ResolveSyncKeywordConflict(TemplateURL* sync_turl,
TemplateURL* local_turl,
- csync::SyncChangeList* change_list);
+ syncer::SyncChangeList* change_list);
// Returns a TemplateURL from the service that has the same keyword and search
// URL as |sync_turl|, if it exists.
@@ -572,7 +573,7 @@ class TemplateURLService : public WebDataServiceConsumer,
// newer, so the caller must release it if need be.
void MergeSyncAndLocalURLDuplicates(TemplateURL* sync_turl,
TemplateURL* local_turl,
- csync::SyncChangeList* change_list);
+ syncer::SyncChangeList* change_list);
// Checks a newly added TemplateURL from Sync by its sync_guid and sets it as
// the default search provider if we were waiting for it.
@@ -657,11 +658,11 @@ class TemplateURLService : public WebDataServiceConsumer,
// true, we ignore any local search engine changes, since we triggered them.
bool processing_syncer_changes_;
- // Sync's csync::SyncChange handler. We push all our changes through this.
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
+ // Sync's syncer::SyncChange handler. We push all our changes through this.
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
// Sync's error handler. We use it to create a sync error.
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
// Whether or not we are waiting on the default search provider to come in
// from Sync. This is to facilitate the fact that changes to the value of
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 58f6cc0..dbe86d3 100644
--- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc
@@ -30,18 +30,18 @@ using base::Time;
namespace {
-// Extract the GUID from a search engine csync::SyncData.
-std::string GetGUID(const csync::SyncData& sync_data) {
+// Extract the GUID from a search engine syncer::SyncData.
+std::string GetGUID(const syncer::SyncData& sync_data) {
return sync_data.GetSpecifics().search_engine().sync_guid();
}
-// Extract the URL from a search engine csync::SyncData.
-std::string GetURL(const csync::SyncData& sync_data) {
+// Extract the URL from a search engine syncer::SyncData.
+std::string GetURL(const syncer::SyncData& sync_data) {
return sync_data.GetSpecifics().search_engine().url();
}
-// Extract the keyword from a search engine csync::SyncData.
-std::string GetKeyword(const csync::SyncData& sync_data) {
+// Extract the keyword from a search engine syncer::SyncData.
+std::string GetKeyword(const syncer::SyncData& sync_data) {
return sync_data.GetSpecifics().search_engine().keyword();
}
@@ -49,7 +49,7 @@ std::string GetKeyword(const csync::SyncData& sync_data) {
// caller to override the keyword, URL, or GUID fields with empty strings, in
// order to create custom data that should be handled specially when synced to a
// client.
-csync::SyncData CreateCustomSyncData(const TemplateURL& turl,
+syncer::SyncData CreateCustomSyncData(const TemplateURL& turl,
bool autogenerate_keyword,
const std::string& url,
const std::string& sync_guid) {
@@ -72,7 +72,7 @@ csync::SyncData CreateCustomSyncData(const TemplateURL& turl,
se_specifics->set_instant_url(turl.instant_url());
se_specifics->set_last_modified(turl.last_modified().ToInternalValue());
se_specifics->set_sync_guid(sync_guid);
- return csync::SyncData::CreateLocalData(turl.sync_guid(), // Must be valid!
+ return syncer::SyncData::CreateLocalData(turl.sync_guid(), // Must be valid!
se_specifics->keyword(), specifics);
}
@@ -81,21 +81,21 @@ csync::SyncData CreateCustomSyncData(const TemplateURL& turl,
// Dummy SyncChangeProcessor used to help review what SyncChanges are pushed
// back up to Sync.
-class TestChangeProcessor : public csync::SyncChangeProcessor {
+class TestChangeProcessor : public syncer::SyncChangeProcessor {
public:
TestChangeProcessor();
virtual ~TestChangeProcessor();
// Store a copy of all the changes passed in so we can examine them later.
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
bool contains_guid(const std::string& guid) const {
return change_map_.count(guid) != 0;
}
- csync::SyncChange change_for_guid(const std::string& guid) const {
+ syncer::SyncChange change_for_guid(const std::string& guid) const {
DCHECK(contains_guid(guid));
return change_map_.find(guid)->second;
}
@@ -106,7 +106,7 @@ class TestChangeProcessor : public csync::SyncChangeProcessor {
private:
// Track the changes received in ProcessSyncChanges.
- std::map<std::string, csync::SyncChange> change_map_;
+ std::map<std::string, syncer::SyncChange> change_map_;
bool erroneous_;
DISALLOW_COPY_AND_ASSIGN(TestChangeProcessor);
@@ -118,41 +118,42 @@ TestChangeProcessor::TestChangeProcessor() : erroneous_(false) {
TestChangeProcessor::~TestChangeProcessor() {
}
-csync::SyncError TestChangeProcessor::ProcessSyncChanges(
+syncer::SyncError TestChangeProcessor::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
if (erroneous_)
- return csync::SyncError(FROM_HERE, "Some error.", syncable::SEARCH_ENGINES);
+ return syncer::SyncError(
+ FROM_HERE, "Some error.", syncable::SEARCH_ENGINES);
change_map_.erase(change_map_.begin(), change_map_.end());
- for (csync::SyncChangeList::const_iterator iter = change_list.begin();
+ for (syncer::SyncChangeList::const_iterator iter = change_list.begin();
iter != change_list.end(); ++iter)
change_map_[GetGUID(iter->sync_data())] = *iter;
- return csync::SyncError();
+ return syncer::SyncError();
}
// SyncChangeProcessorDelegate ------------------------------------------------
-class SyncChangeProcessorDelegate : public csync::SyncChangeProcessor {
+class SyncChangeProcessorDelegate : public syncer::SyncChangeProcessor {
public:
- explicit SyncChangeProcessorDelegate(csync::SyncChangeProcessor* recipient);
+ explicit SyncChangeProcessorDelegate(syncer::SyncChangeProcessor* recipient);
virtual ~SyncChangeProcessorDelegate();
- // csync::SyncChangeProcessor implementation.
- virtual csync::SyncError ProcessSyncChanges(
+ // syncer::SyncChangeProcessor implementation.
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
private:
// The recipient of all sync changes.
- csync::SyncChangeProcessor* recipient_;
+ syncer::SyncChangeProcessor* recipient_;
DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate);
};
SyncChangeProcessorDelegate::SyncChangeProcessorDelegate(
- csync::SyncChangeProcessor* recipient)
+ syncer::SyncChangeProcessor* recipient)
: recipient_(recipient) {
DCHECK(recipient_);
}
@@ -160,9 +161,9 @@ SyncChangeProcessorDelegate::SyncChangeProcessorDelegate(
SyncChangeProcessorDelegate::~SyncChangeProcessorDelegate() {
}
-csync::SyncError SyncChangeProcessorDelegate::ProcessSyncChanges(
+syncer::SyncError SyncChangeProcessorDelegate::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
return recipient_->ProcessSyncChanges(from_here, change_list);
}
@@ -187,8 +188,8 @@ class TemplateURLServiceSyncTest : public testing::Test {
TemplateURLService* model_b() { return model_b_.get(); }
TestingProfile* profile_a() { return test_util_a_.profile(); }
TestChangeProcessor* processor() { return sync_processor_.get(); }
- scoped_ptr<csync::SyncChangeProcessor> PassProcessor();
- scoped_ptr<csync::SyncErrorFactory> CreateAndPassSyncErrorFactory();
+ scoped_ptr<syncer::SyncChangeProcessor> PassProcessor();
+ scoped_ptr<syncer::SyncErrorFactory> CreateAndPassSyncErrorFactory();
// Create a TemplateURL with some test values. The caller owns the returned
// TemplateURL*.
@@ -204,23 +205,24 @@ class TemplateURLServiceSyncTest : public testing::Test {
void AssertEquals(const TemplateURL& expected,
const TemplateURL& actual) const;
- // Expect that two csync::SyncDataLists have equal contents, in terms of the
+ // Expect that two syncer::SyncDataLists have equal contents, in terms of the
// sync_guid, keyword, and url fields.
- void AssertEquals(const csync::SyncDataList& data1,
- const csync::SyncDataList& data2) const;
+ void AssertEquals(const syncer::SyncDataList& data1,
+ const syncer::SyncDataList& data2) const;
// Convenience helper for creating SyncChanges. Takes ownership of |turl|.
- csync::SyncChange CreateTestSyncChange(csync::SyncChange::SyncChangeType type,
- TemplateURL* turl) const;
+ syncer::SyncChange CreateTestSyncChange(
+ syncer::SyncChange::SyncChangeType type,
+ TemplateURL* turl) const;
// Helper that creates some initial sync data. We cheat a little by specifying
// GUIDs for easy identification later. We also make the last_modified times
// slightly older than CreateTestTemplateURL's default, to test conflict
// resolution.
- csync::SyncDataList CreateInitialSyncData() const;
+ syncer::SyncDataList CreateInitialSyncData() const;
// Syntactic sugar.
- TemplateURL* Deserialize(const csync::SyncData& sync_data);
+ TemplateURL* Deserialize(const syncer::SyncData& sync_data);
protected:
// We keep two TemplateURLServices to test syncing between them.
@@ -258,14 +260,15 @@ void TemplateURLServiceSyncTest::TearDown() {
test_util_a_.TearDown();
}
-scoped_ptr<csync::SyncChangeProcessor>
+scoped_ptr<syncer::SyncChangeProcessor>
TemplateURLServiceSyncTest::PassProcessor() {
- return sync_processor_delegate_.PassAs<csync::SyncChangeProcessor>();
+ return sync_processor_delegate_.PassAs<syncer::SyncChangeProcessor>();
}
-scoped_ptr<csync::SyncErrorFactory> TemplateURLServiceSyncTest::
+scoped_ptr<syncer::SyncErrorFactory> TemplateURLServiceSyncTest::
CreateAndPassSyncErrorFactory() {
- return scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock());
+ return scoped_ptr<syncer::SyncErrorFactory>(
+ new syncer::SyncErrorFactoryMock());
}
TemplateURL* TemplateURLServiceSyncTest::CreateTestTemplateURL(
@@ -305,8 +308,8 @@ void TemplateURLServiceSyncTest::AssertEquals(const TemplateURL& expected,
}
void TemplateURLServiceSyncTest::AssertEquals(
- const csync::SyncDataList& data1,
- const csync::SyncDataList& data2) const {
+ const syncer::SyncDataList& data1,
+ const syncer::SyncDataList& data2) const {
SyncDataMap map1 = TemplateURLService::CreateGUIDToSyncDataMap(data1);
SyncDataMap map2 = TemplateURLService::CreateGUIDToSyncDataMap(data2);
@@ -322,18 +325,18 @@ void TemplateURLServiceSyncTest::AssertEquals(
EXPECT_EQ(0U, map2.size());
}
-csync::SyncChange TemplateURLServiceSyncTest::CreateTestSyncChange(
- csync::SyncChange::SyncChangeType type,
+syncer::SyncChange TemplateURLServiceSyncTest::CreateTestSyncChange(
+ syncer::SyncChange::SyncChangeType type,
TemplateURL* turl) const {
// We take control of the TemplateURL so make sure it's cleaned up after
// we create data out of it.
scoped_ptr<TemplateURL> scoped_turl(turl);
- return csync::SyncChange(type,
+ return syncer::SyncChange(type,
TemplateURLService::CreateSyncDataFromTemplateURL(*scoped_turl));
}
-csync::SyncDataList TemplateURLServiceSyncTest::CreateInitialSyncData() const {
- csync::SyncDataList list;
+syncer::SyncDataList TemplateURLServiceSyncTest::CreateInitialSyncData() const {
+ syncer::SyncDataList list;
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(ASCIIToUTF16("key1"),
"http://key1.com", "key1", 90));
@@ -349,8 +352,8 @@ csync::SyncDataList TemplateURLServiceSyncTest::CreateInitialSyncData() const {
}
TemplateURL* TemplateURLServiceSyncTest::Deserialize(
- const csync::SyncData& sync_data) {
- csync::SyncChangeList dummy;
+ const syncer::SyncData& sync_data) {
+ syncer::SyncChangeList dummy;
return TemplateURLService::CreateTemplateURLFromTemplateURLAndSyncData(NULL,
NULL, sync_data, &dummy);
}
@@ -363,7 +366,7 @@ TEST_F(TemplateURLServiceSyncTest, SerializeDeserialize) {
scoped_ptr<TemplateURL> turl(
CreateTestTemplateURL(
ASCIIToUTF16("unittest"), "http://www.unittest.com/"));
- csync::SyncData sync_data =
+ syncer::SyncData sync_data =
TemplateURLService::CreateSyncDataFromTemplateURL(*turl);
// Convert the specifics back to a TemplateURL.
scoped_ptr<TemplateURL> deserialized(Deserialize(sync_data));
@@ -376,12 +379,12 @@ TEST_F(TemplateURLServiceSyncTest, GetAllSyncDataBasic) {
model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key1"), "http://key1.com"));
model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key2"), "http://key2.com"));
model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key3"), "http://key3.com"));
- csync::SyncDataList all_sync_data =
+ syncer::SyncDataList all_sync_data =
model()->GetAllSyncData(syncable::SEARCH_ENGINES);
EXPECT_EQ(3U, all_sync_data.size());
- for (csync::SyncDataList::const_iterator iter = all_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = all_sync_data.begin();
iter != all_sync_data.end(); ++iter) {
std::string guid = GetGUID(*iter);
const TemplateURL* service_turl = model()->GetTemplateURLForGUID(guid);
@@ -395,12 +398,12 @@ TEST_F(TemplateURLServiceSyncTest, GetAllSyncDataNoExtensions) {
model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key2"), "http://key2.com"));
model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key3"),
std::string(chrome::kExtensionScheme) + "://blahblahblah"));
- csync::SyncDataList all_sync_data =
+ syncer::SyncDataList all_sync_data =
model()->GetAllSyncData(syncable::SEARCH_ENGINES);
EXPECT_EQ(2U, all_sync_data.size());
- for (csync::SyncDataList::const_iterator iter = all_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = all_sync_data.begin();
iter != all_sync_data.end(); ++iter) {
std::string guid = GetGUID(*iter);
const TemplateURL* service_turl = model()->GetTemplateURLForGUID(guid);
@@ -415,12 +418,12 @@ TEST_F(TemplateURLServiceSyncTest, GetAllSyncDataNoManagedEngines) {
TemplateURL* managed_turl = CreateTestTemplateURL(ASCIIToUTF16("key3"),
"http://key3.com", std::string(), 100, false, true);
model()->Add(managed_turl);
- csync::SyncDataList all_sync_data =
+ syncer::SyncDataList all_sync_data =
model()->GetAllSyncData(syncable::SEARCH_ENGINES);
EXPECT_EQ(2U, all_sync_data.size());
- for (csync::SyncDataList::const_iterator iter = all_sync_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = all_sync_data.begin();
iter != all_sync_data.end(); ++iter) {
std::string guid = GetGUID(*iter);
TemplateURL* service_turl = model()->GetTemplateURLForGUID(guid);
@@ -463,21 +466,21 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictNeitherAutoreplace) {
// marked safe_for_autoreplace.
// Create a keyword that conflicts, and make it older. Sync keyword is
- // uniquified, and a csync::SyncChange is added.
+ // uniquified, and a syncer::SyncChange is added.
string16 original_turl_keyword = ASCIIToUTF16("key1");
TemplateURL* original_turl = CreateTestTemplateURL(original_turl_keyword,
"http://key1.com", std::string(), 9000);
model()->Add(original_turl);
scoped_ptr<TemplateURL> sync_turl(CreateTestTemplateURL(original_turl_keyword,
"http://new.com", "remote", 8999));
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
EXPECT_TRUE(model()->ResolveSyncKeywordConflict(sync_turl.get(),
original_turl, &changes));
EXPECT_NE(original_turl_keyword, sync_turl->keyword());
EXPECT_EQ(original_turl_keyword, original_turl->keyword());
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("remote", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
@@ -501,7 +504,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictNeitherAutoreplace) {
EXPECT_EQ(NULL, model()->GetTemplateURLForKeyword(original_turl_keyword));
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("local", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
@@ -519,12 +522,12 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictNeitherAutoreplace) {
EXPECT_EQ(NULL, model()->GetTemplateURLForKeyword(original_turl_keyword));
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("local2", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
// Sync is newer, but original TemplateURL is created by policy, so it wins.
- // Sync keyword is uniquified, and a csync::SyncChange is added.
+ // Sync keyword is uniquified, and a syncer::SyncChange is added.
original_turl = CreateTestTemplateURL(original_turl_keyword,
"http://key1.com", std::string(), 9000, false, true);
model()->Add(original_turl);
@@ -537,7 +540,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictNeitherAutoreplace) {
EXPECT_EQ(NULL, model()->GetTemplateURLForKeyword(sync_turl->keyword()));
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("remote2", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
}
@@ -554,19 +557,19 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictBothAutoreplace) {
model()->Add(original_turl);
scoped_ptr<TemplateURL> sync_turl(CreateTestTemplateURL(original_turl_keyword,
"http://new.com", "remote", 8999, true));
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
EXPECT_FALSE(model()->ResolveSyncKeywordConflict(sync_turl.get(),
original_turl, &changes));
EXPECT_EQ(original_turl,
model()->GetTemplateURLForKeyword(original_turl_keyword));
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("remote", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
// Sync is newer. Original TemplateURL is removed from the model. A
- // csync::SyncChange is added (which in a normal run would be deleted by
+ // syncer::SyncChange is added (which in a normal run would be deleted by
// PruneSyncChanges() when the local GUID doesn't appear in the sync GUID
// list).
original_turl = CreateTestTemplateURL(original_turl_keyword,
@@ -580,7 +583,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictBothAutoreplace) {
EXPECT_TRUE(model()->GetTemplateURLs().empty());
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("local", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, changes[0].change_type());
changes.clear();
// Equal times. Same result as above. Sync left alone, original removed so
@@ -596,11 +599,11 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictBothAutoreplace) {
EXPECT_TRUE(model()->GetTemplateURLs().empty());
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("local2", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, changes[0].change_type());
changes.clear();
// Sync is newer, but original TemplateURL is created by policy, so it wins.
- // csync::SyncChange is added, function returns false.
+ // syncer::SyncChange is added, function returns false.
original_turl = CreateTestTemplateURL(original_turl_keyword,
"http://key1.com", std::string(), 9000, true, true);
model()->Add(original_turl);
@@ -612,7 +615,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictBothAutoreplace) {
model()->GetTemplateURLForKeyword(original_turl_keyword));
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("remote2", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
}
@@ -631,14 +634,14 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictOneAutoreplace) {
model()->Add(original_turl);
scoped_ptr<TemplateURL> sync_turl(CreateTestTemplateURL(original_turl_keyword,
"http://new.com", std::string(), 8999));
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
EXPECT_TRUE(model()->ResolveSyncKeywordConflict(sync_turl.get(),
original_turl, &changes));
EXPECT_EQ(original_turl_keyword, sync_turl->keyword());
EXPECT_TRUE(model()->GetTemplateURLs().empty());
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("local", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, changes[0].change_type());
changes.clear();
// Sync is newer. Normally the sync TemplateURL would win this.
@@ -653,7 +656,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictOneAutoreplace) {
model()->GetTemplateURLForKeyword(original_turl_keyword));
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("remote", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
@@ -669,7 +672,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncKeywordConflictOneAutoreplace) {
model()->GetTemplateURLForKeyword(original_turl_keyword));
ASSERT_EQ(1U, changes.size());
EXPECT_EQ("remote2", GetGUID(changes[0].sync_data()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, changes[0].change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, changes[0].change_type());
changes.clear();
model()->Remove(original_turl);
@@ -714,10 +717,10 @@ TEST_F(TemplateURLServiceSyncTest, MergeSyncAndLocalURLDuplicates) {
TemplateURL* sync_turl = CreateTestTemplateURL(ASCIIToUTF16("key1"),
"http://key1.com", std::string(), 9001);
std::string original_guid = original_turl->sync_guid();
- csync::SyncChangeList changes;
+ syncer::SyncChangeList changes;
// The sync TemplateURL is newer. It should replace the original TemplateURL
- // and a csync::SyncChange should be added to the list.
+ // and a syncer::SyncChange should be added to the list.
// Note that MergeSyncAndLocalURLDuplicates takes ownership of sync_turl.
model()->MergeSyncAndLocalURLDuplicates(sync_turl, original_turl, &changes);
TemplateURL* result = model()->GetTemplateURLForKeyword(ASCIIToUTF16("key1"));
@@ -725,14 +728,14 @@ TEST_F(TemplateURLServiceSyncTest, MergeSyncAndLocalURLDuplicates) {
EXPECT_EQ(9001, result->last_modified().ToTimeT());
EXPECT_EQ(1U, changes.size());
// We expect a change to delete the local entry.
- csync::SyncChange change = changes.at(0);
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, change.change_type());
+ syncer::SyncChange change = changes.at(0);
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, change.change_type());
EXPECT_EQ(original_guid,
change.sync_data().GetSpecifics().search_engine().sync_guid());
changes.clear();
// The sync TemplateURL is older. The existing TemplateURL should win and a
- // csync::SyncChange should be added to the list.
+ // syncer::SyncChange should be added to the list.
TemplateURL* sync_turl2 = CreateTestTemplateURL(ASCIIToUTF16("key1"),
"http://key1.com", std::string(), 8999);
std::string sync_guid = sync_turl2->sync_guid();
@@ -743,14 +746,14 @@ TEST_F(TemplateURLServiceSyncTest, MergeSyncAndLocalURLDuplicates) {
EXPECT_EQ(1U, changes.size());
// We expect a change to update the sync entry.
change = changes.at(0);
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_EQ(sync_guid,
change.sync_data().GetSpecifics().search_engine().sync_guid());
}
TEST_F(TemplateURLServiceSyncTest, StartSyncEmpty) {
model()->MergeDataAndStartSyncing(
- syncable::SEARCH_ENGINES, csync::SyncDataList(),
+ syncable::SEARCH_ENGINES, syncer::SyncDataList(),
PassProcessor(), CreateAndPassSyncErrorFactory());
EXPECT_EQ(0U, model()->GetAllSyncData(syncable::SEARCH_ENGINES).size());
@@ -758,7 +761,7 @@ TEST_F(TemplateURLServiceSyncTest, StartSyncEmpty) {
}
TEST_F(TemplateURLServiceSyncTest, MergeIntoEmpty) {
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES, initial_data,
PassProcessor(), CreateAndPassSyncErrorFactory());
@@ -766,7 +769,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeIntoEmpty) {
EXPECT_EQ(3U, model()->GetAllSyncData(syncable::SEARCH_ENGINES).size());
// We expect the model to have accepted all of the initial sync data. Search
// through the model using the GUIDs to ensure that they're present.
- for (csync::SyncDataList::const_iterator iter = initial_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = initial_data.begin();
iter != initial_data.end(); ++iter) {
std::string guid = GetGUID(*iter);
EXPECT_TRUE(model()->GetTemplateURLForGUID(guid));
@@ -782,7 +785,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeInAllNewData) {
"def"));
model()->Add(CreateTestTemplateURL(ASCIIToUTF16("xyz.com"), "http://xyz.com",
"xyz"));
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES, initial_data,
PassProcessor(), CreateAndPassSyncErrorFactory());
@@ -790,7 +793,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeInAllNewData) {
EXPECT_EQ(6U, model()->GetAllSyncData(syncable::SEARCH_ENGINES).size());
// We expect the model to have accepted all of the initial sync data. Search
// through the model using the GUIDs to ensure that they're present.
- for (csync::SyncDataList::const_iterator iter = initial_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = initial_data.begin();
iter != initial_data.end(); ++iter) {
std::string guid = GetGUID(*iter);
EXPECT_TRUE(model()->GetTemplateURLForGUID(guid));
@@ -810,8 +813,8 @@ TEST_F(TemplateURLServiceSyncTest, MergeSyncIsTheSame) {
// The local data is the same as the sync data merged in. i.e. - There have
// been no changes since the last time we synced. Even the last_modified
// timestamps are the same.
- csync::SyncDataList initial_data = CreateInitialSyncData();
- for (csync::SyncDataList::const_iterator iter = initial_data.begin();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
+ for (syncer::SyncDataList::const_iterator iter = initial_data.begin();
iter != initial_data.end(); ++iter) {
TemplateURL* converted = Deserialize(*iter);
model()->Add(converted);
@@ -821,7 +824,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeSyncIsTheSame) {
PassProcessor(), CreateAndPassSyncErrorFactory());
EXPECT_EQ(3U, model()->GetAllSyncData(syncable::SEARCH_ENGINES).size());
- for (csync::SyncDataList::const_iterator iter = initial_data.begin();
+ for (syncer::SyncDataList::const_iterator iter = initial_data.begin();
iter != initial_data.end(); ++iter) {
std::string guid = GetGUID(*iter);
EXPECT_TRUE(model()->GetTemplateURLForGUID(guid));
@@ -832,7 +835,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeSyncIsTheSame) {
TEST_F(TemplateURLServiceSyncTest, MergeUpdateFromSync) {
// The local data is the same as the sync data merged in, but timestamps have
// changed. Ensure the right fields are merged in.
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
TemplateURL* turl1 = CreateTestTemplateURL(ASCIIToUTF16("abc.com"),
"http://abc.com", "abc", 9000);
model()->Add(turl1);
@@ -863,8 +866,8 @@ TEST_F(TemplateURLServiceSyncTest, MergeUpdateFromSync) {
// Check that the second produced an upstream update to the xyz TemplateURL.
EXPECT_EQ(1U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("xyz"));
- csync::SyncChange change = processor()->change_for_guid("xyz");
- EXPECT_TRUE(change.change_type() == csync::SyncChange::ACTION_UPDATE);
+ syncer::SyncChange change = processor()->change_for_guid("xyz");
+ EXPECT_TRUE(change.change_type() == syncer::SyncChange::ACTION_UPDATE);
EXPECT_EQ("http://xyz.com", GetURL(change.sync_data()));
}
@@ -894,8 +897,8 @@ TEST_F(TemplateURLServiceSyncTest, MergeAddFromOlderSyncData) {
EXPECT_TRUE(model()->GetTemplateURLForGUID("key1"));
// Check changes for the UPDATE.
ASSERT_TRUE(processor()->contains_guid("key1"));
- csync::SyncChange key1_change = processor()->change_for_guid("key1");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, key1_change.change_type());
+ syncer::SyncChange key1_change = processor()->change_for_guid("key1");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, key1_change.change_type());
EXPECT_FALSE(model()->GetTemplateURLForGUID("aaa"));
// The key2 keyword conflict results in the local copy winning, so ensure it
@@ -907,8 +910,8 @@ TEST_F(TemplateURLServiceSyncTest, MergeAddFromOlderSyncData) {
EXPECT_TRUE(model()->GetTemplateURLForGUID("key2"));
// Check changes for the UPDATE.
ASSERT_TRUE(processor()->contains_guid("key2"));
- csync::SyncChange key2_change = processor()->change_for_guid("key2");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, key2_change.change_type());
+ syncer::SyncChange key2_change = processor()->change_for_guid("key2");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, key2_change.change_type());
EXPECT_EQ("key2.com", GetKeyword(key2_change.sync_data()));
// The last TemplateURL should have had no conflicts and was just added. It
@@ -920,10 +923,10 @@ TEST_F(TemplateURLServiceSyncTest, MergeAddFromOlderSyncData) {
EXPECT_EQ(4U, processor()->change_list_size());
// Two ADDs should be pushed up to Sync.
ASSERT_TRUE(processor()->contains_guid("bbb"));
- EXPECT_EQ(csync::SyncChange::ACTION_ADD,
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD,
processor()->change_for_guid("bbb").change_type());
ASSERT_TRUE(processor()->contains_guid("ccc"));
- EXPECT_EQ(csync::SyncChange::ACTION_ADD,
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD,
processor()->change_for_guid("ccc").change_type());
}
@@ -971,26 +974,26 @@ TEST_F(TemplateURLServiceSyncTest, MergeAddFromNewerSyncData) {
EXPECT_EQ(2U, processor()->change_list_size());
// Two ADDs should be pushed up to Sync.
ASSERT_TRUE(processor()->contains_guid("bbb"));
- EXPECT_EQ(csync::SyncChange::ACTION_ADD,
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD,
processor()->change_for_guid("bbb").change_type());
ASSERT_TRUE(processor()->contains_guid("ccc"));
- EXPECT_EQ(csync::SyncChange::ACTION_ADD,
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD,
processor()->change_for_guid("ccc").change_type());
}
TEST_F(TemplateURLServiceSyncTest, ProcessChangesEmptyModel) {
// We initially have no data.
model()->MergeDataAndStartSyncing(
- syncable::SEARCH_ENGINES, csync::SyncDataList(),
+ syncable::SEARCH_ENGINES, syncer::SyncDataList(),
PassProcessor(), CreateAndPassSyncErrorFactory());
// Set up a bunch of ADDs.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("key1"), "http://key1.com", "key1")));
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("key2"), "http://key2.com", "key2")));
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("key3"), "http://key3.com", "key3")));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -1008,13 +1011,13 @@ TEST_F(TemplateURLServiceSyncTest, ProcessChangesNoConflicts) {
CreateAndPassSyncErrorFactory());
// Process different types of changes, without conflicts.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("key4"), "http://key4.com", "key4")));
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("newkeyword"), "http://new.com",
"key2")));
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_DELETE,
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_DELETE,
CreateTestTemplateURL(ASCIIToUTF16("key3"), "http://key3.com", "key3")));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -1039,10 +1042,10 @@ TEST_F(TemplateURLServiceSyncTest, ProcessChangesWithConflictsSyncWins) {
// Process different types of changes, with conflicts. Note that all this data
// has a newer timestamp, so Sync will win in these scenarios.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("key2"), "http://new.com", "aaa")));
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("key3"), "http://key3.com", "key1")));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -1054,10 +1057,10 @@ TEST_F(TemplateURLServiceSyncTest, ProcessChangesWithConflictsSyncWins) {
// too.
EXPECT_EQ(2U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("key2"));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE,
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE,
processor()->change_for_guid("key2").change_type());
ASSERT_TRUE(processor()->contains_guid("key3"));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE,
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE,
processor()->change_for_guid("key3").change_type());
// aaa conflicts with key2 and wins, forcing key2's keyword to update.
@@ -1083,11 +1086,11 @@ TEST_F(TemplateURLServiceSyncTest, ProcessChangesWithConflictsLocalWins) {
// Process different types of changes, with conflicts. Note that all this data
// has an older timestamp, so the local data will win in these scenarios.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("key2"), "http://new.com", "aaa",
10)));
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("key3"), "http://key3.com", "key1",
10)));
@@ -1115,10 +1118,10 @@ TEST_F(TemplateURLServiceSyncTest, ProcessChangesWithConflictsLocalWins) {
model()->GetTemplateURLForKeyword(ASCIIToUTF16("key3")));
ASSERT_TRUE(processor()->contains_guid("aaa"));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE,
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE,
processor()->change_for_guid("aaa").change_type());
ASSERT_TRUE(processor()->contains_guid("key1"));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE,
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE,
processor()->change_for_guid("key1").change_type());
}
@@ -1126,7 +1129,7 @@ TEST_F(TemplateURLServiceSyncTest, RemoveUpdatedURLOnConflict) {
// Updating a local replaceable URL to have the same keyword as a local
// non-replaceable URL should result in the former being removed from the
// model entirely.
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(ASCIIToUTF16("sync"),
"http://sync.com", "sync", 100, true));
initial_data.push_back(
@@ -1138,8 +1141,8 @@ TEST_F(TemplateURLServiceSyncTest, RemoveUpdatedURLOnConflict) {
CreateTestTemplateURL(ASCIIToUTF16("local"), "http://local.com", "local");
model()->Add(new_turl);
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("local"), "http://sync.com", "sync",
110, true)));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -1149,7 +1152,7 @@ TEST_F(TemplateURLServiceSyncTest, RemoveUpdatedURLOnConflict) {
model()->GetTemplateURLForKeyword(ASCIIToUTF16("local"))->sync_guid());
EXPECT_EQ(1U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("sync"));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE,
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE,
processor()->change_for_guid("sync").change_type());
}
@@ -1166,8 +1169,8 @@ TEST_F(TemplateURLServiceSyncTest, ProcessTemplateURLChange) {
model()->Add(new_turl);
EXPECT_EQ(1U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("new"));
- csync::SyncChange change = processor()->change_for_guid("new");
- EXPECT_EQ(csync::SyncChange::ACTION_ADD, change.change_type());
+ syncer::SyncChange change = processor()->change_for_guid("new");
+ EXPECT_EQ(syncer::SyncChange::ACTION_ADD, change.change_type());
EXPECT_EQ("baidu", GetKeyword(change.sync_data()));
EXPECT_EQ("http://baidu.cn", GetURL(change.sync_data()));
@@ -1178,7 +1181,7 @@ TEST_F(TemplateURLServiceSyncTest, ProcessTemplateURLChange) {
EXPECT_EQ(1U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("key1"));
change = processor()->change_for_guid("key1");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_EQ("k", GetKeyword(change.sync_data()));
// Remove an existing search engine.
@@ -1187,7 +1190,7 @@ TEST_F(TemplateURLServiceSyncTest, ProcessTemplateURLChange) {
EXPECT_EQ(1U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("key2"));
change = processor()->change_for_guid("key2");
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, change.change_type());
}
TEST_F(TemplateURLServiceSyncTest, ProcessChangesWithLocalExtensions) {
@@ -1205,11 +1208,11 @@ TEST_F(TemplateURLServiceSyncTest, ProcessChangesWithLocalExtensions) {
EXPECT_EQ(0U, processor()->change_list_size());
// Create some sync changes that will conflict with the extension keywords.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("keyword1"), "http://aaa.com",
std::string(), 100, true)));
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("keyword2"), "http://bbb.com")));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -1236,7 +1239,7 @@ TEST_F(TemplateURLServiceSyncTest, ProcessChangesWithLocalExtensions) {
TEST_F(TemplateURLServiceSyncTest, AutogeneratedKeywordMigrated) {
// Create a couple of sync entries with autogenerated keywords.
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
scoped_ptr<TemplateURL> turl(
CreateTestTemplateURL(ASCIIToUTF16("key1"), "http://key1.com", "key1"));
initial_data.push_back(
@@ -1264,12 +1267,12 @@ TEST_F(TemplateURLServiceSyncTest, AutogeneratedKeywordMigrated) {
// We should also have gotten some corresponding UPDATEs pushed upstream.
EXPECT_GE(processor()->change_list_size(), 2U);
ASSERT_TRUE(processor()->contains_guid("key1"));
- csync::SyncChange key1_change = processor()->change_for_guid("key1");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, key1_change.change_type());
+ syncer::SyncChange key1_change = processor()->change_for_guid("key1");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, key1_change.change_type());
EXPECT_EQ("key1.com", GetKeyword(key1_change.sync_data()));
ASSERT_TRUE(processor()->contains_guid("key2"));
- csync::SyncChange key2_change = processor()->change_for_guid("key2");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, key2_change.change_type());
+ syncer::SyncChange key2_change = processor()->change_for_guid("key2");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, key2_change.change_type());
EXPECT_EQ(google_keyword, UTF8ToUTF16(GetKeyword(key2_change.sync_data())));
}
@@ -1284,7 +1287,7 @@ TEST_F(TemplateURLServiceSyncTest, AutogeneratedKeywordConflicts) {
TemplateURL* other =
CreateTestTemplateURL(ASCIIToUTF16("other.com"), "http://other.com/foo");
model()->Add(other);
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(ASCIIToUTF16("sync1"),
"{google:baseURL}2/search?q={searchTerms}", "sync1", 50));
initial_data.push_back(
@@ -1309,13 +1312,13 @@ TEST_F(TemplateURLServiceSyncTest, AutogeneratedKeywordConflicts) {
// keywords to be generated (and sync1 needed conflict resolution as well).
EXPECT_GE(processor()->change_list_size(), 2U);
ASSERT_TRUE(processor()->contains_guid("sync1"));
- csync::SyncChange sync1_change = processor()->change_for_guid("sync1");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, sync1_change.change_type());
+ syncer::SyncChange sync1_change = processor()->change_for_guid("sync1");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, sync1_change.change_type());
EXPECT_EQ(google_keyword + ASCIIToUTF16("_"),
UTF8ToUTF16(GetKeyword(sync1_change.sync_data())));
ASSERT_TRUE(processor()->contains_guid("sync2"));
- csync::SyncChange sync2_change = processor()->change_for_guid("sync2");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, sync2_change.change_type());
+ syncer::SyncChange sync2_change = processor()->change_for_guid("sync2");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, sync2_change.change_type());
EXPECT_EQ("other.com", GetKeyword(sync2_change.sync_data()));
}
@@ -1323,7 +1326,7 @@ TEST_F(TemplateURLServiceSyncTest, TwoAutogeneratedKeywordsUsingGoogleBaseURL) {
// Sync brings in two autogenerated keywords and both use Google base URLs.
// We make the first older so that it will get renamed once before the second
// and then again once after (when we resolve conflicts for the second).
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(ASCIIToUTF16("key1"),
"{google:baseURL}1/search?q={searchTerms}", "key1", 50));
initial_data.push_back(
@@ -1347,20 +1350,20 @@ TEST_F(TemplateURLServiceSyncTest, TwoAutogeneratedKeywordsUsingGoogleBaseURL) {
EXPECT_EQ("key2", keyword2->sync_guid());
EXPECT_GE(processor()->change_list_size(), 2U);
ASSERT_TRUE(processor()->contains_guid("key1"));
- csync::SyncChange key1_change = processor()->change_for_guid("key1");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, key1_change.change_type());
+ syncer::SyncChange key1_change = processor()->change_for_guid("key1");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, key1_change.change_type());
EXPECT_EQ(keyword1->keyword(),
UTF8ToUTF16(GetKeyword(key1_change.sync_data())));
ASSERT_TRUE(processor()->contains_guid("key2"));
- csync::SyncChange key2_change = processor()->change_for_guid("key2");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, key2_change.change_type());
+ syncer::SyncChange key2_change = processor()->change_for_guid("key2");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, key2_change.change_type());
EXPECT_EQ(keyword2->keyword(),
UTF8ToUTF16(GetKeyword(key2_change.sync_data())));
}
TEST_F(TemplateURLServiceSyncTest, DuplicateEncodingsRemoved) {
// Create a sync entry with duplicate encodings.
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
TemplateURLData data;
data.short_name = ASCIIToUTF16("test");
@@ -1394,8 +1397,8 @@ TEST_F(TemplateURLServiceSyncTest, DuplicateEncodingsRemoved) {
// We should also have gotten a corresponding UPDATE pushed upstream.
EXPECT_GE(processor()->change_list_size(), 1U);
ASSERT_TRUE(processor()->contains_guid("keyword"));
- csync::SyncChange keyword_change = processor()->change_for_guid("keyword");
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, keyword_change.change_type());
+ syncer::SyncChange keyword_change = processor()->change_for_guid("keyword");
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, keyword_change.change_type());
EXPECT_EQ("UTF-8;UTF-16;Big5;Windows-1252", keyword_change.sync_data().
GetSpecifics().search_engine().input_encodings());
}
@@ -1412,7 +1415,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeTwoClientsBasic) {
new SyncChangeProcessorDelegate(model_b()));
model_a()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES,
model_b()->GetAllSyncData(syncable::SEARCH_ENGINES),
- delegate_b.PassAs<csync::SyncChangeProcessor>(),
+ delegate_b.PassAs<syncer::SyncChangeProcessor>(),
CreateAndPassSyncErrorFactory());
// They should be consistent.
@@ -1441,7 +1444,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeTwoClientsDupesAndConflicts) {
new SyncChangeProcessorDelegate(model_b()));
model_a()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES,
model_b()->GetAllSyncData(syncable::SEARCH_ENGINES),
- delegate_b.PassAs<csync::SyncChangeProcessor>(),
+ delegate_b.PassAs<syncer::SyncChangeProcessor>(),
CreateAndPassSyncErrorFactory());
// They should be consistent.
@@ -1450,15 +1453,15 @@ TEST_F(TemplateURLServiceSyncTest, MergeTwoClientsDupesAndConflicts) {
}
TEST_F(TemplateURLServiceSyncTest, StopSyncing) {
- csync::SyncError error =
+ syncer::SyncError error =
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES,
CreateInitialSyncData(), PassProcessor(),
CreateAndPassSyncErrorFactory());
ASSERT_FALSE(error.IsSet());
model()->StopSyncing(syncable::SEARCH_ENGINES);
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("newkeyword"), "http://new.com",
"key2")));
error = model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -1471,7 +1474,7 @@ TEST_F(TemplateURLServiceSyncTest, StopSyncing) {
TEST_F(TemplateURLServiceSyncTest, SyncErrorOnInitialSync) {
processor()->set_erroneous(true);
- csync::SyncError error =
+ syncer::SyncError error =
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES,
CreateInitialSyncData(), PassProcessor(),
CreateAndPassSyncErrorFactory());
@@ -1480,8 +1483,8 @@ TEST_F(TemplateURLServiceSyncTest, SyncErrorOnInitialSync) {
// Ensure that if the initial merge was erroneous, then subsequence attempts
// to push data into the local model are rejected, since the model was never
// successfully associated with Sync in the first place.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("newkeyword"), "http://new.com",
"key2")));
processor()->set_erroneous(false);
@@ -1496,14 +1499,14 @@ TEST_F(TemplateURLServiceSyncTest, SyncErrorOnInitialSync) {
TEST_F(TemplateURLServiceSyncTest, SyncErrorOnLaterSync) {
// Ensure that if the SyncProcessor succeeds in the initial merge, but fails
// in future ProcessSyncChanges, we still return an error.
- csync::SyncError error =
+ syncer::SyncError error =
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES,
CreateInitialSyncData(), PassProcessor(),
CreateAndPassSyncErrorFactory());
ASSERT_FALSE(error.IsSet());
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("newkeyword"), "http://new.com",
"key2")));
processor()->set_erroneous(true);
@@ -1514,13 +1517,13 @@ TEST_F(TemplateURLServiceSyncTest, SyncErrorOnLaterSync) {
TEST_F(TemplateURLServiceSyncTest, MergeTwiceWithSameSyncData) {
// Ensure that a second merge with the same data as the first does not
// actually update the local data.
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
initial_data.push_back(CreateInitialSyncData()[0]);
model()->Add(CreateTestTemplateURL(ASCIIToUTF16("key1"), "http://key1.com",
"key1", 10)); // earlier
- csync::SyncError error =
+ syncer::SyncError error =
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES,
initial_data, PassProcessor(), CreateAndPassSyncErrorFactory());
ASSERT_FALSE(error.IsSet());
@@ -1559,7 +1562,7 @@ TEST_F(TemplateURLServiceSyncTest, MergeTwiceWithSameSyncData) {
}
TEST_F(TemplateURLServiceSyncTest, SyncedDefaultGUIDArrivesFirst) {
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
// The default search provider should support replacement.
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(ASCIIToUTF16("key2"),
"http://key2.com/{searchTerms}", "key2", 90));
@@ -1581,8 +1584,8 @@ TEST_F(TemplateURLServiceSyncTest, SyncedDefaultGUIDArrivesFirst) {
// Bring in a random new search engine with a different GUID. Ensure that
// it doesn't change the default.
- csync::SyncChangeList changes1;
- changes1.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes1;
+ changes1.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("random"), "http://random.com",
"random")));
model()->ProcessSyncChanges(FROM_HERE, changes1);
@@ -1592,8 +1595,8 @@ TEST_F(TemplateURLServiceSyncTest, SyncedDefaultGUIDArrivesFirst) {
// Finally, bring in the expected entry with the right GUID. Ensure that
// the default has changed to the new search engine.
- csync::SyncChangeList changes2;
- changes2.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes2;
+ changes2.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("new"), "http://new.com/{searchTerms}",
"newdefault")));
model()->ProcessSyncChanges(FROM_HERE, changes2);
@@ -1604,7 +1607,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncedDefaultGUIDArrivesFirst) {
}
TEST_F(TemplateURLServiceSyncTest, DefaultGuidDeletedAndReplaced) {
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
// The default search provider should support replacement.
scoped_ptr<TemplateURL> turl1(CreateTestTemplateURL(ASCIIToUTF16("key1"),
"http://key1.com/{searchTerms}", "key1", 90));
@@ -1638,8 +1641,8 @@ TEST_F(TemplateURLServiceSyncTest, DefaultGuidDeletedAndReplaced) {
// Delete the old default. This will change the default to the next available
// (turl2), but should not affect the synced preference.
- csync::SyncChangeList changes1;
- changes1.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChangeList changes1;
+ changes1.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_DELETE,
turl1.release()));
model()->ProcessSyncChanges(FROM_HERE, changes1);
@@ -1659,8 +1662,8 @@ TEST_F(TemplateURLServiceSyncTest, DefaultGuidDeletedAndReplaced) {
// Finally, bring in the expected entry with the right GUID. Ensure that
// the default has changed to the new search engine.
- csync::SyncChangeList changes2;
- changes2.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes2;
+ changes2.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("new"), "http://new.com/{searchTerms}",
"newdefault")));
model()->ProcessSyncChanges(FROM_HERE, changes2);
@@ -1693,7 +1696,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncedDefaultArrivesAfterStartup) {
// Now sync the initial data, which will include the search engine entry
// destined to become the new default.
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
// The default search provider should support replacement.
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(ASCIIToUTF16("key2"),
"http://key2.com/{searchTerms}", "key2", 90));
@@ -1727,7 +1730,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncedDefaultAlreadySetOnStartup) {
EXPECT_EQ(default_search, model()->GetDefaultSearchProvider());
// Now sync the initial data.
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES, initial_data,
PassProcessor(), CreateAndPassSyncErrorFactory());
@@ -1739,7 +1742,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncedDefaultAlreadySetOnStartup) {
TEST_F(TemplateURLServiceSyncTest, SyncWithManagedDefaultSearch) {
// First start off with a few entries and make sure we can set an unmanaged
// default search provider.
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
model()->MergeDataAndStartSyncing(syncable::SEARCH_ENGINES, initial_data,
PassProcessor(), CreateAndPassSyncErrorFactory());
model()->SetDefaultSearchProvider(model()->GetTemplateURLForGUID("key2"));
@@ -1761,8 +1764,8 @@ TEST_F(TemplateURLServiceSyncTest, SyncWithManagedDefaultSearch) {
// Add a new entry from Sync. It should still sync in despite the default
// being managed.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_ADD,
CreateTestTemplateURL(ASCIIToUTF16("newkeyword"),
"http://new.com/{searchTerms}",
"newdefault")));
@@ -1796,7 +1799,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncMergeDeletesDefault) {
model()->Add(default_turl);
model()->SetDefaultSearchProvider(default_turl);
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
// The key1 entry should be a duplicate of the default.
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(ASCIIToUTF16("key1"),
"http://key1.com/{searchTerms}", "key1", 90));
@@ -1819,7 +1822,7 @@ TEST_F(TemplateURLServiceSyncTest, LocalDefaultWinsConflict) {
model()->Add(default_turl);
model()->SetDefaultSearchProvider(default_turl);
- csync::SyncDataList initial_data = CreateInitialSyncData();
+ syncer::SyncDataList initial_data = CreateInitialSyncData();
// The key1 entry should be different from the default but conflict in the
// keyword.
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(keyword,
@@ -1843,7 +1846,7 @@ TEST_F(TemplateURLServiceSyncTest, LocalDefaultWinsConflict) {
TEST_F(TemplateURLServiceSyncTest, DeleteBogusData) {
// Create a couple of bogus entries to sync.
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
scoped_ptr<TemplateURL> turl(
CreateTestTemplateURL(ASCIIToUTF16("key1"), "http://key1.com", "key1"));
initial_data.push_back(
@@ -1861,10 +1864,10 @@ TEST_F(TemplateURLServiceSyncTest, DeleteBogusData) {
EXPECT_EQ(0U, model()->GetTemplateURLs().size());
EXPECT_EQ(2U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("key1"));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE,
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE,
processor()->change_for_guid("key1").change_type());
ASSERT_TRUE(processor()->contains_guid(std::string()));
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE,
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE,
processor()->change_for_guid(std::string()).change_type());
}
@@ -1881,10 +1884,10 @@ TEST_F(TemplateURLServiceSyncTest, PreSyncDeletes) {
// We expect the model to have GUIDs {bbb, key3} after our initial merge.
EXPECT_TRUE(model()->GetTemplateURLForGUID("bbb"));
EXPECT_TRUE(model()->GetTemplateURLForGUID("key3"));
- csync::SyncChange change = processor()->change_for_guid("key1");
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, change.change_type());
+ syncer::SyncChange change = processor()->change_for_guid("key1");
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, change.change_type());
change = processor()->change_for_guid("key2");
- EXPECT_EQ(csync::SyncChange::ACTION_DELETE, change.change_type());
+ EXPECT_EQ(syncer::SyncChange::ACTION_DELETE, change.change_type());
// "aaa" should have been pruned out on account of not being from Sync.
EXPECT_FALSE(processor()->contains_guid("aaa"));
// The set of pre-sync deletes should be cleared so they're not reused if
@@ -1932,7 +1935,7 @@ TEST_F(TemplateURLServiceSyncTest, PreSyncUpdates) {
// including the old timestamp and the same GUID. Ensure that it loses
// conflict resolution against the local value, and an update is sent to the
// server. The new timestamp should be preserved.
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
data_copy.SetKeyword(original_keyword);
data_copy.sync_guid = sync_guid;
scoped_ptr<TemplateURL> sync_turl(
@@ -1946,8 +1949,8 @@ TEST_F(TemplateURLServiceSyncTest, PreSyncUpdates) {
ASSERT_EQ(added_turl, model()->GetTemplateURLForKeyword(
ASCIIToUTF16(kNewKeyword)));
EXPECT_EQ(new_timestamp, added_turl->last_modified());
- csync::SyncChange change = processor()->change_for_guid(sync_guid);
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ syncer::SyncChange change = processor()->change_for_guid(sync_guid);
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_EQ(kNewKeyword,
change.sync_data().GetSpecifics().search_engine().keyword());
EXPECT_EQ(new_timestamp, base::Time::FromInternalValue(
@@ -1958,7 +1961,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncBaseURLs) {
// Verify that bringing in a remote TemplateURL that uses Google base URLs
// causes it to get a local keyword that matches the local base URL.
test_util_a_.SetGoogleBaseURL(GURL("http://google.com/"));
- csync::SyncDataList initial_data;
+ syncer::SyncDataList initial_data;
scoped_ptr<TemplateURL> turl(CreateTestTemplateURL(
ASCIIToUTF16("google.co.uk"), "{google:baseURL}search?q={searchTerms}",
"guid"));
@@ -1972,8 +1975,8 @@ TEST_F(TemplateURLServiceSyncTest, SyncBaseURLs) {
EXPECT_EQ(0U, processor()->change_list_size());
// Remote updates to this URL's keyword should be silently ignored.
- csync::SyncChangeList changes;
- changes.push_back(CreateTestSyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChangeList changes;
+ changes.push_back(CreateTestSyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateTestTemplateURL(ASCIIToUTF16("google.de"),
"{google:baseURL}search?q={searchTerms}", "guid")));
model()->ProcessSyncChanges(FROM_HERE, changes);
@@ -1986,7 +1989,7 @@ TEST_F(TemplateURLServiceSyncTest, SyncBaseURLs) {
EXPECT_EQ(ASCIIToUTF16("google.co.in"), synced_turl->keyword());
EXPECT_EQ(1U, processor()->change_list_size());
ASSERT_TRUE(processor()->contains_guid("guid"));
- csync::SyncChange change(processor()->change_for_guid("guid"));
- EXPECT_EQ(csync::SyncChange::ACTION_UPDATE, change.change_type());
+ syncer::SyncChange change(processor()->change_for_guid("guid"));
+ EXPECT_EQ(syncer::SyncChange::ACTION_UPDATE, change.change_type());
EXPECT_EQ("google.co.in", GetKeyword(change.sync_data()));
}
diff --git a/chrome/browser/sync/DEPS b/chrome/browser/sync/DEPS
index 9b8595e..7dba439 100644
--- a/chrome/browser/sync/DEPS
+++ b/chrome/browser/sync/DEPS
@@ -8,7 +8,7 @@ include_rules = [
"+sync/util/cryptographer.h",
# Used by tests.
"+sync/syncable",
- # Used by autofill tests, which should use csync instead.
+ # Used by autofill tests, which should use the public sync API instead.
"+sync/test/engine/test_id_factory.h",
]
diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.cc b/chrome/browser/sync/abstract_profile_sync_service_test.cc
index 98ba04c..a1eb5df 100644
--- a/chrome/browser/sync/abstract_profile_sync_service_test.cc
+++ b/chrome/browser/sync/abstract_profile_sync_service_test.cc
@@ -16,9 +16,9 @@
#include "sync/test/engine/test_id_factory.h"
#include "sync/util/cryptographer.h"
-using csync::TestIdFactory;
+using syncer::TestIdFactory;
using content::BrowserThread;
-using csync::UserShare;
+using syncer::UserShare;
using syncable::BASE_VERSION;
using syncable::CREATE;
using syncable::IS_DEL;
@@ -70,26 +70,26 @@ bool ProfileSyncServiceTestHelper::CreateRoot(ModelType model_type,
}
/* static */
-csync::ImmutableChangeRecordList
+syncer::ImmutableChangeRecordList
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
- int64 node_id, csync::ChangeRecord::Action action) {
- csync::ChangeRecord record;
+ int64 node_id, syncer::ChangeRecord::Action action) {
+ syncer::ChangeRecord record;
record.action = action;
record.id = node_id;
- csync::ChangeRecordList records(1, record);
- return csync::ImmutableChangeRecordList(&records);
+ syncer::ChangeRecordList records(1, record);
+ return syncer::ImmutableChangeRecordList(&records);
}
/* static */
-csync::ImmutableChangeRecordList
+syncer::ImmutableChangeRecordList
ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList(
int64 node_id, const sync_pb::EntitySpecifics& specifics) {
- csync::ChangeRecord record;
- record.action = csync::ChangeRecord::ACTION_DELETE;
+ syncer::ChangeRecord record;
+ record.action = syncer::ChangeRecord::ACTION_DELETE;
record.id = node_id;
record.specifics = specifics;
- csync::ChangeRecordList records(1, record);
- return csync::ImmutableChangeRecordList(&records);
+ syncer::ChangeRecordList records(1, record);
+ return syncer::ImmutableChangeRecordList(&records);
}
AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest()
diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.h b/chrome/browser/sync/abstract_profile_sync_service_test.h
index ec50539..781c8bf 100644
--- a/chrome/browser/sync/abstract_profile_sync_service_test.h
+++ b/chrome/browser/sync/abstract_profile_sync_service_test.h
@@ -22,27 +22,27 @@
class ProfileSyncService;
class TestProfileSyncService;
-namespace csync {
+namespace syncer {
class TestIdFactory;
-} // namespace csync
+} // namespace syncer
-namespace csync {
+namespace syncer {
struct UserShare;
-} // namespace csync
+} // namespace syncer
class ProfileSyncServiceTestHelper {
public:
static const std::string GetTagForType(syncable::ModelType model_type);
static bool CreateRoot(syncable::ModelType model_type,
- csync::UserShare* service,
- csync::TestIdFactory* ids);
+ syncer::UserShare* service,
+ syncer::TestIdFactory* ids);
- static csync::ImmutableChangeRecordList MakeSingletonChangeRecordList(
- int64 node_id, csync::ChangeRecord::Action action);
+ static syncer::ImmutableChangeRecordList MakeSingletonChangeRecordList(
+ int64 node_id, syncer::ChangeRecord::Action action);
// Deletions must provide an EntitySpecifics for the deleted data.
- static csync::ImmutableChangeRecordList
+ static syncer::ImmutableChangeRecordList
MakeSingletonDeletionChangeRecordList(
int64 node_id,
const sync_pb::EntitySpecifics& specifics);
diff --git a/chrome/browser/sync/backend_migrator.cc b/chrome/browser/sync/backend_migrator.cc
index 2460c29..e15dcbb 100644
--- a/chrome/browser/sync/backend_migrator.cc
+++ b/chrome/browser/sync/backend_migrator.cc
@@ -25,7 +25,7 @@ using syncable::ModelTypeToString;
MigrationObserver::~MigrationObserver() {}
BackendMigrator::BackendMigrator(const std::string& name,
- csync::UserShare* user_share,
+ syncer::UserShare* user_share,
ProfileSyncService* service,
DataTypeManager* manager,
const base::Closure &migration_done_callback)
@@ -112,10 +112,10 @@ void BackendMigrator::RestartMigration() {
// Add nigori for config or not based upon if the server told us to migrate
// nigori or not.
if (configure_with_nigori) {
- manager_->Configure(difference, csync::CONFIGURE_REASON_MIGRATION);
+ manager_->Configure(difference, syncer::CONFIGURE_REASON_MIGRATION);
} else {
manager_->ConfigureWithoutNigori(difference,
- csync::CONFIGURE_REASON_MIGRATION);
+ syncer::CONFIGURE_REASON_MIGRATION);
}
}
@@ -135,8 +135,8 @@ void BackendMigrator::OnConfigureDone(
namespace {
-syncable::ModelTypeSet GetUnsyncedDataTypes(csync::UserShare* user_share) {
- csync::ReadTransaction trans(FROM_HERE, user_share);
+syncable::ModelTypeSet GetUnsyncedDataTypes(syncer::UserShare* user_share) {
+ syncer::ReadTransaction trans(FROM_HERE, user_share);
syncable::ModelTypeSet unsynced_data_types;
for (int i = syncable::FIRST_REAL_MODEL_TYPE;
i < syncable::MODEL_TYPE_COUNT; ++i) {
@@ -208,7 +208,7 @@ void BackendMigrator::OnConfigureDoneImpl(
const ModelTypeSet full_set = service_->GetPreferredDataTypes();
SDVLOG(1) << "BackendMigrator re-enabling types: "
<< syncable::ModelTypeSetToString(full_set);
- manager_->Configure(full_set, csync::CONFIGURE_REASON_MIGRATION);
+ manager_->Configure(full_set, syncer::CONFIGURE_REASON_MIGRATION);
} else if (state_ == REENABLING_TYPES) {
// We're done!
ChangeState(IDLE);
diff --git a/chrome/browser/sync/backend_migrator.h b/chrome/browser/sync/backend_migrator.h
index 8e87d4b..cdc74f3 100644
--- a/chrome/browser/sync/backend_migrator.h
+++ b/chrome/browser/sync/backend_migrator.h
@@ -15,9 +15,9 @@
class ProfileSyncService;
-namespace csync {
+namespace syncer {
struct UserShare;
-} // namespace csync
+} // namespace syncer
namespace browser_sync {
@@ -48,7 +48,7 @@ class BackendMigrator {
// TODO(akalin): Remove the dependency on |user_share|.
BackendMigrator(const std::string& name,
- csync::UserShare* user_share,
+ syncer::UserShare* user_share,
ProfileSyncService* service,
DataTypeManager* manager,
const base::Closure &migration_done_callback);
@@ -86,7 +86,7 @@ class BackendMigrator {
void OnConfigureDoneImpl(const DataTypeManager::ConfigureResult& result);
const std::string name_;
- csync::UserShare* user_share_;
+ syncer::UserShare* user_share_;
ProfileSyncService* service_;
DataTypeManager* manager_;
diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc
index 98d48c1..64ae64b 100644
--- a/chrome/browser/sync/backend_migrator_unittest.cc
+++ b/chrome/browser/sync/backend_migrator_unittest.cc
@@ -25,7 +25,7 @@ using ::testing::Return;
namespace browser_sync {
-using csync::sessions::SyncSessionSnapshot;
+using syncer::sessions::SyncSessionSnapshot;
class SyncBackendMigratorTest : public testing::Test {
public:
@@ -58,7 +58,7 @@ class SyncBackendMigratorTest : public testing::Test {
// Marks all types in |unsynced_types| as unsynced and all other
// types as synced.
void SetUnsyncedTypes(syncable::ModelTypeSet unsynced_types) {
- csync::WriteTransaction trans(FROM_HERE,
+ syncer::WriteTransaction trans(FROM_HERE,
test_user_share_.user_share());
for (int i = syncable::FIRST_REAL_MODEL_TYPE;
i < syncable::MODEL_TYPE_COUNT; ++i) {
@@ -77,7 +77,7 @@ class SyncBackendMigratorTest : public testing::Test {
DataTypeManager::ConfigureResult result(status, requested_types);
migrator_->OnConfigureDone(result);
} else {
- std::list<csync::SyncError> errors;
+ std::list<syncer::SyncError> errors;
DataTypeManager::ConfigureResult result(
status,
requested_types,
@@ -105,7 +105,7 @@ class SyncBackendMigratorTest : public testing::Test {
syncable::ModelTypeSet preferred_types_;
NiceMock<ProfileSyncServiceMock> service_;
NiceMock<DataTypeManagerMock> manager_;
- csync::TestUserShare test_user_share_;
+ syncer::TestUserShare test_user_share_;
scoped_ptr<BackendMigrator> migrator_;
};
@@ -130,7 +130,7 @@ TEST_F(SyncBackendMigratorTest, Sanity) {
EXPECT_CALL(*manager(), state())
.WillOnce(Return(DataTypeManager::CONFIGURED));
- EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION))
+ EXPECT_CALL(*manager(), Configure(_, syncer::CONFIGURE_REASON_MIGRATION))
.Times(2);
migrator()->MigrateTypes(to_migrate);
@@ -159,7 +159,7 @@ TEST_F(SyncBackendMigratorTest, MigrateNigori) {
.WillOnce(Return(DataTypeManager::CONFIGURED));
EXPECT_CALL(*manager(), ConfigureWithoutNigori(_,
- csync::CONFIGURE_REASON_MIGRATION));
+ syncer::CONFIGURE_REASON_MIGRATION));
migrator()->MigrateTypes(to_migrate);
EXPECT_EQ(BackendMigrator::DISABLING_TYPES, migrator()->state());
@@ -189,7 +189,7 @@ TEST_F(SyncBackendMigratorTest, WaitToStart) {
Mock::VerifyAndClearExpectations(manager());
EXPECT_CALL(*manager(), state())
.WillOnce(Return(DataTypeManager::CONFIGURED));
- EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION));
+ EXPECT_CALL(*manager(), Configure(_, syncer::CONFIGURE_REASON_MIGRATION));
SetUnsyncedTypes(syncable::ModelTypeSet());
SendConfigureDone(DataTypeManager::OK, syncable::ModelTypeSet());
@@ -208,7 +208,7 @@ TEST_F(SyncBackendMigratorTest, RestartMigration) {
EXPECT_CALL(*manager(), state())
.WillOnce(Return(DataTypeManager::CONFIGURED));
- EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION))
+ EXPECT_CALL(*manager(), Configure(_, syncer::CONFIGURE_REASON_MIGRATION))
.Times(2);
migrator()->MigrateTypes(to_migrate1);
@@ -219,7 +219,7 @@ TEST_F(SyncBackendMigratorTest, RestartMigration) {
Difference(preferred_types(), to_migrate1);
Mock::VerifyAndClearExpectations(manager());
- EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION))
+ EXPECT_CALL(*manager(), Configure(_, syncer::CONFIGURE_REASON_MIGRATION))
.Times(2);
SetUnsyncedTypes(to_migrate1);
SendConfigureDone(DataTypeManager::OK, difference1);
@@ -242,13 +242,13 @@ TEST_F(SyncBackendMigratorTest, InterruptedWhileDisablingTypes) {
EXPECT_CALL(*manager(), state())
.WillOnce(Return(DataTypeManager::CONFIGURED));
EXPECT_CALL(*manager(), Configure(HasModelTypes(difference),
- csync::CONFIGURE_REASON_MIGRATION));
+ syncer::CONFIGURE_REASON_MIGRATION));
migrator()->MigrateTypes(to_migrate);
EXPECT_EQ(BackendMigrator::DISABLING_TYPES, migrator()->state());
Mock::VerifyAndClearExpectations(manager());
EXPECT_CALL(*manager(), Configure(HasModelTypes(difference),
- csync::CONFIGURE_REASON_MIGRATION));
+ syncer::CONFIGURE_REASON_MIGRATION));
SetUnsyncedTypes(syncable::ModelTypeSet());
SendConfigureDone(DataTypeManager::OK, preferred_types());
@@ -266,7 +266,7 @@ TEST_F(SyncBackendMigratorTest, WaitingForPurge) {
EXPECT_CALL(*manager(), state())
.WillOnce(Return(DataTypeManager::CONFIGURED));
- EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION))
+ EXPECT_CALL(*manager(), Configure(_, syncer::CONFIGURE_REASON_MIGRATION))
.Times(2);
migrator()->MigrateTypes(to_migrate);
@@ -292,7 +292,7 @@ TEST_F(SyncBackendMigratorTest, MigratedTypeDisabledByUserDuringMigration) {
EXPECT_CALL(*manager(), state())
.WillOnce(Return(DataTypeManager::CONFIGURED));
- EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION))
+ EXPECT_CALL(*manager(), Configure(_, syncer::CONFIGURE_REASON_MIGRATION))
.Times(2);
migrator()->MigrateTypes(to_migrate);
@@ -311,7 +311,7 @@ TEST_F(SyncBackendMigratorTest, ConfigureFailure) {
EXPECT_CALL(*manager(), state())
.WillOnce(Return(DataTypeManager::CONFIGURED));
- EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION))
+ EXPECT_CALL(*manager(), Configure(_, syncer::CONFIGURE_REASON_MIGRATION))
.Times(1);
migrator()->MigrateTypes(to_migrate);
SetUnsyncedTypes(syncable::ModelTypeSet());
diff --git a/chrome/browser/sync/backend_unrecoverable_error_handler.cc b/chrome/browser/sync/backend_unrecoverable_error_handler.cc
index 2a683e0..4e9f321 100644
--- a/chrome/browser/sync/backend_unrecoverable_error_handler.cc
+++ b/chrome/browser/sync/backend_unrecoverable_error_handler.cc
@@ -12,7 +12,7 @@ using content::BrowserThread;
namespace browser_sync {
BackendUnrecoverableErrorHandler::BackendUnrecoverableErrorHandler(
- const csync::WeakHandle<ProfileSyncService>& service) : service_(service) {
+ const syncer::WeakHandle<ProfileSyncService>& service) : service_(service) {
}
BackendUnrecoverableErrorHandler::~BackendUnrecoverableErrorHandler() {
diff --git a/chrome/browser/sync/backend_unrecoverable_error_handler.h b/chrome/browser/sync/backend_unrecoverable_error_handler.h
index c352c05..91f5bbe 100644
--- a/chrome/browser/sync/backend_unrecoverable_error_handler.h
+++ b/chrome/browser/sync/backend_unrecoverable_error_handler.h
@@ -18,16 +18,16 @@ class ProfileSyncService;
namespace browser_sync {
class BackendUnrecoverableErrorHandler
- : public csync::UnrecoverableErrorHandler {
+ : public syncer::UnrecoverableErrorHandler {
public:
BackendUnrecoverableErrorHandler(
- const csync::WeakHandle<ProfileSyncService>& service);
+ const syncer::WeakHandle<ProfileSyncService>& service);
virtual ~BackendUnrecoverableErrorHandler();
virtual void OnUnrecoverableError(const tracked_objects::Location& from_here,
const std::string& message) OVERRIDE;
private:
- csync::WeakHandle<ProfileSyncService> service_;
+ syncer::WeakHandle<ProfileSyncService> service_;
};
} // namespace browser_sync
#endif // CHROME_BROWSER_SYNC_BACKEND_UNRECOVERABLE_ERROR_HANDLER_H_
diff --git a/chrome/browser/sync/failed_datatypes_handler.cc b/chrome/browser/sync/failed_datatypes_handler.cc
index 8432757..490140b 100644
--- a/chrome/browser/sync/failed_datatypes_handler.cc
+++ b/chrome/browser/sync/failed_datatypes_handler.cc
@@ -16,9 +16,9 @@ FailedDatatypesHandler::~FailedDatatypesHandler() {
}
syncable::ModelTypeSet GetTypesFromErrorsList(
- const std::vector<csync::SyncError>& errors) {
+ const std::vector<syncer::SyncError>& errors) {
syncable::ModelTypeSet result;
- for (std::vector<csync::SyncError>::const_iterator it = errors.begin();
+ for (std::vector<syncer::SyncError>::const_iterator it = errors.begin();
it != errors.end(); ++it) {
DCHECK(!result.Has(it->type()));
result.Put(it->type());
@@ -33,7 +33,7 @@ syncable::ModelTypeSet FailedDatatypesHandler::GetFailedTypes() const {
}
bool FailedDatatypesHandler::UpdateFailedDatatypes(
- const std::list<csync::SyncError>& errors,
+ const std::list<syncer::SyncError>& errors,
FailureType failure_type) {
const syncable::ModelTypeSet types = GetFailedTypes();
if (failure_type == RUNTIME) {
@@ -56,8 +56,8 @@ void FailedDatatypesHandler::OnUserChoseDatatypes() {
runtime_errors_.clear();
}
-std::vector<csync::SyncError> FailedDatatypesHandler::GetAllErrors() const {
- std::vector<csync::SyncError> result;
+std::vector<syncer::SyncError> FailedDatatypesHandler::GetAllErrors() const {
+ std::vector<syncer::SyncError> result;
if (AnyFailedDatatype()) {
result.insert(result.end(), startup_errors_.begin(), startup_errors_.end());
diff --git a/chrome/browser/sync/failed_datatypes_handler.h b/chrome/browser/sync/failed_datatypes_handler.h
index bad9311..be60136 100644
--- a/chrome/browser/sync/failed_datatypes_handler.h
+++ b/chrome/browser/sync/failed_datatypes_handler.h
@@ -29,7 +29,7 @@ class FailedDatatypesHandler {
// Called with the result of sync configuration. The types with errors
// are obtained from the |result|.
bool UpdateFailedDatatypes(
- const std::list<csync::SyncError>& errors,
+ const std::list<syncer::SyncError>& errors,
FailureType failure_type);
// Called when the user has chosen a new set of datatypes to sync. We clear
@@ -37,7 +37,7 @@ class FailedDatatypesHandler {
void OnUserChoseDatatypes();
// Returns a list of all the errors this class has recorded.
- std::vector<csync::SyncError> GetAllErrors() const;
+ std::vector<syncer::SyncError> GetAllErrors() const;
// Returns the types that are failing.
syncable::ModelTypeSet GetFailedTypes() const;
@@ -47,10 +47,10 @@ class FailedDatatypesHandler {
bool AnyFailedDatatype() const;
// List of dataypes that failed at startup.
- std::vector<csync::SyncError> startup_errors_;
+ std::vector<syncer::SyncError> startup_errors_;
// List of datatypes that failed at runtime.
- std::vector<csync::SyncError> runtime_errors_;
+ std::vector<syncer::SyncError> runtime_errors_;
ProfileSyncService* service_;
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 18bbbf5..30e4ee0 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
@@ -158,7 +158,7 @@ class SyncAppNotificationDataTypeControllerTest
scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_;
ProfileSyncServiceMock service_;
scoped_ptr<FakeGenericChangeProcessor> change_processor_;
- csync::FakeSyncableService syncable_service_;
+ syncer::FakeSyncableService syncable_service_;
StartCallbackMock start_callback_;
ModelLoadCallbackMock model_load_callback_;
};
@@ -218,7 +218,7 @@ TEST_F(SyncAppNotificationDataTypeControllerTest, StartAssociationFailed) {
EXPECT_CALL(start_callback_,
Run(DataTypeController::ASSOCIATION_FAILED, _));
syncable_service_.set_merge_data_and_start_syncing_error(
- csync::SyncError(FROM_HERE, "Error", syncable::APP_NOTIFICATIONS));
+ syncer::SyncError(FROM_HERE, "Error", syncable::APP_NOTIFICATIONS));
Start();
EXPECT_EQ(DataTypeController::DISABLED, app_notif_dtc_->state());
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index 0b94dc0..6a00be6 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -31,9 +31,9 @@ syncable::ModelType AutofillDataTypeController::type() const {
return syncable::AUTOFILL;
}
-csync::ModelSafeGroup AutofillDataTypeController::model_safe_group()
+syncer::ModelSafeGroup AutofillDataTypeController::model_safe_group()
const {
- return csync::GROUP_DB;
+ return syncer::GROUP_DB;
}
void AutofillDataTypeController::Observe(
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.h b/chrome/browser/sync/glue/autofill_data_type_controller.h
index 72b889d..7f398f5 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.h
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.h
@@ -30,7 +30,7 @@ class AutofillDataTypeController : public NewNonFrontendDataTypeController,
// NewNonFrontendDataTypeController implementation.
virtual syncable::ModelType type() const OVERRIDE;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
// content::NotificationObserver implementation.
virtual void Observe(int notification_type,
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 4214637..652b6ab 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
@@ -96,13 +96,13 @@ class SyncAutofillDataTypeControllerTest : public testing::Test {
// Passed to AutofillDTC::Start().
void OnStartFinished(DataTypeController::StartResult result,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
last_start_result_ = result;
last_start_error_ = error;
}
void OnLoadFinished(syncable::ModelType type,
- csync::SyncError error) {
+ syncer::SyncError error) {
EXPECT_FALSE(error.IsSet());
EXPECT_EQ(type, syncable::AUTOFILL);
}
@@ -131,7 +131,7 @@ class SyncAutofillDataTypeControllerTest : public testing::Test {
// Stores arguments of most recent call of OnStartFinished().
DataTypeController::StartResult last_start_result_;
- csync::SyncError last_start_error_;
+ syncer::SyncError last_start_error_;
};
// Load the WDS's database, then start the Autofill DTC. It should
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 77f3df9..0cef8b4 100644
--- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
@@ -38,9 +38,9 @@ syncable::ModelType AutofillProfileDataTypeController::type() const {
return syncable::AUTOFILL_PROFILE;
}
-csync::ModelSafeGroup
+syncer::ModelSafeGroup
AutofillProfileDataTypeController::model_safe_group() const {
- return csync::GROUP_DB;
+ return syncer::GROUP_DB;
}
void AutofillProfileDataTypeController::Observe(
diff --git a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
index 73fd981..32561fe 100644
--- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
+++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
@@ -30,7 +30,7 @@ class AutofillProfileDataTypeController
// NewNonFrontendDataTypeController implementation.
virtual syncable::ModelType type() const OVERRIDE;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
// content::NotificationObserver implementation.
virtual void Observe(int type,
diff --git a/chrome/browser/sync/glue/backend_data_type_configurer.h b/chrome/browser/sync/glue/backend_data_type_configurer.h
index c0796c4..5d2ab4a 100644
--- a/chrome/browser/sync/glue/backend_data_type_configurer.h
+++ b/chrome/browser/sync/glue/backend_data_type_configurer.h
@@ -33,7 +33,7 @@ class BackendDataTypeConfigurer {
// SyncBackendHost calls ConfigureDataTypes on itself to configure
// Nigori.
virtual void ConfigureDataTypes(
- csync::ConfigureReason reason,
+ syncer::ConfigureReason reason,
syncable::ModelTypeSet types_to_add,
syncable::ModelTypeSet types_to_remove,
NigoriState nigori_state,
diff --git a/chrome/browser/sync/glue/bookmark_change_processor.cc b/chrome/browser/sync/glue/bookmark_change_processor.cc
index 60f7aa8..e459e52 100644
--- a/chrome/browser/sync/glue/bookmark_change_processor.cc
+++ b/chrome/browser/sync/glue/bookmark_change_processor.cc
@@ -58,7 +58,7 @@ void BookmarkChangeProcessor::StopImpl() {
}
void BookmarkChangeProcessor::UpdateSyncNodeProperties(
- const BookmarkNode* src, BookmarkModel* model, csync::WriteNode* dst) {
+ const BookmarkNode* src, BookmarkModel* model, syncer::WriteNode* dst) {
// Set the properties of the item.
dst->SetIsFolder(src->is_folder());
dst->SetTitle(UTF16ToWideHack(src->GetTitle()));
@@ -87,8 +87,8 @@ void BookmarkChangeProcessor::EncodeFavicon(const BookmarkNode* src,
}
void BookmarkChangeProcessor::RemoveOneSyncNode(
- csync::WriteTransaction* trans, const BookmarkNode* node) {
- csync::WriteNode sync_node(trans);
+ syncer::WriteTransaction* trans, const BookmarkNode* node) {
+ syncer::WriteNode sync_node(trans);
if (!model_associator_->InitSyncNodeFromChromeId(node->id(), &sync_node)) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
std::string());
@@ -103,7 +103,7 @@ void BookmarkChangeProcessor::RemoveOneSyncNode(
void BookmarkChangeProcessor::RemoveSyncNodeHierarchy(
const BookmarkNode* topmost) {
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
// Later logic assumes that |topmost| has been unlinked.
DCHECK(topmost->is_root());
@@ -157,7 +157,7 @@ void BookmarkChangeProcessor::BookmarkNodeAdded(BookmarkModel* model,
DCHECK(share_handle());
// Acquire a scoped write lock via a transaction.
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
CreateSyncNode(parent, model, index, &trans, model_associator_,
error_handler());
@@ -165,20 +165,20 @@ void BookmarkChangeProcessor::BookmarkNodeAdded(BookmarkModel* model,
// static
int64 BookmarkChangeProcessor::CreateSyncNode(const BookmarkNode* parent,
- BookmarkModel* model, int index, csync::WriteTransaction* trans,
+ BookmarkModel* model, int index, syncer::WriteTransaction* trans,
BookmarkModelAssociator* associator,
DataTypeErrorHandler* error_handler) {
const BookmarkNode* child = parent->GetChild(index);
DCHECK(child);
// Create a WriteNode container to hold the new node.
- csync::WriteNode sync_child(trans);
+ syncer::WriteNode sync_child(trans);
// Actually create the node with the appropriate initial position.
if (!PlaceSyncNode(CREATE, parent, index, trans, &sync_child, associator)) {
error_handler->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Sync node creation failed; recovery unlikely");
- return csync::kInvalidId;
+ return syncer::kInvalidId;
}
UpdateSyncNodeProperties(child, model, &sync_child);
@@ -209,14 +209,14 @@ void BookmarkChangeProcessor::BookmarkNodeChanged(BookmarkModel* model,
}
// Acquire a scoped write lock via a transaction.
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
// Lookup the sync node that's associated with |node|.
- csync::WriteNode sync_node(&trans);
+ syncer::WriteNode sync_node(&trans);
if (!model_associator_->InitSyncNodeFromChromeId(node->id(), &sync_node)) {
// TODO(tim): Investigating bug 121587.
if (model_associator_->GetSyncIdFromChromeId(node->id()) ==
- csync::kInvalidId) {
+ syncer::kInvalidId) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Bookmark id not found in model associator on BookmarkNodeChanged");
LOG(ERROR) << "Bad id.";
@@ -229,7 +229,7 @@ void BookmarkChangeProcessor::BookmarkNodeChanged(BookmarkModel* model,
"Could not InitByIdLookup on BookmarkNodeChanged, is_del true");
LOG(ERROR) << "Deleted entry.";
} else {
- csync::Cryptographer* crypto = trans.GetCryptographer();
+ syncer::Cryptographer* crypto = trans.GetCryptographer();
syncable::ModelTypeSet encrypted_types(crypto->GetEncryptedTypes());
const sync_pb::EntitySpecifics& specifics =
sync_node.GetEntry()->Get(syncable::SPECIFICS);
@@ -290,10 +290,10 @@ void BookmarkChangeProcessor::BookmarkNodeMoved(BookmarkModel* model,
}
// Acquire a scoped write lock via a transaction.
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
// Lookup the sync node that's associated with |child|.
- csync::WriteNode sync_node(&trans);
+ syncer::WriteNode sync_node(&trans);
if (!model_associator_->InitSyncNodeFromChromeId(child->id(), &sync_node)) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
std::string());
@@ -319,12 +319,12 @@ void BookmarkChangeProcessor::BookmarkNodeChildrenReordered(
BookmarkModel* model, const BookmarkNode* node) {
// Acquire a scoped write lock via a transaction.
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
// The given node's children got reordered. We need to reorder all the
// children of the corresponding sync node.
for (int i = 0; i < node->child_count(); ++i) {
- csync::WriteNode sync_child(&trans);
+ syncer::WriteNode sync_child(&trans);
if (!model_associator_->InitSyncNodeFromChromeId(node->GetChild(i)->id(),
&sync_child)) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
@@ -345,9 +345,9 @@ void BookmarkChangeProcessor::BookmarkNodeChildrenReordered(
// static
bool BookmarkChangeProcessor::PlaceSyncNode(MoveOrCreate operation,
- const BookmarkNode* parent, int index, csync::WriteTransaction* trans,
- csync::WriteNode* dst, BookmarkModelAssociator* associator) {
- csync::ReadNode sync_parent(trans);
+ const BookmarkNode* parent, int index, syncer::WriteTransaction* trans,
+ syncer::WriteNode* dst, BookmarkModelAssociator* associator) {
+ syncer::ReadNode sync_parent(trans);
if (!associator->InitSyncNodeFromChromeId(parent->id(), &sync_parent)) {
LOG(WARNING) << "Parent lookup failed";
return false;
@@ -362,12 +362,12 @@ bool BookmarkChangeProcessor::PlaceSyncNode(MoveOrCreate operation,
if (success) {
DCHECK_EQ(dst->GetParentId(), sync_parent.GetId());
DCHECK_EQ(dst->GetId(), sync_parent.GetFirstChildId());
- DCHECK_EQ(dst->GetPredecessorId(), csync::kInvalidId);
+ DCHECK_EQ(dst->GetPredecessorId(), syncer::kInvalidId);
}
} else {
// Find the bookmark model predecessor, and insert after it.
const BookmarkNode* prev = parent->GetChild(index - 1);
- csync::ReadNode sync_prev(trans);
+ syncer::ReadNode sync_prev(trans);
if (!associator->InitSyncNodeFromChromeId(prev->id(), &sync_prev)) {
LOG(WARNING) << "Predecessor lookup failed";
return false;
@@ -391,12 +391,12 @@ bool BookmarkChangeProcessor::PlaceSyncNode(MoveOrCreate operation,
// updated and is already in the correct position in the bookmark model.
int BookmarkChangeProcessor::CalculateBookmarkModelInsertionIndex(
const BookmarkNode* parent,
- const csync::BaseNode* child_info) const {
+ const syncer::BaseNode* child_info) const {
DCHECK(parent);
DCHECK(child_info);
int64 predecessor_id = child_info->GetPredecessorId();
// A return ID of kInvalidId indicates no predecessor.
- if (predecessor_id == csync::kInvalidId)
+ if (predecessor_id == syncer::kInvalidId)
return 0;
// Otherwise, insert after the predecessor bookmark node.
@@ -411,8 +411,8 @@ int BookmarkChangeProcessor::CalculateBookmarkModelInsertionIndex(
// to the sync engine's model. Apply these changes to the browser bookmark
// model.
void BookmarkChangeProcessor::ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) {
if (!running())
return;
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -446,7 +446,7 @@ void BookmarkChangeProcessor::ApplyChangesFromSyncModel(
// Whether we have passed all the deletes (which should be at the
// front of the list).
bool passed_deletes = false;
- for (csync::ChangeRecordList::const_iterator it =
+ for (syncer::ChangeRecordList::const_iterator it =
changes.Get().begin(); it != changes.Get().end(); ++it) {
const BookmarkNode* dst =
model_associator_->GetChromeNodeFromSyncId(it->id);
@@ -455,7 +455,7 @@ void BookmarkChangeProcessor::ApplyChangesFromSyncModel(
if (model->is_permanent_node(dst))
continue;
if (it->action ==
- csync::ChangeRecord::ACTION_DELETE) {
+ syncer::ChangeRecord::ACTION_DELETE) {
// Deletions should always be at the front of the list.
DCHECK(!passed_deletes);
// Children of a deleted node should not be deleted; they may be
@@ -487,12 +487,12 @@ void BookmarkChangeProcessor::ApplyChangesFromSyncModel(
dst = NULL;
} else {
DCHECK_EQ((it->action ==
- csync::ChangeRecord::ACTION_ADD), (dst == NULL))
+ syncer::ChangeRecord::ACTION_ADD), (dst == NULL))
<< "ACTION_ADD should be seen if and only if the node is unknown.";
passed_deletes = true;
- csync::ReadNode src(trans);
- if (src.InitByIdLookup(it->id) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode src(trans);
+ if (src.InitByIdLookup(it->id) != syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"ApplyModelChanges was passed a bad ID");
return;
@@ -506,9 +506,9 @@ void BookmarkChangeProcessor::ApplyChangesFromSyncModel(
// node, resulting in us trying to create it here (which will
// fail). Therefore, we add special logic here just to detect the
// Synced Bookmarks folder.
- csync::ReadNode synced_bookmarks(trans);
+ syncer::ReadNode synced_bookmarks(trans);
if (synced_bookmarks.InitByTagLookup(kMobileBookmarksTag) ==
- csync::BaseNode::INIT_OK &&
+ syncer::BaseNode::INIT_OK &&
synced_bookmarks.GetId() == it->id) {
// This is a newly created Synced Bookmarks node. Associate it.
model_associator_->Associate(model->mobile_node(), it->id);
@@ -541,7 +541,7 @@ void BookmarkChangeProcessor::ApplyChangesFromSyncModel(
// Create a bookmark node corresponding to |src| if one is not already
// associated with |src|.
const BookmarkNode* BookmarkChangeProcessor::CreateOrUpdateBookmarkNode(
- csync::BaseNode* src,
+ syncer::BaseNode* src,
BookmarkModel* model) {
const BookmarkNode* parent =
model_associator_->GetChromeNodeFromSyncId(src->GetParentId());
@@ -581,7 +581,7 @@ const BookmarkNode* BookmarkChangeProcessor::CreateOrUpdateBookmarkNode(
// Creates a bookmark node under the given parent node from the given sync
// node. Returns the newly created node.
const BookmarkNode* BookmarkChangeProcessor::CreateBookmarkNode(
- csync::BaseNode* sync_node,
+ syncer::BaseNode* sync_node,
const BookmarkNode* parent,
BookmarkModel* model,
int index) {
@@ -605,7 +605,7 @@ const BookmarkNode* BookmarkChangeProcessor::CreateBookmarkNode(
// static
// Sets the favicon of the given bookmark node from the given sync node.
bool BookmarkChangeProcessor::SetBookmarkFavicon(
- csync::BaseNode* sync_node,
+ syncer::BaseNode* sync_node,
const BookmarkNode* bookmark_node,
BookmarkModel* bookmark_model) {
std::vector<unsigned char> icon_bytes_vector;
@@ -649,7 +649,7 @@ void BookmarkChangeProcessor::ApplyBookmarkFavicon(
void BookmarkChangeProcessor::SetSyncNodeFavicon(
const BookmarkNode* bookmark_node,
BookmarkModel* model,
- csync::WriteNode* sync_node) {
+ syncer::WriteNode* sync_node) {
std::vector<unsigned char> favicon_bytes;
EncodeFavicon(bookmark_node, model, &favicon_bytes);
if (!favicon_bytes.empty())
diff --git a/chrome/browser/sync/glue/bookmark_change_processor.h b/chrome/browser/sync/glue/bookmark_change_processor.h
index a0b6756..61e36f0 100644
--- a/chrome/browser/sync/glue/bookmark_change_processor.h
+++ b/chrome/browser/sync/glue/bookmark_change_processor.h
@@ -15,15 +15,15 @@
#include "chrome/browser/sync/glue/data_type_error_handler.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
-namespace csync {
+namespace syncer {
class WriteNode;
class WriteTransaction;
-} // namespace csync
+} // namespace syncer
namespace browser_sync {
// This class is responsible for taking changes from the BookmarkModel
-// and applying them to the csync 'syncable' model, and vice versa.
+// and applying them to the sync API 'syncable' model, and vice versa.
// All operations and use of this class are from the UI thread.
// This is currently bookmarks specific.
class BookmarkChangeProcessor : public BookmarkModelObserver,
@@ -34,7 +34,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
virtual ~BookmarkChangeProcessor() {}
// BookmarkModelObserver implementation.
- // BookmarkModel -> csync model change application.
+ // BookmarkModel -> sync API model change application.
virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE;
virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE;
virtual void BookmarkNodeMoved(BookmarkModel* model,
@@ -59,15 +59,15 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
// The change processor implementation, responsible for applying changes from
// the sync model to the bookmarks model.
virtual void ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
// The following methods are static and hence may be invoked at any time,
// and do not depend on having a running ChangeProcessor.
// Creates a bookmark node under the given parent node from the given sync
// node. Returns the newly created node.
static const BookmarkNode* CreateBookmarkNode(
- csync::BaseNode* sync_node,
+ syncer::BaseNode* sync_node,
const BookmarkNode* parent,
BookmarkModel* model,
int index);
@@ -76,7 +76,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
// Returns whether the favicon was set in the bookmark node.
// |profile| is the profile that contains the HistoryService and BookmarkModel
// for the bookmark in question.
- static bool SetBookmarkFavicon(csync::BaseNode* sync_node,
+ static bool SetBookmarkFavicon(syncer::BaseNode* sync_node,
const BookmarkNode* bookmark_node,
BookmarkModel* model);
@@ -91,7 +91,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
// Sets the favicon of the given sync node from the given bookmark node.
static void SetSyncNodeFavicon(const BookmarkNode* bookmark_node,
BookmarkModel* model,
- csync::WriteNode* sync_node);
+ syncer::WriteNode* sync_node);
// Treat the |index|th child of |parent| as a newly added node, and create a
// corresponding node in the sync domain using |trans|. All properties
@@ -101,7 +101,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
static int64 CreateSyncNode(const BookmarkNode* parent,
BookmarkModel* model,
int index,
- csync::WriteTransaction* trans,
+ syncer::WriteTransaction* trans,
BookmarkModelAssociator* associator,
DataTypeErrorHandler* error_handler);
@@ -118,7 +118,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
// Create a bookmark node corresponding to |src| if one is not already
// associated with |src|. Returns the node that was created or updated.
const BookmarkNode* CreateOrUpdateBookmarkNode(
- csync::BaseNode* src,
+ syncer::BaseNode* src,
BookmarkModel* model);
// Helper function to determine the appropriate insertion index of sync node
@@ -128,7 +128,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
// position.
int CalculateBookmarkModelInsertionIndex(
const BookmarkNode* parent,
- const csync::BaseNode* node) const;
+ const syncer::BaseNode* node) const;
// Helper function used to fix the position of a sync node so that it matches
// the position of a corresponding bookmark model node. |parent| and
@@ -141,14 +141,14 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
static bool PlaceSyncNode(MoveOrCreate operation,
const BookmarkNode* parent,
int index,
- csync::WriteTransaction* trans,
- csync::WriteNode* dst,
+ syncer::WriteTransaction* trans,
+ syncer::WriteNode* dst,
BookmarkModelAssociator* associator);
// Copy properties (but not position) from |src| to |dst|.
static void UpdateSyncNodeProperties(const BookmarkNode* src,
BookmarkModel* model,
- csync::WriteNode* dst);
+ syncer::WriteNode* dst);
// Helper function to encode a bookmark's favicon into a PNG byte vector.
static void EncodeFavicon(const BookmarkNode* src,
@@ -157,7 +157,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver,
// Remove the sync node corresponding to |node|. It shouldn't have
// any children.
- void RemoveOneSyncNode(csync::WriteTransaction* trans,
+ void RemoveOneSyncNode(syncer::WriteTransaction* trans,
const BookmarkNode* node);
// Remove all the sync nodes associated with |node| and its children.
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 85d2510..600454c 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -90,14 +90,14 @@ class SyncBookmarkDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillRepeatedly(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillRepeatedly(Return(csync::SyncError()));
+ WillRepeatedly(Return(syncer::SyncError()));
EXPECT_CALL(service_, ActivateDataType(_, _, _));
}
void SetStopExpectations() {
EXPECT_CALL(service_, DeactivateDataType(_));
EXPECT_CALL(*model_associator_, DisassociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
}
void Start() {
@@ -227,7 +227,7 @@ TEST_F(SyncBookmarkDataTypeControllerTest, StartAssociationFailed) {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillRepeatedly(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillRepeatedly(Return(csync::SyncError(FROM_HERE,
+ WillRepeatedly(Return(syncer::SyncError(FROM_HERE,
"error",
syncable::BOOKMARKS)));
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index 22bf83c..f810eb7 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -84,7 +84,7 @@ class BookmarkNodeFinder {
// Finds best matching node for the given sync node.
// Returns the matching node if one exists; NULL otherwise. If a matching
// node is found, it's removed for further matches.
- const BookmarkNode* FindBookmarkNode(const csync::BaseNode& sync_node);
+ const BookmarkNode* FindBookmarkNode(const syncer::BaseNode& sync_node);
private:
typedef std::multiset<const BookmarkNode*, BookmarkComparer> BookmarkNodesSet;
@@ -120,7 +120,7 @@ BookmarkNodeFinder::BookmarkNodeFinder(const BookmarkNode* parent_node)
}
const BookmarkNode* BookmarkNodeFinder::FindBookmarkNode(
- const csync::BaseNode& sync_node) {
+ const syncer::BaseNode& sync_node) {
// Create a bookmark node from the given sync node.
BookmarkNode temp_node(sync_node.GetURL());
temp_node.SetTitle(UTF8ToUTF16(sync_node.GetTitle()));
@@ -185,7 +185,7 @@ const BookmarkNode* BookmarkNodeIdIndex::Find(int64 id) const {
BookmarkModelAssociator::BookmarkModelAssociator(
BookmarkModel* bookmark_model,
- csync::UserShare* user_share,
+ syncer::UserShare* user_share,
DataTypeErrorHandler* unrecoverable_error_handler,
bool expect_mobile_bookmarks_folder)
: bookmark_model_(bookmark_model),
@@ -213,16 +213,16 @@ void BookmarkModelAssociator::UpdatePermanentNodeVisibility() {
id_map_.find(bookmark_model_->mobile_node()->id()) != id_map_.end());
}
-csync::SyncError BookmarkModelAssociator::DisassociateModels() {
+syncer::SyncError BookmarkModelAssociator::DisassociateModels() {
id_map_.clear();
id_map_inverse_.clear();
dirty_associations_sync_ids_.clear();
- return csync::SyncError();
+ return syncer::SyncError();
}
int64 BookmarkModelAssociator::GetSyncIdFromChromeId(const int64& node_id) {
BookmarkIdToSyncIdMap::const_iterator iter = id_map_.find(node_id);
- return iter == id_map_.end() ? csync::kInvalidId : iter->second;
+ return iter == id_map_.end() ? syncer::kInvalidId : iter->second;
}
const BookmarkNode* BookmarkModelAssociator::GetChromeNodeFromSyncId(
@@ -233,12 +233,12 @@ const BookmarkNode* BookmarkModelAssociator::GetChromeNodeFromSyncId(
bool BookmarkModelAssociator::InitSyncNodeFromChromeId(
const int64& node_id,
- csync::BaseNode* sync_node) {
+ syncer::BaseNode* sync_node) {
DCHECK(sync_node);
int64 sync_id = GetSyncIdFromChromeId(node_id);
- if (sync_id == csync::kInvalidId)
+ if (sync_id == syncer::kInvalidId)
return false;
- if (sync_node->InitByIdLookup(sync_id) != csync::BaseNode::INIT_OK)
+ if (sync_node->InitByIdLookup(sync_id) != syncer::BaseNode::INIT_OK)
return false;
DCHECK(sync_node->GetId() == sync_id);
return true;
@@ -248,7 +248,7 @@ void BookmarkModelAssociator::Associate(const BookmarkNode* node,
int64 sync_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
int64 node_id = node->id();
- DCHECK_NE(sync_id, csync::kInvalidId);
+ DCHECK_NE(sync_id, syncer::kInvalidId);
DCHECK(id_map_.find(node_id) == id_map_.end());
DCHECK(id_map_inverse_.find(sync_id) == id_map_inverse_.end());
id_map_[node_id] = sync_id;
@@ -285,24 +285,24 @@ bool BookmarkModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
has_mobile_folder = false;
}
- csync::ReadTransaction trans(FROM_HERE, user_share_);
+ syncer::ReadTransaction trans(FROM_HERE, user_share_);
- csync::ReadNode bookmark_bar_node(&trans);
+ syncer::ReadNode bookmark_bar_node(&trans);
if (bookmark_bar_node.InitByIdLookup(bookmark_bar_sync_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return false;
}
- csync::ReadNode other_bookmarks_node(&trans);
+ syncer::ReadNode other_bookmarks_node(&trans);
if (other_bookmarks_node.InitByIdLookup(other_bookmarks_sync_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return false;
}
- csync::ReadNode mobile_bookmarks_node(&trans);
+ syncer::ReadNode mobile_bookmarks_node(&trans);
if (has_mobile_folder &&
mobile_bookmarks_node.InitByIdLookup(mobile_bookmarks_sync_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return false;
}
@@ -316,7 +316,7 @@ bool BookmarkModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
bool BookmarkModelAssociator::NodesMatch(
const BookmarkNode* bookmark,
- const csync::BaseNode* sync_node) const {
+ const syncer::BaseNode* sync_node) const {
if (bookmark->GetTitle() != UTF8ToUTF16(sync_node->GetTitle()))
return false;
if (bookmark->is_folder() != sync_node->GetIsFolder())
@@ -331,12 +331,12 @@ bool BookmarkModelAssociator::NodesMatch(
return true;
}
-csync::SyncError BookmarkModelAssociator::AssociateTaggedPermanentNode(
+syncer::SyncError BookmarkModelAssociator::AssociateTaggedPermanentNode(
const BookmarkNode* permanent_node, const std::string&tag) {
// Do nothing if |permanent_node| is already initialized and associated.
int64 sync_id = GetSyncIdFromChromeId(permanent_node->id());
- if (sync_id != csync::kInvalidId)
- return csync::SyncError();
+ if (sync_id != syncer::kInvalidId)
+ return syncer::SyncError();
if (!GetSyncIdForTaggedNode(tag, &sync_id))
return unrecoverable_error_handler_->CreateAndUploadError(
FROM_HERE,
@@ -344,26 +344,26 @@ csync::SyncError BookmarkModelAssociator::AssociateTaggedPermanentNode(
model_type());
Associate(permanent_node, sync_id);
- return csync::SyncError();
+ return syncer::SyncError();
}
bool BookmarkModelAssociator::GetSyncIdForTaggedNode(const std::string& tag,
int64* sync_id) {
- csync::ReadTransaction trans(FROM_HERE, user_share_);
- csync::ReadNode sync_node(&trans);
- if (sync_node.InitByTagLookup(tag.c_str()) != csync::BaseNode::INIT_OK)
+ syncer::ReadTransaction trans(FROM_HERE, user_share_);
+ syncer::ReadNode sync_node(&trans);
+ if (sync_node.InitByTagLookup(tag.c_str()) != syncer::BaseNode::INIT_OK)
return false;
*sync_id = sync_node.GetId();
return true;
}
-csync::SyncError BookmarkModelAssociator::AssociateModels() {
+syncer::SyncError BookmarkModelAssociator::AssociateModels() {
scoped_ptr<ScopedAssociationUpdater> association_updater(
new ScopedAssociationUpdater(bookmark_model_));
// Try to load model associations from persisted associations first. If that
// succeeds, we don't need to run the complex model matching algorithm.
if (LoadAssociations())
- return csync::SyncError();
+ return syncer::SyncError();
DisassociateModels();
@@ -372,7 +372,7 @@ csync::SyncError BookmarkModelAssociator::AssociateModels() {
return BuildAssociations();
}
-csync::SyncError BookmarkModelAssociator::BuildAssociations() {
+syncer::SyncError BookmarkModelAssociator::BuildAssociations() {
// Algorithm description:
// Match up the roots and recursively do the following:
// * For each sync node for the current sync parent node, find the best
@@ -390,7 +390,7 @@ csync::SyncError BookmarkModelAssociator::BuildAssociations() {
// This algorithm will not do well if the folder name has changes but the
// children under them are all the same.
- csync::SyncError error;
+ syncer::SyncError error;
DCHECK(bookmark_model_->IsLoaded());
// To prime our association, we associate the top-level nodes, Bookmark Bar
@@ -417,31 +417,31 @@ csync::SyncError BookmarkModelAssociator::BuildAssociations() {
int64 bookmark_bar_sync_id = GetSyncIdFromChromeId(
bookmark_model_->bookmark_bar_node()->id());
- DCHECK_NE(bookmark_bar_sync_id, csync::kInvalidId);
+ DCHECK_NE(bookmark_bar_sync_id, syncer::kInvalidId);
int64 other_bookmarks_sync_id = GetSyncIdFromChromeId(
bookmark_model_->other_node()->id());
- DCHECK_NE(other_bookmarks_sync_id, csync::kInvalidId);
+ DCHECK_NE(other_bookmarks_sync_id, syncer::kInvalidId);
int64 mobile_bookmarks_sync_id = GetSyncIdFromChromeId(
bookmark_model_->mobile_node()->id());
if (expect_mobile_bookmarks_folder_) {
- DCHECK_NE(csync::kInvalidId, mobile_bookmarks_sync_id);
+ DCHECK_NE(syncer::kInvalidId, mobile_bookmarks_sync_id);
}
std::stack<int64> dfs_stack;
- if (mobile_bookmarks_sync_id != csync::kInvalidId)
+ if (mobile_bookmarks_sync_id != syncer::kInvalidId)
dfs_stack.push(mobile_bookmarks_sync_id);
dfs_stack.push(other_bookmarks_sync_id);
dfs_stack.push(bookmark_bar_sync_id);
- csync::WriteTransaction trans(FROM_HERE, user_share_);
+ syncer::WriteTransaction trans(FROM_HERE, user_share_);
while (!dfs_stack.empty()) {
int64 sync_parent_id = dfs_stack.top();
dfs_stack.pop();
- csync::ReadNode sync_parent(&trans);
+ syncer::ReadNode sync_parent(&trans);
if (sync_parent.InitByIdLookup(sync_parent_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return unrecoverable_error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to lookup node.",
@@ -457,10 +457,10 @@ csync::SyncError BookmarkModelAssociator::BuildAssociations() {
int index = 0;
int64 sync_child_id = sync_parent.GetFirstChildId();
- while (sync_child_id != csync::kInvalidId) {
- csync::WriteNode sync_child_node(&trans);
+ while (sync_child_id != syncer::kInvalidId) {
+ syncer::WriteNode sync_child_node(&trans);
if (sync_child_node.InitByIdLookup(sync_child_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return unrecoverable_error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to lookup node.",
@@ -509,7 +509,7 @@ csync::SyncError BookmarkModelAssociator::BuildAssociations() {
sync_child_id = BookmarkChangeProcessor::CreateSyncNode(
parent_node, bookmark_model_, i, &trans, this,
unrecoverable_error_handler_);
- if (csync::kInvalidId == sync_child_id) {
+ if (syncer::kInvalidId == sync_child_id) {
return unrecoverable_error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to create sync node.",
@@ -521,7 +521,7 @@ csync::SyncError BookmarkModelAssociator::BuildAssociations() {
}
}
- return csync::SyncError();
+ return syncer::SyncError();
}
void BookmarkModelAssociator::PostPersistAssociationsTask() {
@@ -545,14 +545,14 @@ void BookmarkModelAssociator::PersistAssociations() {
return;
}
- csync::WriteTransaction trans(FROM_HERE, user_share_);
+ syncer::WriteTransaction trans(FROM_HERE, user_share_);
DirtyAssociationsSyncIds::iterator iter;
for (iter = dirty_associations_sync_ids_.begin();
iter != dirty_associations_sync_ids_.end();
++iter) {
int64 sync_id = *iter;
- csync::WriteNode sync_node(&trans);
- if (sync_node.InitByIdLookup(sync_id) != csync::BaseNode::INIT_OK) {
+ syncer::WriteNode sync_node(&trans);
+ if (sync_node.InitByIdLookup(sync_id) != syncer::BaseNode::INIT_OK) {
unrecoverable_error_handler_->OnSingleDatatypeUnrecoverableError(
FROM_HERE,
"Could not lookup bookmark node for ID persistence.");
@@ -607,7 +607,7 @@ bool BookmarkModelAssociator::LoadAssociations() {
dfs_stack.push(other_bookmarks_id);
dfs_stack.push(bookmark_bar_id);
- csync::ReadTransaction trans(FROM_HERE, user_share_);
+ syncer::ReadTransaction trans(FROM_HERE, user_share_);
// Count total number of nodes in sync model so that we can compare that
// with the total number of nodes in the bookmark model.
@@ -616,8 +616,8 @@ bool BookmarkModelAssociator::LoadAssociations() {
int64 parent_id = dfs_stack.top();
dfs_stack.pop();
++sync_node_count;
- csync::ReadNode sync_parent(&trans);
- if (sync_parent.InitByIdLookup(parent_id) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode sync_parent(&trans);
+ if (sync_parent.InitByIdLookup(parent_id) != syncer::BaseNode::INIT_OK) {
return false;
}
@@ -641,10 +641,10 @@ bool BookmarkModelAssociator::LoadAssociations() {
// Add all children of the current node to the stack.
int64 child_id = sync_parent.GetFirstChildId();
- while (child_id != csync::kInvalidId) {
+ while (child_id != syncer::kInvalidId) {
dfs_stack.push(child_id);
- csync::ReadNode child_node(&trans);
- if (child_node.InitByIdLookup(child_id) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode child_node(&trans);
+ if (child_node.InitByIdLookup(child_id) != syncer::BaseNode::INIT_OK) {
return false;
}
child_id = child_node.GetSuccessorId();
@@ -662,9 +662,9 @@ bool BookmarkModelAssociator::LoadAssociations() {
bool BookmarkModelAssociator::CryptoReadyIfNecessary() {
// We only access the cryptographer while holding a transaction.
- csync::ReadTransaction trans(FROM_HERE, user_share_);
+ syncer::ReadTransaction trans(FROM_HERE, user_share_);
const syncable::ModelTypeSet encrypted_types =
- csync::GetEncryptedTypes(&trans);
+ syncer::GetEncryptedTypes(&trans);
return !encrypted_types.Has(syncable::BOOKMARKS) ||
trans.GetCryptographer()->is_ready();
}
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.h b/chrome/browser/sync/glue/bookmark_model_associator.h
index fe29ba5..e6e0131 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.h
+++ b/chrome/browser/sync/glue/bookmark_model_associator.h
@@ -21,7 +21,7 @@
class BookmarkModel;
class BookmarkNode;
-namespace csync {
+namespace syncer {
class BaseNode;
struct UserShare;
}
@@ -41,7 +41,7 @@ class BookmarkModelAssociator
// Should be set to true only by mobile clients.
BookmarkModelAssociator(
BookmarkModel* bookmark_model,
- csync::UserShare* user_share,
+ syncer::UserShare* user_share,
DataTypeErrorHandler* unrecoverable_error_handler,
bool expect_mobile_bookmarks_folder);
virtual ~BookmarkModelAssociator();
@@ -58,16 +58,16 @@ class BookmarkModelAssociator
// node. After successful completion, the models should be identical and
// corresponding. Returns true on success. On failure of this step, we
// should abort the sync operation and report an error to the user.
- virtual csync::SyncError AssociateModels() OVERRIDE;
+ virtual syncer::SyncError AssociateModels() OVERRIDE;
- virtual csync::SyncError DisassociateModels() OVERRIDE;
+ virtual syncer::SyncError DisassociateModels() OVERRIDE;
// The has_nodes out param is true if the sync model has nodes other
// than the permanent tagged nodes.
virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) OVERRIDE;
// Returns sync id for the given bookmark node id.
- // Returns csync::kInvalidId if the sync node is not found for the given
+ // Returns syncer::kInvalidId if the sync node is not found for the given
// bookmark node id.
virtual int64 GetSyncIdFromChromeId(const int64& node_id) OVERRIDE;
@@ -80,7 +80,7 @@ class BookmarkModelAssociator
// if the initialization of sync node fails.
virtual bool InitSyncNodeFromChromeId(
const int64& node_id,
- csync::BaseNode* sync_node) OVERRIDE;
+ syncer::BaseNode* sync_node) OVERRIDE;
// Associates the given bookmark node with the given sync id.
virtual void Associate(const BookmarkNode* node, int64 sync_id) OVERRIDE;
@@ -118,23 +118,23 @@ class BookmarkModelAssociator
// Matches up the bookmark model and the sync model to build model
// associations.
- csync::SyncError BuildAssociations();
+ syncer::SyncError BuildAssociations();
// Associate a top-level node of the bookmark model with a permanent node in
// the sync domain. Such permanent nodes are identified by a tag that is
// well known to the server and the client, and is unique within a particular
// user's share. For example, "other_bookmarks" is the tag for the Other
// Bookmarks folder. The sync nodes are server-created.
- csync::SyncError AssociateTaggedPermanentNode(
+ syncer::SyncError AssociateTaggedPermanentNode(
const BookmarkNode* permanent_node,
const std::string& tag) WARN_UNUSED_RESULT;
// Compare the properties of a pair of nodes from either domain.
bool NodesMatch(const BookmarkNode* bookmark,
- const csync::BaseNode* sync_node) const;
+ const syncer::BaseNode* sync_node) const;
BookmarkModel* bookmark_model_;
- csync::UserShare* user_share_;
+ syncer::UserShare* user_share_;
DataTypeErrorHandler* unrecoverable_error_handler_;
const bool expect_mobile_bookmarks_folder_;
BookmarkIdToSyncIdMap id_map_;
diff --git a/chrome/browser/sync/glue/bridged_sync_notifier.cc b/chrome/browser/sync/glue/bridged_sync_notifier.cc
index e856758..61a7c900 100644
--- a/chrome/browser/sync/glue/bridged_sync_notifier.cc
+++ b/chrome/browser/sync/glue/bridged_sync_notifier.cc
@@ -10,7 +10,7 @@ namespace browser_sync {
BridgedSyncNotifier::BridgedSyncNotifier(
ChromeSyncNotificationBridge* bridge,
- csync::SyncNotifier* delegate)
+ syncer::SyncNotifier* delegate)
: bridge_(bridge), delegate_(delegate) {
DCHECK(bridge_);
}
@@ -19,14 +19,14 @@ BridgedSyncNotifier::~BridgedSyncNotifier() {
}
void BridgedSyncNotifier::AddObserver(
- csync::SyncNotifierObserver* observer) {
+ syncer::SyncNotifierObserver* observer) {
if (delegate_.get())
delegate_->AddObserver(observer);
bridge_->AddObserver(observer);
}
void BridgedSyncNotifier::RemoveObserver(
- csync::SyncNotifierObserver* observer) {
+ syncer::SyncNotifierObserver* observer) {
bridge_->RemoveObserver(observer);
if (delegate_.get())
delegate_->RemoveObserver(observer);
diff --git a/chrome/browser/sync/glue/bridged_sync_notifier.h b/chrome/browser/sync/glue/bridged_sync_notifier.h
index 6df47b8b..1ce4770 100644
--- a/chrome/browser/sync/glue/bridged_sync_notifier.h
+++ b/chrome/browser/sync/glue/bridged_sync_notifier.h
@@ -19,21 +19,21 @@ class ChromeSyncNotificationBridge;
// with the exception of AddObserver/RemoveObserver, which also result in
// the observer being registered/deregistered with the
// ChromeSyncNotificationBridge.
-class BridgedSyncNotifier : public csync::SyncNotifier {
+class BridgedSyncNotifier : public syncer::SyncNotifier {
public:
// Does not take ownership of |bridge|. Takes ownership of |delegate|.
// |delegate| may be NULL.
BridgedSyncNotifier(ChromeSyncNotificationBridge* bridge,
- csync::SyncNotifier* delegate);
+ syncer::SyncNotifier* delegate);
virtual ~BridgedSyncNotifier();
// SyncNotifier implementation. Passes through all calls to the delegate.
// AddObserver/RemoveObserver will also register/deregister |observer| with
// the bridge.
virtual void AddObserver(
- csync::SyncNotifierObserver* observer) OVERRIDE;
+ syncer::SyncNotifierObserver* observer) OVERRIDE;
virtual void RemoveObserver(
- csync::SyncNotifierObserver* observer) OVERRIDE;
+ syncer::SyncNotifierObserver* observer) OVERRIDE;
virtual void SetUniqueId(const std::string& unique_id) OVERRIDE;
virtual void SetStateDeprecated(const std::string& state) OVERRIDE;
virtual void UpdateCredentials(
@@ -48,7 +48,7 @@ class BridgedSyncNotifier : public csync::SyncNotifier {
ChromeSyncNotificationBridge* bridge_;
// The delegate we are wrapping.
- scoped_ptr<csync::SyncNotifier> delegate_;
+ scoped_ptr<syncer::SyncNotifier> delegate_;
};
} // namespace browser_sync
diff --git a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
index ad9bf32..c7c1f25 100644
--- a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
+++ b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
@@ -33,19 +33,19 @@ class MockChromeSyncNotificationBridge : public ChromeSyncNotificationBridge {
: ChromeSyncNotificationBridge(&mock_profile_) {}
virtual ~MockChromeSyncNotificationBridge() {}
- MOCK_METHOD1(AddObserver, void(csync::SyncNotifierObserver*));
- MOCK_METHOD1(RemoveObserver, void(csync::SyncNotifierObserver*));
+ MOCK_METHOD1(AddObserver, void(syncer::SyncNotifierObserver*));
+ MOCK_METHOD1(RemoveObserver, void(syncer::SyncNotifierObserver*));
private:
NiceMock<ProfileMock> mock_profile_;
};
-class MockSyncNotifier : public csync::SyncNotifier {
+class MockSyncNotifier : public syncer::SyncNotifier {
public:
MockSyncNotifier() {}
virtual ~MockSyncNotifier() {}
- MOCK_METHOD1(AddObserver, void(csync::SyncNotifierObserver*));
- MOCK_METHOD1(RemoveObserver, void(csync::SyncNotifierObserver*));
+ MOCK_METHOD1(AddObserver, void(syncer::SyncNotifierObserver*));
+ MOCK_METHOD1(RemoveObserver, void(syncer::SyncNotifierObserver*));
MOCK_METHOD1(SetUniqueId, void(const std::string&));
MOCK_METHOD1(SetStateDeprecated, void(const std::string&));
MOCK_METHOD2(UpdateCredentials, void(const std::string&, const std::string&));
@@ -73,14 +73,14 @@ class BridgedSyncNotifierTest : public testing::Test {
};
TEST_F(BridgedSyncNotifierTest, AddObserver) {
- csync::MockSyncNotifierObserver observer;
+ syncer::MockSyncNotifierObserver observer;
EXPECT_CALL(mock_bridge_, AddObserver(&observer));
EXPECT_CALL(*mock_delegate_, AddObserver(&observer));
bridged_notifier_.AddObserver(&observer);
}
TEST_F(BridgedSyncNotifierTest, RemoveObserver) {
- csync::MockSyncNotifierObserver observer;
+ syncer::MockSyncNotifierObserver observer;
EXPECT_CALL(mock_bridge_, RemoveObserver(&observer));
EXPECT_CALL(*mock_delegate_, RemoveObserver(&observer));
bridged_notifier_.RemoveObserver(&observer);
diff --git a/chrome/browser/sync/glue/browser_thread_model_worker.cc b/chrome/browser/sync/glue/browser_thread_model_worker.cc
index 2b1a153..27c850c 100644
--- a/chrome/browser/sync/glue/browser_thread_model_worker.cc
+++ b/chrome/browser/sync/glue/browser_thread_model_worker.cc
@@ -14,13 +14,13 @@ using content::BrowserThread;
namespace browser_sync {
BrowserThreadModelWorker::BrowserThreadModelWorker(
- BrowserThread::ID thread, csync::ModelSafeGroup group)
+ BrowserThread::ID thread, syncer::ModelSafeGroup group)
: thread_(thread), group_(group) {
}
-csync::SyncerError BrowserThreadModelWorker::DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) {
- csync::SyncerError error = csync::UNSET;
+syncer::SyncerError BrowserThreadModelWorker::DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) {
+ syncer::SyncerError error = syncer::UNSET;
if (BrowserThread::CurrentlyOn(thread_)) {
DLOG(WARNING) << "Already on thread " << thread_;
return work.Run();
@@ -38,42 +38,42 @@ csync::SyncerError BrowserThreadModelWorker::DoWorkAndWaitUntilDone(
return error;
}
-csync::ModelSafeGroup BrowserThreadModelWorker::GetModelSafeGroup() {
+syncer::ModelSafeGroup BrowserThreadModelWorker::GetModelSafeGroup() {
return group_;
}
BrowserThreadModelWorker::~BrowserThreadModelWorker() {}
void BrowserThreadModelWorker::CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
WaitableEvent* done,
- csync::SyncerError* error) {
+ syncer::SyncerError* error) {
DCHECK(BrowserThread::CurrentlyOn(thread_));
*error = work.Run();
done->Signal();
}
DatabaseModelWorker::DatabaseModelWorker()
- : BrowserThreadModelWorker(BrowserThread::DB, csync::GROUP_DB) {
+ : BrowserThreadModelWorker(BrowserThread::DB, syncer::GROUP_DB) {
}
void DatabaseModelWorker::CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
WaitableEvent* done,
- csync::SyncerError* error) {
+ syncer::SyncerError* error) {
BrowserThreadModelWorker::CallDoWorkAndSignalTask(work, done, error);
}
DatabaseModelWorker::~DatabaseModelWorker() {}
FileModelWorker::FileModelWorker()
- : BrowserThreadModelWorker(BrowserThread::FILE, csync::GROUP_FILE) {
+ : BrowserThreadModelWorker(BrowserThread::FILE, syncer::GROUP_FILE) {
}
void FileModelWorker::CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
WaitableEvent* done,
- csync::SyncerError* error) {
+ syncer::SyncerError* error) {
BrowserThreadModelWorker::CallDoWorkAndSignalTask(work, done, error);
}
diff --git a/chrome/browser/sync/glue/browser_thread_model_worker.h b/chrome/browser/sync/glue/browser_thread_model_worker.h
index bf055f4..c13816b 100644
--- a/chrome/browser/sync/glue/browser_thread_model_worker.h
+++ b/chrome/browser/sync/glue/browser_thread_model_worker.h
@@ -19,19 +19,19 @@ class WaitableEvent;
namespace browser_sync {
-// A csync::ModelSafeWorker for models that accept requests from the
+// A syncer::ModelSafeWorker for models that accept requests from the
// syncapi that need to be fulfilled on a browser thread, for example
// autofill on the DB thread. TODO(sync): Try to generalize other
// ModelWorkers (e.g. history, etc).
-class BrowserThreadModelWorker : public csync::ModelSafeWorker {
+class BrowserThreadModelWorker : public syncer::ModelSafeWorker {
public:
BrowserThreadModelWorker(content::BrowserThread::ID thread,
- csync::ModelSafeGroup group);
+ syncer::ModelSafeGroup group);
- // csync::ModelSafeWorker implementation. Called on the sync thread.
- virtual csync::SyncerError DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) OVERRIDE;
- virtual csync::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
+ // syncer::ModelSafeWorker implementation. Called on the sync thread.
+ virtual syncer::SyncerError DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) OVERRIDE;
+ virtual syncer::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
protected:
virtual ~BrowserThreadModelWorker();
@@ -40,13 +40,13 @@ class BrowserThreadModelWorker : public csync::ModelSafeWorker {
// an implementation that subclasses should use. This is so that
// (subclass)::CallDoWorkAndSignalTask shows up in callstacks.
virtual void CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
base::WaitableEvent* done,
- csync::SyncerError* error) = 0;
+ syncer::SyncerError* error) = 0;
private:
content::BrowserThread::ID thread_;
- csync::ModelSafeGroup group_;
+ syncer::ModelSafeGroup group_;
DISALLOW_COPY_AND_ASSIGN(BrowserThreadModelWorker);
};
@@ -60,9 +60,9 @@ class DatabaseModelWorker : public BrowserThreadModelWorker {
protected:
virtual void CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
base::WaitableEvent* done,
- csync::SyncerError* error) OVERRIDE;
+ syncer::SyncerError* error) OVERRIDE;
private:
virtual ~DatabaseModelWorker();
@@ -74,9 +74,9 @@ class FileModelWorker : public BrowserThreadModelWorker {
protected:
virtual void CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
base::WaitableEvent* done,
- csync::SyncerError* error) OVERRIDE;
+ syncer::SyncerError* error) OVERRIDE;
private:
virtual ~FileModelWorker();
diff --git a/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc b/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc
index 82c3e50..06e1e82 100644
--- a/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc
+++ b/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc
@@ -42,8 +42,9 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test {
// DoWork hasn't executed within action_timeout_ms() ms.
void ScheduleWork() {
// We wait until the callback is done. So it is safe to use unretained.
- csync::WorkCallback c = base::Bind(&SyncBrowserThreadModelWorkerTest::DoWork,
- base::Unretained(this));
+ syncer::WorkCallback c =
+ base::Bind(&SyncBrowserThreadModelWorkerTest::DoWork,
+ base::Unretained(this));
timer()->Start(
FROM_HERE,
TimeDelta::FromMilliseconds(TestTimeouts::action_timeout_ms()),
@@ -53,13 +54,13 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test {
}
// This is the work that will be scheduled to be done on the DB thread.
- csync::SyncerError DoWork() {
+ syncer::SyncerError DoWork() {
EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
timer_.Stop(); // Stop the failure timer so the test succeeds.
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, MessageLoop::QuitClosure());
did_do_work_ = true;
- return csync::SYNCER_OK;
+ return syncer::SYNCER_OK;
}
// This will be called by the OneShotTimer and make the test fail unless
diff --git a/chrome/browser/sync/glue/change_processor.cc b/chrome/browser/sync/glue/change_processor.cc
index f95e664..41fcf2b 100644
--- a/chrome/browser/sync/glue/change_processor.cc
+++ b/chrome/browser/sync/glue/change_processor.cc
@@ -17,7 +17,7 @@ ChangeProcessor::~ChangeProcessor() {
}
void ChangeProcessor::Start(Profile* profile,
- csync::UserShare* share_handle) {
+ syncer::UserShare* share_handle) {
DCHECK(error_handler_ && !share_handle_);
share_handle_ = share_handle;
StartImpl(profile);
@@ -43,7 +43,7 @@ DataTypeErrorHandler* ChangeProcessor::error_handler() const {
return error_handler_;
}
-csync::UserShare* ChangeProcessor::share_handle() const {
+syncer::UserShare* ChangeProcessor::share_handle() const {
return share_handle_;
}
diff --git a/chrome/browser/sync/glue/change_processor.h b/chrome/browser/sync/glue/change_processor.h
index b0345c0..e601bdc 100644
--- a/chrome/browser/sync/glue/change_processor.h
+++ b/chrome/browser/sync/glue/change_processor.h
@@ -12,9 +12,9 @@
class Profile;
-namespace csync {
+namespace syncer {
class UnrecoverableErrorHandler;
-} // namespace csync
+} // namespace syncer
namespace browser_sync {
@@ -36,7 +36,7 @@ class ChangeProcessor {
// It is safe to call Start again after previously Stop()ing the
// processor. Subclasses can extract their associated chrome model
// from |profile| in |StartImpl|.
- void Start(Profile* profile, csync::UserShare* share_handle);
+ void Start(Profile* profile, syncer::UserShare* share_handle);
void Stop();
virtual bool IsRunning() const;
@@ -44,8 +44,8 @@ class ChangeProcessor {
// applied to the frontend model. See syncapi.h for detailed instructions on
// how to interpret and process |changes|.
virtual void ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) = 0;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) = 0;
// The changes found in ApplyChangesFromSyncModel may be too slow to be
// performed while holding a [Read/Write]Transaction lock or may interact
@@ -82,7 +82,7 @@ class ChangeProcessor {
bool running() const { return running_; }
DataTypeErrorHandler* error_handler() const;
- virtual csync::UserShare* share_handle() const;
+ virtual syncer::UserShare* share_handle() const;
private:
bool running_; // True if we have been told it is safe to process changes.
@@ -90,7 +90,7 @@ class ChangeProcessor {
// The sync model we are processing changes from. Non-NULL when |running_| is
// true.
- csync::UserShare* share_handle_;
+ syncer::UserShare* share_handle_;
DISALLOW_COPY_AND_ASSIGN(ChangeProcessor);
};
diff --git a/chrome/browser/sync/glue/change_processor_mock.h b/chrome/browser/sync/glue/change_processor_mock.h
index e006dd6..e94f4b6 100644
--- a/chrome/browser/sync/glue/change_processor_mock.h
+++ b/chrome/browser/sync/glue/change_processor_mock.h
@@ -19,8 +19,8 @@ class ChangeProcessorMock
ChangeProcessorMock();
virtual ~ChangeProcessorMock();
MOCK_METHOD2(ApplyChangesFromSyncModel,
- void(const csync::BaseTransaction*,
- const csync::ImmutableChangeRecordList&));
+ void(const syncer::BaseTransaction*,
+ const syncer::ImmutableChangeRecordList&));
MOCK_METHOD0(CommitChangesFromSyncModel, void());
MOCK_METHOD1(StartImpl, void(Profile*));
MOCK_METHOD0(StopImpl, void());
@@ -31,7 +31,7 @@ class ChangeProcessorMock
void(const tracked_objects::Location&,
const std::string&));
MOCK_METHOD3(CreateAndUploadError,
- csync::SyncError(const tracked_objects::Location&,
+ syncer::SyncError(const tracked_objects::Location&,
const std::string&,
syncable::ModelType));
diff --git a/chrome/browser/sync/glue/chrome_encryptor.h b/chrome/browser/sync/glue/chrome_encryptor.h
index 310c68e..60d3985 100644
--- a/chrome/browser/sync/glue/chrome_encryptor.h
+++ b/chrome/browser/sync/glue/chrome_encryptor.h
@@ -12,7 +12,7 @@
namespace browser_sync {
// Encryptor that uses the Chrome password manager's encryptor.
-class ChromeEncryptor : public csync::Encryptor {
+class ChromeEncryptor : public syncer::Encryptor {
public:
virtual ~ChromeEncryptor();
diff --git a/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h b/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h
index 350d45d..e78c75f 100644
--- a/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h
+++ b/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h
@@ -14,19 +14,19 @@
namespace browser_sync {
-// Chrome-specific implementation of csync::ExtensionsActivityMonitor.
+// Chrome-specific implementation of syncer::ExtensionsActivityMonitor.
//
-// As per the requirements of csync::ExtensionsActivityMonitor, all
+// As per the requirements of syncer::ExtensionsActivityMonitor, all
// overridden methods are thread-safe, although this class must be
// created and destroyed on the UI thread.
class ChromeExtensionsActivityMonitor
- : public csync::ExtensionsActivityMonitor,
+ : public syncer::ExtensionsActivityMonitor,
public content::NotificationObserver {
public:
ChromeExtensionsActivityMonitor();
virtual ~ChromeExtensionsActivityMonitor();
- // csync::ExtensionsActivityMonitor implementation.
+ // syncer::ExtensionsActivityMonitor implementation.
virtual void GetAndClearRecords(Records* buffer) OVERRIDE;
virtual void PutRecords(const Records& records) OVERRIDE;
diff --git a/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc b/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc
index 92bcf98..08d693d 100644
--- a/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc
+++ b/chrome/browser/sync/glue/chrome_extensions_activity_monitor_unittest.cc
@@ -83,7 +83,7 @@ class SyncChromeExtensionsActivityMonitorTest : public testing::Test {
// Fire some mutating bookmark API events with extension 1, then fire
// some mutating and non-mutating bookmark API events with extension
// 2. Only the mutating events should be recorded by the
-// csync::ExtensionsActivityMonitor.
+// syncer::ExtensionsActivityMonitor.
TEST_F(SyncChromeExtensionsActivityMonitorTest, Basic) {
FireBookmarksApiEvent<RemoveBookmarkFunction>(extension1_, 1);
FireBookmarksApiEvent<MoveBookmarkFunction>(extension1_, 1);
@@ -98,7 +98,7 @@ TEST_F(SyncChromeExtensionsActivityMonitorTest, Basic) {
FireBookmarksApiEvent<GetBookmarksFunction>(extension2_, 33);
const uint32 writes_by_extension2 = 8;
- csync::ExtensionsActivityMonitor::Records results;
+ syncer::ExtensionsActivityMonitor::Records results;
monitor_.GetAndClearRecords(&results);
EXPECT_EQ(2U, results.size());
@@ -116,7 +116,7 @@ TEST_F(SyncChromeExtensionsActivityMonitorTest, Put) {
FireBookmarksApiEvent<CreateBookmarkFunction>(extension1_, 5);
FireBookmarksApiEvent<MoveBookmarkFunction>(extension2_, 8);
- csync::ExtensionsActivityMonitor::Records results;
+ syncer::ExtensionsActivityMonitor::Records results;
monitor_.GetAndClearRecords(&results);
EXPECT_EQ(2U, results.size());
@@ -129,7 +129,7 @@ TEST_F(SyncChromeExtensionsActivityMonitorTest, Put) {
// Simulate a commit failure, which augments the active record set with the
// refugee records.
monitor_.PutRecords(results);
- csync::ExtensionsActivityMonitor::Records new_records;
+ syncer::ExtensionsActivityMonitor::Records new_records;
monitor_.GetAndClearRecords(&new_records);
EXPECT_EQ(2U, results.size());
@@ -145,7 +145,7 @@ TEST_F(SyncChromeExtensionsActivityMonitorTest, Put) {
TEST_F(SyncChromeExtensionsActivityMonitorTest, MultiGet) {
FireBookmarksApiEvent<CreateBookmarkFunction>(extension1_, 5);
- csync::ExtensionsActivityMonitor::Records results;
+ syncer::ExtensionsActivityMonitor::Records results;
monitor_.GetAndClearRecords(&results);
EXPECT_EQ(1U, results.size());
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc b/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
index cef791b..5b871de 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
@@ -16,7 +16,7 @@ namespace browser_sync {
ChromeSyncNotificationBridge::ChromeSyncNotificationBridge(
const Profile* profile)
: observers_(
- new ObserverListThreadSafe<csync::SyncNotifierObserver>()) {
+ new ObserverListThreadSafe<syncer::SyncNotifierObserver>()) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(profile);
registrar_.Add(this, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
@@ -34,12 +34,12 @@ void ChromeSyncNotificationBridge::UpdateEnabledTypes(
}
void ChromeSyncNotificationBridge::AddObserver(
- csync::SyncNotifierObserver* observer) {
+ syncer::SyncNotifierObserver* observer) {
observers_->AddObserver(observer);
}
void ChromeSyncNotificationBridge::RemoveObserver(
- csync::SyncNotifierObserver* observer) {
+ syncer::SyncNotifierObserver* observer) {
observers_->RemoveObserver(observer);
}
@@ -49,11 +49,11 @@ void ChromeSyncNotificationBridge::Observe(
const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- csync::IncomingNotificationSource notification_source;
+ syncer::IncomingNotificationSource notification_source;
if (type == chrome::NOTIFICATION_SYNC_REFRESH_LOCAL) {
- notification_source = csync::LOCAL_NOTIFICATION;
+ notification_source = syncer::LOCAL_NOTIFICATION;
} else if (type == chrome::NOTIFICATION_SYNC_REFRESH_REMOTE) {
- notification_source = csync::REMOTE_NOTIFICATION;
+ notification_source = syncer::REMOTE_NOTIFICATION;
} else {
NOTREACHED() << "Unexpected notification type:" << type;
return;
@@ -70,7 +70,7 @@ void ChromeSyncNotificationBridge::Observe(
}
observers_->Notify(
- &csync::SyncNotifierObserver::OnIncomingNotification,
+ &syncer::SyncNotifierObserver::OnIncomingNotification,
payload_map, notification_source);
}
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h b/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
index 0b6f12b..1d03ca9 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
@@ -14,7 +14,7 @@
class Profile;
-namespace csync {
+namespace syncer {
class SyncNotifierObserver;
} // namespace
@@ -35,8 +35,8 @@ class ChromeSyncNotificationBridge : public content::NotificationObserver {
void UpdateEnabledTypes(const syncable::ModelTypeSet enabled_types);
// These can be called on any thread.
- virtual void AddObserver(csync::SyncNotifierObserver* observer);
- virtual void RemoveObserver(csync::SyncNotifierObserver* observer);
+ virtual void AddObserver(syncer::SyncNotifierObserver* observer);
+ virtual void RemoveObserver(syncer::SyncNotifierObserver* observer);
// NotificationObserver implementation. Called on UI thread.
virtual void Observe(int type,
@@ -49,7 +49,7 @@ class ChromeSyncNotificationBridge : public content::NotificationObserver {
// Because [Add/Remove]Observer can be called from any thread, we need a
// thread-safe observerlist.
- scoped_refptr<ObserverListThreadSafe<csync::SyncNotifierObserver> >
+ scoped_refptr<ObserverListThreadSafe<syncer::SyncNotifierObserver> >
observers_;
};
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
index 8de6682..de6491d5 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
@@ -38,7 +38,7 @@ using content::BrowserThread;
// so we don't have to worry about possible thread safety issues within
// GTest/GMock.
class FakeSyncNotifierObserverIO
- : public csync::SyncNotifierObserver {
+ : public syncer::SyncNotifierObserver {
public:
FakeSyncNotifierObserverIO(
ChromeSyncNotificationBridge* bridge,
@@ -58,10 +58,10 @@ class FakeSyncNotifierObserverIO
// SyncNotifierObserver implementation.
virtual void OnIncomingNotification(
const syncable::ModelTypePayloadMap& type_payloads,
- csync::IncomingNotificationSource source) OVERRIDE {
+ syncer::IncomingNotificationSource source) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
notification_count_++;
- if (source != csync::LOCAL_NOTIFICATION) {
+ if (source != syncer::LOCAL_NOTIFICATION) {
LOG(ERROR) << "Received notification with wrong source.";
received_improper_notification_ = true;
}
@@ -74,7 +74,7 @@ class FakeSyncNotifierObserverIO
NOTREACHED();
}
virtual void OnNotificationsDisabled(
- csync::NotificationsDisabledReason reason) OVERRIDE {
+ syncer::NotificationsDisabledReason reason) OVERRIDE {
NOTREACHED();
}
@@ -192,10 +192,10 @@ class ChromeSyncNotificationBridgeTest : public testing::Test {
TEST_F(ChromeSyncNotificationBridgeTest, LocalNotification) {
syncable::ModelTypePayloadMap payload_map;
payload_map[syncable::SESSIONS] = "";
- StrictMock<csync::MockSyncNotifierObserver> observer;
+ StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
OnIncomingNotification(payload_map,
- csync::LOCAL_NOTIFICATION));
+ syncer::LOCAL_NOTIFICATION));
bridge_.AddObserver(&observer);
TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
payload_map);
@@ -209,10 +209,10 @@ TEST_F(ChromeSyncNotificationBridgeTest, LocalNotification) {
TEST_F(ChromeSyncNotificationBridgeTest, RemoteNotification) {
syncable::ModelTypePayloadMap payload_map;
payload_map[syncable::BOOKMARKS] = "";
- StrictMock<csync::MockSyncNotifierObserver> observer;
+ StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
OnIncomingNotification(payload_map,
- csync::REMOTE_NOTIFICATION));
+ syncer::REMOTE_NOTIFICATION));
bridge_.AddObserver(&observer);
TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_REMOTE,
payload_map);
@@ -229,10 +229,10 @@ TEST_F(ChromeSyncNotificationBridgeTest, LocalNotificationEmptyPayloadMap) {
const syncable::ModelTypePayloadMap enabled_types_payload_map =
syncable::ModelTypePayloadMapFromEnumSet(enabled_types, std::string());
- StrictMock<csync::MockSyncNotifierObserver> observer;
+ StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
OnIncomingNotification(enabled_types_payload_map,
- csync::LOCAL_NOTIFICATION));
+ syncer::LOCAL_NOTIFICATION));
bridge_.AddObserver(&observer);
// Set enabled types on the bridge.
bridge_.UpdateEnabledTypes(enabled_types);
@@ -251,10 +251,10 @@ TEST_F(ChromeSyncNotificationBridgeTest, RemoteNotificationEmptyPayloadMap) {
const syncable::ModelTypePayloadMap enabled_types_payload_map =
syncable::ModelTypePayloadMapFromEnumSet(enabled_types, std::string());
- StrictMock<csync::MockSyncNotifierObserver> observer;
+ StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
OnIncomingNotification(enabled_types_payload_map,
- csync::REMOTE_NOTIFICATION));
+ syncer::REMOTE_NOTIFICATION));
bridge_.AddObserver(&observer);
// Set enabled types on the bridge.
bridge_.UpdateEnabledTypes(enabled_types);
diff --git a/chrome/browser/sync/glue/data_type_controller.cc b/chrome/browser/sync/glue/data_type_controller.cc
index 044d296..e471fa5 100644
--- a/chrome/browser/sync/glue/data_type_controller.cc
+++ b/chrome/browser/sync/glue/data_type_controller.cc
@@ -13,12 +13,12 @@ bool DataTypeController::IsUnrecoverableResult(StartResult result) {
return (result == UNRECOVERABLE_ERROR);
}
-csync::SyncError DataTypeController::CreateAndUploadError(
+syncer::SyncError DataTypeController::CreateAndUploadError(
const tracked_objects::Location& location,
const std::string& message,
syncable::ModelType type) {
ChromeReportUnrecoverableError();
- return csync::SyncError(location, message, type);
+ return syncer::SyncError(location, message, type);
}
void DataTypeController::RecordUnrecoverableError(
diff --git a/chrome/browser/sync/glue/data_type_controller.h b/chrome/browser/sync/glue/data_type_controller.h
index 8c6a897..92fa111 100644
--- a/chrome/browser/sync/glue/data_type_controller.h
+++ b/chrome/browser/sync/glue/data_type_controller.h
@@ -18,7 +18,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
-namespace csync {
+namespace syncer {
class SyncError;
}
@@ -64,10 +64,10 @@ class DataTypeController
};
typedef base::Callback<void(StartResult,
- const csync::SyncError&)> StartCallback;
+ const syncer::SyncError&)> StartCallback;
typedef base::Callback<void(syncable::ModelType,
- csync::SyncError)> ModelLoadCallback;
+ syncer::SyncError)> ModelLoadCallback;
typedef std::map<syncable::ModelType,
scoped_refptr<DataTypeController> > TypeMap;
@@ -103,14 +103,14 @@ class DataTypeController
// The model safe group of this data type. This should reflect the
// thread that should be used to modify the data type's native
// model.
- virtual csync::ModelSafeGroup model_safe_group() const = 0;
+ virtual syncer::ModelSafeGroup model_safe_group() const = 0;
// Current state of the data type controller.
virtual State state() const = 0;
// Partial implementation of DataTypeErrorHandler.
// This is thread safe.
- virtual csync::SyncError CreateAndUploadError(
+ virtual syncer::SyncError CreateAndUploadError(
const tracked_objects::Location& location,
const std::string& message,
syncable::ModelType type) OVERRIDE;
diff --git a/chrome/browser/sync/glue/data_type_controller_mock.h b/chrome/browser/sync/glue/data_type_controller_mock.h
index 752ce3a..ef467c3 100644
--- a/chrome/browser/sync/glue/data_type_controller_mock.h
+++ b/chrome/browser/sync/glue/data_type_controller_mock.h
@@ -18,7 +18,7 @@ class StartCallbackMock {
virtual ~StartCallbackMock();
MOCK_METHOD2(Run, void(DataTypeController::StartResult result,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
};
class ModelLoadCallbackMock {
@@ -26,7 +26,7 @@ class ModelLoadCallbackMock {
ModelLoadCallbackMock();
virtual ~ModelLoadCallbackMock();
- MOCK_METHOD2(Run, void(syncable::ModelType, csync::SyncError));
+ MOCK_METHOD2(Run, void(syncable::ModelType, syncer::SyncError));
};
} // 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 962a85b9..90e5a1c 100644
--- a/chrome/browser/sync/glue/data_type_error_handler.h
+++ b/chrome/browser/sync/glue/data_type_error_handler.h
@@ -23,10 +23,10 @@ class DataTypeErrorHandler {
const tracked_objects::Location& from_here,
const std::string& message) = 0;
- // This will create a csync::SyncError object. This will also upload
+ // This will create a syncer::SyncError object. This will also upload
// a breakpad call stack to crash server. A sync error usually means
// that sync has to be disabled either for that type or completely.
- virtual csync::SyncError CreateAndUploadError(
+ virtual syncer::SyncError CreateAndUploadError(
const tracked_objects::Location& location,
const std::string& message,
syncable::ModelType type) = 0;
diff --git a/chrome/browser/sync/glue/data_type_error_handler_mock.h b/chrome/browser/sync/glue/data_type_error_handler_mock.h
index ec4c40d..1ef4e38 100644
--- a/chrome/browser/sync/glue/data_type_error_handler_mock.h
+++ b/chrome/browser/sync/glue/data_type_error_handler_mock.h
@@ -19,7 +19,7 @@ class DataTypeErrorHandlerMock : public DataTypeErrorHandler {
MOCK_METHOD2(OnSingleDatatypeUnrecoverableError,
void(const tracked_objects::Location&, const std::string&));
MOCK_METHOD3(CreateAndUploadError,
- csync::SyncError(const tracked_objects::Location&,
+ syncer::SyncError(const tracked_objects::Location&,
const std::string&,
syncable::ModelType));
diff --git a/chrome/browser/sync/glue/data_type_manager.cc b/chrome/browser/sync/glue/data_type_manager.cc
index 7d28363..86a44b09 100644
--- a/chrome/browser/sync/glue/data_type_manager.cc
+++ b/chrome/browser/sync/glue/data_type_manager.cc
@@ -19,7 +19,7 @@ DataTypeManager::ConfigureResult::ConfigureResult(ConfigureStatus status,
DataTypeManager::ConfigureResult::ConfigureResult(
ConfigureStatus status,
TypeSet requested_types,
- const std::list<csync::SyncError>& failed_data_types,
+ const std::list<syncer::SyncError>& failed_data_types,
syncable::ModelTypeSet waiting_to_start)
: status(status),
requested_types(requested_types),
diff --git a/chrome/browser/sync/glue/data_type_manager.h b/chrome/browser/sync/glue/data_type_manager.h
index fa4194b..1cee31d 100644
--- a/chrome/browser/sync/glue/data_type_manager.h
+++ b/chrome/browser/sync/glue/data_type_manager.h
@@ -59,14 +59,14 @@ class DataTypeManager {
TypeSet requested_types);
ConfigureResult(ConfigureStatus status,
TypeSet requested_types,
- const std::list<csync::SyncError>& failed_data_types,
+ const std::list<syncer::SyncError>& failed_data_types,
syncable::ModelTypeSet waiting_to_start);
~ConfigureResult();
ConfigureStatus status;
TypeSet requested_types;
// These types encountered a failure in association.
- std::list<csync::SyncError> failed_data_types;
+ std::list<syncer::SyncError> failed_data_types;
// List of types that failed to start association with in our alloted
// time period(see kDataTypeLoadWaitTimeInSeconds). We move
@@ -94,10 +94,10 @@ class DataTypeManager {
// progress. Configuration will be complete only when the
// desired_types supplied in the last call to Configure is achieved.
virtual void Configure(TypeSet desired_types,
- csync::ConfigureReason reason) = 0;
+ syncer::ConfigureReason reason) = 0;
virtual void ConfigureWithoutNigori(TypeSet desired_types,
- csync::ConfigureReason reason) = 0;
+ syncer::ConfigureReason reason) = 0;
// Synchronously stops all registered data types. If called after
// Configure() is called but before it finishes, it will abort the
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc
index e3e3db7..92f965a 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -35,7 +35,7 @@ DataTypeManagerImpl::DataTypeManagerImpl(
controllers_(controllers),
state_(DataTypeManager::STOPPED),
needs_reconfigure_(false),
- last_configure_reason_(csync::CONFIGURE_REASON_UNKNOWN),
+ last_configure_reason_(syncer::CONFIGURE_REASON_UNKNOWN),
last_nigori_state_(BackendDataTypeConfigurer::WITHOUT_NIGORI),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
model_association_manager_(controllers,
@@ -46,20 +46,20 @@ DataTypeManagerImpl::DataTypeManagerImpl(
DataTypeManagerImpl::~DataTypeManagerImpl() {}
void DataTypeManagerImpl::Configure(TypeSet desired_types,
- csync::ConfigureReason reason) {
+ syncer::ConfigureReason reason) {
ConfigureImpl(desired_types, reason,
BackendDataTypeConfigurer::WITH_NIGORI);
}
void DataTypeManagerImpl::ConfigureWithoutNigori(TypeSet desired_types,
- csync::ConfigureReason reason) {
+ syncer::ConfigureReason reason) {
ConfigureImpl(desired_types, reason,
BackendDataTypeConfigurer::WITHOUT_NIGORI);
}
void DataTypeManagerImpl::ConfigureImpl(
TypeSet desired_types,
- csync::ConfigureReason reason,
+ syncer::ConfigureReason reason,
BackendDataTypeConfigurer::NigoriState nigori_state) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (state_ == STOPPING) {
@@ -70,7 +70,7 @@ void DataTypeManagerImpl::ConfigureImpl(
if (state_ == CONFIGURED &&
last_requested_types_.Equals(desired_types) &&
- reason == csync::CONFIGURE_REASON_RECONFIGURATION) {
+ reason == syncer::CONFIGURE_REASON_RECONFIGURATION) {
// If we're already configured and the types haven't changed, we can exit
// out early.
NotifyStart();
@@ -94,7 +94,7 @@ void DataTypeManagerImpl::ConfigureImpl(
}
void DataTypeManagerImpl::Restart(
- csync::ConfigureReason reason,
+ syncer::ConfigureReason reason,
BackendDataTypeConfigurer::NigoriState nigori_state) {
DVLOG(1) << "Restarting...";
model_association_manager_.Initialize(last_requested_types_);
@@ -160,7 +160,7 @@ bool DataTypeManagerImpl::ProcessReconfigure() {
last_nigori_state_));
needs_reconfigure_ = false;
- last_configure_reason_ = csync::CONFIGURE_REASON_UNKNOWN;
+ last_configure_reason_ = syncer::CONFIGURE_REASON_UNKNOWN;
last_nigori_state_ = BackendDataTypeConfigurer::WITHOUT_NIGORI;
return true;
}
@@ -197,7 +197,7 @@ void DataTypeManagerImpl::DownloadReady(
std::string error_msg =
"Configuration failed for types " +
syncable::ModelTypeSetToString(failed_configuration_types);
- csync::SyncError error(FROM_HERE, error_msg,
+ syncer::SyncError error(FROM_HERE, error_msg,
failed_configuration_types.First().Get());
Abort(UNRECOVERABLE_ERROR, error);
return;
@@ -212,7 +212,7 @@ void DataTypeManagerImpl::OnModelAssociationDone(
if (result.status == ABORTED || result.status == UNRECOVERABLE_ERROR) {
Abort(result.status, result.failed_data_types.size() >= 1 ?
result.failed_data_types.front() :
- csync::SyncError());
+ syncer::SyncError());
return;
}
@@ -248,7 +248,7 @@ void DataTypeManagerImpl::OnTypesLoaded() {
return;
}
- Restart(csync::CONFIGURE_REASON_RECONFIGURATION,
+ Restart(syncer::CONFIGURE_REASON_RECONFIGURATION,
last_nigori_state_);
}
@@ -274,7 +274,7 @@ void DataTypeManagerImpl::Stop() {
// If Stop() is called while waiting for download, cancel all
// outstanding tasks.
weak_ptr_factory_.InvalidateWeakPtrs();
- Abort(ABORTED, csync::SyncError());
+ Abort(ABORTED, syncer::SyncError());
return;
}
@@ -291,10 +291,10 @@ void DataTypeManagerImpl::FinishStop() {
}
void DataTypeManagerImpl::Abort(ConfigureStatus status,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK_NE(OK, status);
FinishStop();
- std::list<csync::SyncError> error_list;
+ std::list<syncer::SyncError> error_list;
if (error.IsSet())
error_list.push_back(error);
ConfigureResult result(status,
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.h b/chrome/browser/sync/glue/data_type_manager_impl.h
index 88a0942..cf65b43 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.h
+++ b/chrome/browser/sync/glue/data_type_manager_impl.h
@@ -32,12 +32,12 @@ class DataTypeManagerImpl : public DataTypeManager,
// DataTypeManager interface.
virtual void Configure(TypeSet desired_types,
- csync::ConfigureReason reason) OVERRIDE;
+ syncer::ConfigureReason reason) OVERRIDE;
// Needed only for backend migration.
virtual void ConfigureWithoutNigori(
TypeSet desired_types,
- csync::ConfigureReason reason) OVERRIDE;
+ syncer::ConfigureReason reason) OVERRIDE;
virtual void Stop() OVERRIDE;
virtual State state() const OVERRIDE;
@@ -57,13 +57,13 @@ class DataTypeManagerImpl : public DataTypeManager,
// Stops all data types.
void FinishStop();
void Abort(ConfigureStatus status,
- const csync::SyncError& error);
+ const syncer::SyncError& error);
// If there's a pending reconfigure, processes it and returns true.
// Otherwise, returns false.
bool ProcessReconfigure();
- void Restart(csync::ConfigureReason reason,
+ void Restart(syncer::ConfigureReason reason,
BackendDataTypeConfigurer::NigoriState nigori_state);
void DownloadReady(syncable::ModelTypeSet failed_configuration_types);
@@ -80,7 +80,7 @@ class DataTypeManagerImpl : public DataTypeManager,
void ConfigureImpl(
TypeSet desired_types,
- csync::ConfigureReason reason,
+ syncer::ConfigureReason reason,
BackendDataTypeConfigurer::NigoriState nigori_state);
BackendDataTypeConfigurer* configurer_;
@@ -97,7 +97,7 @@ class DataTypeManagerImpl : public DataTypeManager,
// The reason for the last reconfigure attempt. Not this will be set to a
// valid value only when |needs_reconfigure_| is set.
- csync::ConfigureReason last_configure_reason_;
+ syncer::ConfigureReason last_configure_reason_;
// The value of |nigori_state| on the last reconfigure attempt.
// Like |last_configure_reason_|, set to a valid value only when
// |needs_reconfigure_| is set.
@@ -115,7 +115,7 @@ class DataTypeManagerImpl : public DataTypeManager,
// Collects the list of errors resulting from failing to start a type. This
// would eventually be sent to the listeners after all the types have
// been given a chance to start.
- std::list<csync::SyncError> failed_datatypes_info_;
+ std::list<syncer::SyncError> failed_datatypes_info_;
ModelAssociationManager model_association_manager_;
DISALLOW_COPY_AND_ASSIGN(DataTypeManagerImpl);
diff --git a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
index 16470d4..3b4b97e 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
@@ -41,7 +41,7 @@ class FakeBackendDataTypeConfigurer : public BackendDataTypeConfigurer {
virtual ~FakeBackendDataTypeConfigurer() {}
virtual void ConfigureDataTypes(
- csync::ConfigureReason reason,
+ syncer::ConfigureReason reason,
ModelTypeSet types_to_add,
ModelTypeSet types_to_remove,
NigoriState nigori_state,
@@ -118,8 +118,8 @@ class SyncDataTypeManagerImplTest
// Configure the given DTM with the given desired types.
void Configure(DataTypeManagerImpl* dtm,
const DataTypeManager::TypeSet& desired_types) {
- const csync::ConfigureReason kReason =
- csync::CONFIGURE_REASON_RECONFIGURATION;
+ const syncer::ConfigureReason kReason =
+ syncer::CONFIGURE_REASON_RECONFIGURATION;
if (GetNigoriState() == BackendDataTypeConfigurer::WITH_NIGORI) {
dtm->Configure(desired_types, kReason);
} else {
diff --git a/chrome/browser/sync/glue/data_type_manager_mock.h b/chrome/browser/sync/glue/data_type_manager_mock.h
index e26dcc09..e80e7ed 100644
--- a/chrome/browser/sync/glue/data_type_manager_mock.h
+++ b/chrome/browser/sync/glue/data_type_manager_mock.h
@@ -16,19 +16,19 @@
ACTION_P2(InvokeCallback, datatype, callback_result) {
if (callback_result != browser_sync::DataTypeController::OK) {
- csync::SyncError error(FROM_HERE, "Error message", datatype);
+ syncer::SyncError error(FROM_HERE, "Error message", datatype);
arg0.Run(callback_result, error);
} else {
- arg0.Run(callback_result, csync::SyncError());
+ arg0.Run(callback_result, syncer::SyncError());
}
}
ACTION_P3(InvokeCallbackPointer, callback, datatype, callback_result) {
if (callback_result != browser_sync::DataTypeController::OK) {
- csync::SyncError error(FROM_HERE, "Error message", datatype);
+ syncer::SyncError error(FROM_HERE, "Error message", datatype);
callback.Run(callback_result, error);
} else {
- callback.Run(callback_result, csync::SyncError());
+ callback.Run(callback_result, syncer::SyncError());
}
}
@@ -53,9 +53,9 @@ class DataTypeManagerMock : public DataTypeManager {
DataTypeManagerMock();
virtual ~DataTypeManagerMock();
- MOCK_METHOD2(Configure, void(TypeSet, csync::ConfigureReason));
+ MOCK_METHOD2(Configure, void(TypeSet, syncer::ConfigureReason));
MOCK_METHOD2(ConfigureWithoutNigori,
- void(TypeSet, csync::ConfigureReason));
+ void(TypeSet, syncer::ConfigureReason));
MOCK_METHOD0(Stop, void());
MOCK_METHOD0(controllers, const DataTypeController::TypeMap&());
MOCK_CONST_METHOD0(state, State());
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 c1362bd..7b4d11c 100644
--- a/chrome/browser/sync/glue/extension_setting_data_type_controller.cc
+++ b/chrome/browser/sync/glue/extension_setting_data_type_controller.cc
@@ -38,9 +38,9 @@ syncable::ModelType ExtensionSettingDataTypeController::type() const {
return type_;
}
-csync::ModelSafeGroup
+syncer::ModelSafeGroup
ExtensionSettingDataTypeController::model_safe_group() const {
- return csync::GROUP_FILE;
+ return syncer::GROUP_FILE;
}
ExtensionSettingDataTypeController::~ExtensionSettingDataTypeController() {}
diff --git a/chrome/browser/sync/glue/extension_setting_data_type_controller.h b/chrome/browser/sync/glue/extension_setting_data_type_controller.h
index d1f68b8..c578c20 100644
--- a/chrome/browser/sync/glue/extension_setting_data_type_controller.h
+++ b/chrome/browser/sync/glue/extension_setting_data_type_controller.h
@@ -15,7 +15,7 @@ class Profile;
class ProfileSyncComponentsFactory;
class ProfileSyncService;
-namespace csync {
+namespace syncer {
class SyncableService;
}
@@ -37,7 +37,7 @@ class ExtensionSettingDataTypeController
// NonFrontendDataTypeController implementation
virtual syncable::ModelType type() const OVERRIDE;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
private:
virtual ~ExtensionSettingDataTypeController();
diff --git a/chrome/browser/sync/glue/fake_data_type_controller.cc b/chrome/browser/sync/glue/fake_data_type_controller.cc
index eca4278..28b5611 100644
--- a/chrome/browser/sync/glue/fake_data_type_controller.cc
+++ b/chrome/browser/sync/glue/fake_data_type_controller.cc
@@ -28,7 +28,7 @@ void FakeDataTypeController::LoadModels(
}
if (model_load_delayed_ == false) {
- model_load_callback.Run(type(), csync::SyncError());
+ model_load_callback.Run(type(), syncer::SyncError());
state_ = MODEL_LOADED;
} else {
model_load_callback_ = model_load_callback;
@@ -57,7 +57,7 @@ void FakeDataTypeController::FinishStart(StartResult result) {
}
// Set |state_| first below since the callback may call state().
- csync::SyncError error;
+ syncer::SyncError error;
if (result <= OK_FIRST_RUN) {
state_ = RUNNING;
} else if (result == ASSOCIATION_FAILED) {
@@ -83,7 +83,7 @@ void FakeDataTypeController::Stop() {
// The DTM still expects |last_start_callback_| to be called back.
if (!last_start_callback_.is_null()) {
- csync::SyncError error(FROM_HERE, "Fake error", type_);
+ syncer::SyncError error(FROM_HERE, "Fake error", type_);
last_start_callback_.Run(ABORTED, error);
}
}
@@ -97,9 +97,9 @@ std::string FakeDataTypeController::name() const {
}
// This isn't called by the DTM.
-csync::ModelSafeGroup FakeDataTypeController::model_safe_group() const {
+syncer::ModelSafeGroup FakeDataTypeController::model_safe_group() const {
ADD_FAILURE();
- return csync::GROUP_PASSIVE;
+ return syncer::GROUP_PASSIVE;
}
DataTypeController::State FakeDataTypeController::state() const {
@@ -124,7 +124,7 @@ void FakeDataTypeController::SetDelayModelLoad() {
void FakeDataTypeController::SimulateModelLoadFinishing() {
ModelLoadCallback model_load_callback = model_load_callback_;
- model_load_callback.Run(type(), csync::SyncError());
+ model_load_callback.Run(type(), syncer::SyncError());
}
} // namespace browser_sync
diff --git a/chrome/browser/sync/glue/fake_data_type_controller.h b/chrome/browser/sync/glue/fake_data_type_controller.h
index e0161dc..173e9f9 100644
--- a/chrome/browser/sync/glue/fake_data_type_controller.h
+++ b/chrome/browser/sync/glue/fake_data_type_controller.h
@@ -38,7 +38,7 @@ class FakeDataTypeController : public DataTypeController {
virtual std::string name() const OVERRIDE;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
virtual State state() const OVERRIDE;
diff --git a/chrome/browser/sync/glue/fake_generic_change_processor.cc b/chrome/browser/sync/glue/fake_generic_change_processor.cc
index 5ffb7bd..47a2228 100644
--- a/chrome/browser/sync/glue/fake_generic_change_processor.cc
+++ b/chrome/browser/sync/glue/fake_generic_change_processor.cc
@@ -12,7 +12,7 @@ namespace browser_sync {
FakeGenericChangeProcessor::FakeGenericChangeProcessor()
: GenericChangeProcessor(
- NULL, base::WeakPtr<csync::SyncableService>(), NULL),
+ NULL, base::WeakPtr<syncer::SyncableService>(), NULL),
sync_model_has_user_created_nodes_(true),
sync_model_has_user_created_nodes_success_(true),
crypto_ready_if_necessary_(true),
@@ -21,11 +21,11 @@ FakeGenericChangeProcessor::FakeGenericChangeProcessor()
FakeGenericChangeProcessor::~FakeGenericChangeProcessor() {}
void FakeGenericChangeProcessor::set_process_sync_changes_error(
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
process_sync_changes_error_ = error;
}
void FakeGenericChangeProcessor::set_get_sync_data_for_type_error(
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
get_sync_data_for_type_error_ = error;
}
void FakeGenericChangeProcessor::set_sync_model_has_user_created_nodes(
@@ -41,14 +41,14 @@ void FakeGenericChangeProcessor::set_crypto_ready_if_necessary(
crypto_ready_if_necessary_ = crypto_ready;
}
-csync::SyncError FakeGenericChangeProcessor::ProcessSyncChanges(
+syncer::SyncError FakeGenericChangeProcessor::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
return process_sync_changes_error_;
}
-csync::SyncError FakeGenericChangeProcessor::GetSyncDataForType(
- syncable::ModelType type, csync::SyncDataList* current_sync_data) {
+syncer::SyncError FakeGenericChangeProcessor::GetSyncDataForType(
+ syncable::ModelType type, syncer::SyncDataList* current_sync_data) {
type_ = type;
return get_sync_data_for_type_error_;
}
diff --git a/chrome/browser/sync/glue/fake_generic_change_processor.h b/chrome/browser/sync/glue/fake_generic_change_processor.h
index 228b743..13684db 100644
--- a/chrome/browser/sync/glue/fake_generic_change_processor.h
+++ b/chrome/browser/sync/glue/fake_generic_change_processor.h
@@ -19,26 +19,26 @@ class FakeGenericChangeProcessor : public GenericChangeProcessor {
virtual ~FakeGenericChangeProcessor();
// Setters for GenericChangeProcessor implementation results.
- void set_process_sync_changes_error(const csync::SyncError& error);
- void set_get_sync_data_for_type_error(const csync::SyncError& error);
+ void set_process_sync_changes_error(const syncer::SyncError& error);
+ void set_get_sync_data_for_type_error(const syncer::SyncError& error);
void set_sync_model_has_user_created_nodes(bool has_nodes);
void set_sync_model_has_user_created_nodes_success(bool success);
void set_crypto_ready_if_necessary(bool crypto_ready);
// GenericChangeProcessor implementations.
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
- virtual csync::SyncError GetSyncDataForType(
+ const syncer::SyncChangeList& change_list) OVERRIDE;
+ virtual syncer::SyncError GetSyncDataForType(
syncable::ModelType type,
- csync::SyncDataList* current_sync_data) OVERRIDE;
+ syncer::SyncDataList* current_sync_data) OVERRIDE;
virtual bool SyncModelHasUserCreatedNodes(syncable::ModelType type,
bool* has_nodes) OVERRIDE;
virtual bool CryptoReadyIfNecessary(syncable::ModelType type) OVERRIDE;
private:
- csync::SyncError process_sync_changes_error_;
- csync::SyncError get_sync_data_for_type_error_;
+ syncer::SyncError process_sync_changes_error_;
+ syncer::SyncError get_sync_data_for_type_error_;
bool sync_model_has_user_created_nodes_;
bool sync_model_has_user_created_nodes_success_;
bool crypto_ready_if_necessary_;
diff --git a/chrome/browser/sync/glue/frontend_data_type_controller.cc b/chrome/browser/sync/glue/frontend_data_type_controller.cc
index 8478b71..82fb364 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/frontend_data_type_controller.cc
@@ -40,7 +40,7 @@ void FrontendDataTypeController::LoadModels(
DCHECK(!model_load_callback.is_null());
if (state_ != NOT_RUNNING) {
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"Model already running",
type()));
return;
@@ -69,7 +69,7 @@ void FrontendDataTypeController::OnModelLoaded() {
state_ = MODEL_LOADED;
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), csync::SyncError());
+ model_load_callback.Run(type(), syncer::SyncError());
}
void FrontendDataTypeController::StartAssociating(
@@ -110,7 +110,7 @@ void FrontendDataTypeController::Stop() {
sync_service_->DeactivateDataType(type());
if (model_associator()) {
- csync::SyncError error; // Not used.
+ syncer::SyncError error; // Not used.
error = model_associator()->DisassociateModels();
}
@@ -120,9 +120,9 @@ void FrontendDataTypeController::Stop() {
state_ = NOT_RUNNING;
}
-csync::ModelSafeGroup FrontendDataTypeController::model_safe_group()
+syncer::ModelSafeGroup FrontendDataTypeController::model_safe_group()
const {
- return csync::GROUP_UI;
+ return syncer::GROUP_UI;
}
std::string FrontendDataTypeController::name() const {
@@ -162,19 +162,19 @@ bool FrontendDataTypeController::Associate() {
DCHECK_EQ(state_, ASSOCIATING);
CreateSyncComponents();
if (!model_associator()->CryptoReadyIfNecessary()) {
- StartFailed(NEEDS_CRYPTO, csync::SyncError());
+ StartFailed(NEEDS_CRYPTO, syncer::SyncError());
return false;
}
bool sync_has_nodes = false;
if (!model_associator()->SyncModelHasUserCreatedNodes(&sync_has_nodes)) {
- csync::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
+ syncer::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return false;
}
base::TimeTicks start_time = base::TimeTicks::Now();
- csync::SyncError error;
+ syncer::SyncError error;
error = model_associator()->AssociateModels();
// TODO(lipalani): crbug.com/122690 - handle abort.
RecordAssociationTime(base::TimeTicks::Now() - start_time);
@@ -209,7 +209,7 @@ void FrontendDataTypeController::CleanUp() {
}
void FrontendDataTypeController::StartFailed(StartResult result,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (IsUnrecoverableResult(result))
@@ -237,7 +237,7 @@ void FrontendDataTypeController::AbortModelLoad() {
state_ = NOT_RUNNING;
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"Aborted",
type()));
}
@@ -250,7 +250,7 @@ void FrontendDataTypeController::FinishStart(StartResult result) {
// confused by the non-NULL start_callback_.
StartCallback callback = start_callback_;
start_callback_.Reset();
- callback.Run(result, csync::SyncError());
+ callback.Run(result, syncer::SyncError());
}
void FrontendDataTypeController::RecordAssociationTime(base::TimeDelta time) {
diff --git a/chrome/browser/sync/glue/frontend_data_type_controller.h b/chrome/browser/sync/glue/frontend_data_type_controller.h
index f55b59b..4b34bbb 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller.h
+++ b/chrome/browser/sync/glue/frontend_data_type_controller.h
@@ -22,7 +22,7 @@ namespace base {
class TimeDelta;
}
-namespace csync {
+namespace syncer {
class SyncError;
}
@@ -39,7 +39,7 @@ class ChangeProcessor;
// syncable::ModelType type() const
// void CreateSyncComponents();
// NOTE: This class is deprecated! New sync datatypes should be using the
-// csync::SyncableService API and the UIDataTypeController instead.
+// syncer::SyncableService API and the UIDataTypeController instead.
// TODO(zea): Delete this once all types are on the new API.
class FrontendDataTypeController : public DataTypeController {
public:
@@ -54,7 +54,7 @@ class FrontendDataTypeController : public DataTypeController {
virtual void StartAssociating(const StartCallback& start_callback) OVERRIDE;
virtual void Stop() OVERRIDE;
virtual syncable::ModelType type() const = 0;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
virtual std::string name() const OVERRIDE;
virtual State state() const OVERRIDE;
@@ -89,7 +89,7 @@ class FrontendDataTypeController : public DataTypeController {
virtual void CleanUpState();
// Helper methods for cleaning up state an running the start callback.
- virtual void StartFailed(StartResult result, const csync::SyncError& error);
+ virtual void StartFailed(StartResult result, const syncer::SyncError& error);
virtual void FinishStart(StartResult result);
// Record association time.
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 82f843c..cbc5916 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller_mock.h
+++ b/chrome/browser/sync/glue/frontend_data_type_controller_mock.h
@@ -26,7 +26,7 @@ class FrontendDataTypeControllerMock : public FrontendDataTypeController {
MOCK_METHOD0(enabled, bool());
MOCK_CONST_METHOD0(type, syncable::ModelType());
MOCK_CONST_METHOD0(name, std::string());
- MOCK_CONST_METHOD0(model_safe_group, csync::ModelSafeGroup());
+ MOCK_CONST_METHOD0(model_safe_group, syncer::ModelSafeGroup());
MOCK_CONST_METHOD0(state, State());
MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&,
const std::string&));
@@ -36,7 +36,7 @@ class FrontendDataTypeControllerMock : public FrontendDataTypeController {
MOCK_METHOD0(Associate, bool());
MOCK_METHOD0(CreateSyncComponents, void());
MOCK_METHOD2(StartFailed, void(StartResult result,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
MOCK_METHOD1(FinishStart, void(StartResult result));
MOCK_METHOD0(CleanUpState, void());
MOCK_CONST_METHOD0(model_associator, AssociatorInterface*());
diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
index f0e6747..ac5391f 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc
@@ -113,7 +113,7 @@ class SyncFrontendDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
}
@@ -126,7 +126,7 @@ class SyncFrontendDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*dtc_mock_, CleanUpState());
EXPECT_CALL(service_, DeactivateDataType(_));
EXPECT_CALL(*model_associator_, DisassociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
}
void SetStartFailExpectations(DataTypeController::StartResult result) {
@@ -179,7 +179,7 @@ TEST_F(SyncFrontendDataTypeControllerTest, StartFirstRun) {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(false), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetActivateExpectations(DataTypeController::OK_FIRST_RUN);
EXPECT_EQ(DataTypeController::NOT_RUNNING, frontend_dtc_->state());
@@ -207,7 +207,7 @@ TEST_F(SyncFrontendDataTypeControllerTest, StartAssociationFailed) {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(csync::SyncError(FROM_HERE,
+ WillOnce(Return(syncer::SyncError(FROM_HERE,
"error",
syncable::PREFERENCES)));
diff --git a/chrome/browser/sync/glue/generic_change_processor.cc b/chrome/browser/sync/glue/generic_change_processor.cc
index 640df3a..a12df1c 100644
--- a/chrome/browser/sync/glue/generic_change_processor.cc
+++ b/chrome/browser/sync/glue/generic_change_processor.cc
@@ -26,8 +26,8 @@ namespace browser_sync {
GenericChangeProcessor::GenericChangeProcessor(
DataTypeErrorHandler* error_handler,
- const base::WeakPtr<csync::SyncableService>& local_service,
- csync::UserShare* user_share)
+ const base::WeakPtr<syncer::SyncableService>& local_service,
+ syncer::UserShare* user_share)
: ChangeProcessor(error_handler),
local_service_(local_service),
share_handle_(user_share) {
@@ -39,24 +39,25 @@ GenericChangeProcessor::~GenericChangeProcessor() {
}
void GenericChangeProcessor::ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) {
DCHECK(CalledOnValidThread());
DCHECK(running());
DCHECK(syncer_changes_.empty());
- for (csync::ChangeRecordList::const_iterator it =
+ for (syncer::ChangeRecordList::const_iterator it =
changes.Get().begin(); it != changes.Get().end(); ++it) {
- if (it->action == csync::ChangeRecord::ACTION_DELETE) {
+ if (it->action == syncer::ChangeRecord::ACTION_DELETE) {
syncer_changes_.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE,
- csync::SyncData::CreateRemoteData(it->id, it->specifics)));
+ syncer::SyncChange(
+ syncer::SyncChange::ACTION_DELETE,
+ syncer::SyncData::CreateRemoteData(it->id, it->specifics)));
} else {
- csync::SyncChange::SyncChangeType action =
- (it->action == csync::ChangeRecord::ACTION_ADD) ?
- csync::SyncChange::ACTION_ADD : csync::SyncChange::ACTION_UPDATE;
+ syncer::SyncChange::SyncChangeType action =
+ (it->action == syncer::ChangeRecord::ACTION_ADD) ?
+ syncer::SyncChange::ACTION_ADD : syncer::SyncChange::ACTION_UPDATE;
// Need to load specifics from node.
- csync::ReadNode read_node(trans);
- if (read_node.InitByIdLookup(it->id) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode read_node(trans);
+ if (read_node.InitByIdLookup(it->id) != syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(
FROM_HERE,
"Failed to look up data for received change with id " +
@@ -64,8 +65,8 @@ void GenericChangeProcessor::ApplyChangesFromSyncModel(
return;
}
syncer_changes_.push_back(
- csync::SyncChange(action,
- csync::SyncData::CreateRemoteData(
+ syncer::SyncChange(action,
+ syncer::SyncData::CreateRemoteData(
it->id, read_node.GetEntitySpecifics())));
}
}
@@ -79,12 +80,12 @@ void GenericChangeProcessor::CommitChangesFromSyncModel() {
return;
if (!local_service_) {
syncable::ModelType type = syncer_changes_[0].sync_data().GetDataType();
- csync::SyncError error(FROM_HERE, "Local service destroyed.", type);
+ syncer::SyncError error(FROM_HERE, "Local service destroyed.", type);
error_handler()->OnSingleDatatypeUnrecoverableError(error.location(),
error.message());
return;
}
- csync::SyncError error = local_service_->ProcessSyncChanges(FROM_HERE,
+ syncer::SyncError error = local_service_->ProcessSyncChanges(FROM_HERE,
syncer_changes_);
syncer_changes_.clear();
if (error.IsSet()) {
@@ -93,16 +94,16 @@ void GenericChangeProcessor::CommitChangesFromSyncModel() {
}
}
-csync::SyncError GenericChangeProcessor::GetSyncDataForType(
+syncer::SyncError GenericChangeProcessor::GetSyncDataForType(
syncable::ModelType type,
- csync::SyncDataList* current_sync_data) {
+ syncer::SyncDataList* current_sync_data) {
DCHECK(CalledOnValidThread());
std::string type_name = syncable::ModelTypeToString(type);
- csync::ReadTransaction trans(FROM_HERE, share_handle());
- csync::ReadNode root(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, share_handle());
+ syncer::ReadNode root(&trans);
if (root.InitByTagLookup(syncable::ModelTypeToRootTag(type)) !=
- csync::BaseNode::INIT_OK) {
- csync::SyncError error(FROM_HERE,
+ syncer::BaseNode::INIT_OK) {
+ syncer::SyncError error(FROM_HERE,
"Server did not create the top-level " + type_name +
" node. We might be running against an out-of-date server.",
type);
@@ -113,20 +114,20 @@ csync::SyncError GenericChangeProcessor::GetSyncDataForType(
DCHECK_NE(type, syncable::BOOKMARKS);
int64 sync_child_id = root.GetFirstChildId();
- while (sync_child_id != csync::kInvalidId) {
- csync::ReadNode sync_child_node(&trans);
+ while (sync_child_id != syncer::kInvalidId) {
+ syncer::ReadNode sync_child_node(&trans);
if (sync_child_node.InitByIdLookup(sync_child_id) !=
- csync::BaseNode::INIT_OK) {
- csync::SyncError error(FROM_HERE,
+ syncer::BaseNode::INIT_OK) {
+ syncer::SyncError error(FROM_HERE,
"Failed to fetch child node for type " + type_name + ".",
type);
return error;
}
- current_sync_data->push_back(csync::SyncData::CreateRemoteData(
+ current_sync_data->push_back(syncer::SyncData::CreateRemoteData(
sync_child_node.GetId(), sync_child_node.GetEntitySpecifics()));
sync_child_id = sync_child_node.GetSuccessorId();
}
- return csync::SyncError();
+ return syncer::SyncError();
}
namespace {
@@ -136,15 +137,15 @@ namespace {
// modifying any code around an OnSingleDatatypeUnrecoverableError call, else
// the compiler attempts to merge it with other calls, losing useful information
// in breakpad uploads.
-csync::SyncError LogLookupFailure(
- csync::BaseNode::InitByLookupResult lookup_result,
+syncer::SyncError LogLookupFailure(
+ syncer::BaseNode::InitByLookupResult lookup_result,
const tracked_objects::Location& from_here,
const std::string& error_prefix,
syncable::ModelType type,
DataTypeErrorHandler* error_handler) {
switch (lookup_result) {
- case csync::BaseNode::INIT_FAILED_ENTRY_NOT_GOOD: {
- csync::SyncError error;
+ case syncer::BaseNode::INIT_FAILED_ENTRY_NOT_GOOD: {
+ syncer::SyncError error;
error.Reset(from_here,
error_prefix +
"could not find entry matching the lookup criteria.",
@@ -154,24 +155,24 @@ csync::SyncError LogLookupFailure(
LOG(ERROR) << "Delete: Bad entry.";
return error;
}
- case csync::BaseNode::INIT_FAILED_ENTRY_IS_DEL: {
- csync::SyncError error;
+ case syncer::BaseNode::INIT_FAILED_ENTRY_IS_DEL: {
+ syncer::SyncError error;
error.Reset(from_here, error_prefix + "entry is already deleted.", type);
error_handler->OnSingleDatatypeUnrecoverableError(FROM_HERE,
error.message());
LOG(ERROR) << "Delete: Deleted entry.";
return error;
}
- case csync::BaseNode::INIT_FAILED_DECRYPT_IF_NECESSARY: {
- csync::SyncError error;
+ case syncer::BaseNode::INIT_FAILED_DECRYPT_IF_NECESSARY: {
+ syncer::SyncError error;
error.Reset(from_here, error_prefix + "unable to decrypt", type);
error_handler->OnSingleDatatypeUnrecoverableError(FROM_HERE,
error.message());
LOG(ERROR) << "Delete: Undecryptable entry.";
return error;
}
- case csync::BaseNode::INIT_FAILED_PRECONDITION: {
- csync::SyncError error;
+ case syncer::BaseNode::INIT_FAILED_PRECONDITION: {
+ syncer::SyncError error;
error.Reset(from_here,
error_prefix + "a precondition was not met for calling init.",
type);
@@ -181,7 +182,7 @@ csync::SyncError LogLookupFailure(
return error;
}
default: {
- csync::SyncError error;
+ syncer::SyncError error;
// Should have listed all the possible error cases above.
error.Reset(from_here, error_prefix + "unknown error", type);
error_handler->OnSingleDatatypeUnrecoverableError(FROM_HERE,
@@ -192,16 +193,16 @@ csync::SyncError LogLookupFailure(
}
}
-csync::SyncError AttemptDelete(const csync::SyncChange& change,
+syncer::SyncError AttemptDelete(const syncer::SyncChange& change,
syncable::ModelType type,
const std::string& type_str,
- csync::WriteNode* node,
+ syncer::WriteNode* node,
DataTypeErrorHandler* error_handler) {
- DCHECK_EQ(change.change_type(), csync::SyncChange::ACTION_DELETE);
+ DCHECK_EQ(change.change_type(), syncer::SyncChange::ACTION_DELETE);
if (change.sync_data().IsLocal()) {
const std::string& tag = change.sync_data().GetTag();
if (tag.empty()) {
- csync::SyncError error(
+ syncer::SyncError error(
FROM_HERE,
"Failed to delete " + type_str + " node. Local data, empty tag.",
type);
@@ -211,18 +212,18 @@ csync::SyncError AttemptDelete(const csync::SyncChange& change,
return error;
}
- csync::BaseNode::InitByLookupResult result =
+ syncer::BaseNode::InitByLookupResult result =
node->InitByClientTagLookup(change.sync_data().GetDataType(), tag);
- if (result != csync::BaseNode::INIT_OK) {
+ if (result != syncer::BaseNode::INIT_OK) {
return LogLookupFailure(
result, FROM_HERE,
"Failed to delete " + type_str + " node. Local data, ",
type, error_handler);
}
} else {
- csync::BaseNode::InitByLookupResult result =
+ syncer::BaseNode::InitByLookupResult result =
node->InitByIdLookup(change.sync_data().GetRemoteId());
- if (result != csync::BaseNode::INIT_OK) {
+ if (result != syncer::BaseNode::INIT_OK) {
return LogLookupFailure(
result, FROM_HERE,
"Failed to delete " + type_str + " node. Non-local data, ",
@@ -230,7 +231,7 @@ csync::SyncError AttemptDelete(const csync::SyncChange& change,
}
}
node->Remove();
- return csync::SyncError();
+ return syncer::SyncError();
}
} // namespace
@@ -239,35 +240,36 @@ csync::SyncError AttemptDelete(const csync::SyncChange& change,
// modifying any code around an OnSingleDatatypeUnrecoverableError call, else
// the compiler attempts to merge it with other calls, losing useful information
// in breakpad uploads.
-csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
+syncer::SyncError GenericChangeProcessor::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& list_of_changes) {
+ const syncer::SyncChangeList& list_of_changes) {
DCHECK(CalledOnValidThread());
- csync::WriteTransaction trans(from_here, share_handle());
+ syncer::WriteTransaction trans(from_here, share_handle());
- for (csync::SyncChangeList::const_iterator iter = list_of_changes.begin();
+ for (syncer::SyncChangeList::const_iterator iter = list_of_changes.begin();
iter != list_of_changes.end();
++iter) {
- const csync::SyncChange& change = *iter;
+ const syncer::SyncChange& change = *iter;
DCHECK_NE(change.sync_data().GetDataType(), syncable::UNSPECIFIED);
syncable::ModelType type = change.sync_data().GetDataType();
std::string type_str = syncable::ModelTypeToString(type);
- csync::WriteNode sync_node(&trans);
- if (change.change_type() == csync::SyncChange::ACTION_DELETE) {
- csync::SyncError error = AttemptDelete(change, type, type_str, &sync_node,
- error_handler());
+ syncer::WriteNode sync_node(&trans);
+ if (change.change_type() == syncer::SyncChange::ACTION_DELETE) {
+ syncer::SyncError error =
+ AttemptDelete(change, type, type_str, &sync_node,
+ error_handler());
if (error.IsSet()) {
NOTREACHED();
return error;
}
- } else if (change.change_type() == csync::SyncChange::ACTION_ADD) {
+ } else if (change.change_type() == syncer::SyncChange::ACTION_ADD) {
// TODO(sync): Handle other types of creation (custom parents, folders,
// etc.).
- csync::ReadNode root_node(&trans);
+ syncer::ReadNode root_node(&trans);
if (root_node.InitByTagLookup(
syncable::ModelTypeToRootTag(change.sync_data().GetDataType())) !=
- csync::BaseNode::INIT_OK) {
- csync::SyncError error(FROM_HERE,
+ syncer::BaseNode::INIT_OK) {
+ syncer::SyncError error(FROM_HERE,
"Failed to look up root node for type " + type_str,
type);
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
@@ -276,31 +278,31 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
LOG(ERROR) << "Create: no root node.";
return error;
}
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
sync_node.InitUniqueByCreation(change.sync_data().GetDataType(),
root_node,
change.sync_data().GetTag());
- if (result != csync::WriteNode::INIT_SUCCESS) {
+ if (result != syncer::WriteNode::INIT_SUCCESS) {
std::string error_prefix = "Failed to create " + type_str + " node: ";
switch (result) {
- case csync::WriteNode::INIT_FAILED_EMPTY_TAG: {
- csync::SyncError error;
+ case syncer::WriteNode::INIT_FAILED_EMPTY_TAG: {
+ syncer::SyncError error;
error.Reset(FROM_HERE, error_prefix + "empty tag", type);
error_handler()->OnSingleDatatypeUnrecoverableError(
FROM_HERE, error.message());
LOG(ERROR) << "Create: Empty tag.";
return error;
}
- case csync::WriteNode::INIT_FAILED_ENTRY_ALREADY_EXISTS: {
- csync::SyncError error;
+ case syncer::WriteNode::INIT_FAILED_ENTRY_ALREADY_EXISTS: {
+ syncer::SyncError error;
error.Reset(FROM_HERE, error_prefix + "entry already exists", type);
error_handler()->OnSingleDatatypeUnrecoverableError(
FROM_HERE, error.message());
LOG(ERROR) << "Create: Entry exists.";
return error;
}
- case csync::WriteNode::INIT_FAILED_COULD_NOT_CREATE_ENTRY: {
- csync::SyncError error;
+ case syncer::WriteNode::INIT_FAILED_COULD_NOT_CREATE_ENTRY: {
+ syncer::SyncError error;
error.Reset(FROM_HERE, error_prefix + "failed to create entry",
type);
error_handler()->OnSingleDatatypeUnrecoverableError(
@@ -308,8 +310,8 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
LOG(ERROR) << "Create: Could not create entry.";
return error;
}
- case csync::WriteNode::INIT_FAILED_SET_PREDECESSOR: {
- csync::SyncError error;
+ case syncer::WriteNode::INIT_FAILED_SET_PREDECESSOR: {
+ syncer::SyncError error;
error.Reset(FROM_HERE, error_prefix + "failed to set predecessor",
type);
error_handler()->OnSingleDatatypeUnrecoverableError(
@@ -318,7 +320,7 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
return error;
}
default: {
- csync::SyncError error;
+ syncer::SyncError error;
error.Reset(FROM_HERE, error_prefix + "unknown error", type);
error_handler()->OnSingleDatatypeUnrecoverableError(
FROM_HERE, error.message());
@@ -329,14 +331,14 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
}
sync_node.SetTitle(UTF8ToWide(change.sync_data().GetTitle()));
sync_node.SetEntitySpecifics(change.sync_data().GetSpecifics());
- } else if (change.change_type() == csync::SyncChange::ACTION_UPDATE) {
+ } else if (change.change_type() == syncer::SyncChange::ACTION_UPDATE) {
// TODO(zea): consider having this logic for all possible changes?
- csync::BaseNode::InitByLookupResult result =
+ syncer::BaseNode::InitByLookupResult result =
sync_node.InitByClientTagLookup(change.sync_data().GetDataType(),
change.sync_data().GetTag());
- if (result != csync::BaseNode::INIT_OK) {
- if (result == csync::BaseNode::INIT_FAILED_PRECONDITION) {
- csync::SyncError error;
+ if (result != syncer::BaseNode::INIT_OK) {
+ if (result == syncer::BaseNode::INIT_FAILED_PRECONDITION) {
+ syncer::SyncError error;
error.Reset(FROM_HERE,
"Failed to load entry w/empty tag for " + type_str + ".",
type);
@@ -344,8 +346,8 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
FROM_HERE, error.message());
LOG(ERROR) << "Update: Empty tag.";
return error;
- } else if (result == csync::BaseNode::INIT_FAILED_ENTRY_NOT_GOOD) {
- csync::SyncError error;
+ } else if (result == syncer::BaseNode::INIT_FAILED_ENTRY_NOT_GOOD) {
+ syncer::SyncError error;
error.Reset(FROM_HERE,
"Failed to load bad entry for " + type_str + ".",
type);
@@ -353,8 +355,8 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
FROM_HERE, error.message());
LOG(ERROR) << "Update: bad entry.";
return error;
- } else if (result == csync::BaseNode::INIT_FAILED_ENTRY_IS_DEL) {
- csync::SyncError error;
+ } else if (result == syncer::BaseNode::INIT_FAILED_ENTRY_IS_DEL) {
+ syncer::SyncError error;
error.Reset(FROM_HERE,
"Failed to load deleted entry for " + type_str + ".",
type);
@@ -363,7 +365,7 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
LOG(ERROR) << "Update: deleted entry.";
return error;
} else {
- csync::Cryptographer* crypto = trans.GetCryptographer();
+ syncer::Cryptographer* crypto = trans.GetCryptographer();
syncable::ModelTypeSet encrypted_types(crypto->GetEncryptedTypes());
const sync_pb::EntitySpecifics& specifics =
sync_node.GetEntry()->Get(syncable::SPECIFICS);
@@ -371,7 +373,7 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
const bool can_decrypt = crypto->CanDecrypt(specifics.encrypted());
const bool agreement = encrypted_types.Has(type);
if (!agreement && !can_decrypt) {
- csync::SyncError error;
+ syncer::SyncError error;
error.Reset(FROM_HERE,
"Failed to load encrypted entry, missing key and "
"nigori mismatch for " + type_str + ".",
@@ -381,7 +383,7 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
LOG(ERROR) << "Update: encr case 1.";
return error;
} else if (agreement && can_decrypt) {
- csync::SyncError error;
+ syncer::SyncError error;
error.Reset(FROM_HERE,
"Failed to load encrypted entry, we have the key "
"and the nigori matches (?!) for " + type_str + ".",
@@ -391,7 +393,7 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
LOG(ERROR) << "Update: encr case 2.";
return error;
} else if (agreement) {
- csync::SyncError error;
+ syncer::SyncError error;
error.Reset(FROM_HERE,
"Failed to load encrypted entry, missing key and "
"the nigori matches for " + type_str + ".",
@@ -401,7 +403,7 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
LOG(ERROR) << "Update: encr case 3.";
return error;
} else {
- csync::SyncError error;
+ syncer::SyncError error;
error.Reset(FROM_HERE,
"Failed to load encrypted entry, we have the key"
"(?!) and nigori mismatch for " + type_str + ".",
@@ -419,9 +421,9 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
// successor, parent, etc.).
}
} else {
- csync::SyncError error(
+ syncer::SyncError error(
FROM_HERE,
- "Received unset csync::SyncChange in the change processor.",
+ "Received unset syncer::SyncChange in the change processor.",
type);
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
error.message());
@@ -430,7 +432,7 @@ csync::SyncError GenericChangeProcessor::ProcessSyncChanges(
return error;
}
}
- return csync::SyncError();
+ return syncer::SyncError();
}
bool GenericChangeProcessor::SyncModelHasUserCreatedNodes(
@@ -443,10 +445,10 @@ bool GenericChangeProcessor::SyncModelHasUserCreatedNodes(
std::string err_str = "Server did not create the top-level " + type_name +
" node. We might be running against an out-of-date server.";
*has_nodes = false;
- csync::ReadTransaction trans(FROM_HERE, share_handle());
- csync::ReadNode type_root_node(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, share_handle());
+ syncer::ReadNode type_root_node(&trans);
if (type_root_node.InitByTagLookup(syncable::ModelTypeToRootTag(type)) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
LOG(ERROR) << err_str;
return false;
}
@@ -461,7 +463,7 @@ bool GenericChangeProcessor::CryptoReadyIfNecessary(syncable::ModelType type) {
DCHECK(CalledOnValidThread());
DCHECK_NE(type, syncable::UNSPECIFIED);
// We only access the cryptographer while holding a transaction.
- csync::ReadTransaction trans(FROM_HERE, share_handle());
+ syncer::ReadTransaction trans(FROM_HERE, share_handle());
const syncable::ModelTypeSet encrypted_types = GetEncryptedTypes(&trans);
return !encrypted_types.Has(type) ||
trans.GetCryptographer()->is_ready();
@@ -475,7 +477,7 @@ void GenericChangeProcessor::StopImpl() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
-csync::UserShare* GenericChangeProcessor::share_handle() const {
+syncer::UserShare* GenericChangeProcessor::share_handle() const {
DCHECK(CalledOnValidThread());
return share_handle_;
}
diff --git a/chrome/browser/sync/glue/generic_change_processor.h b/chrome/browser/sync/glue/generic_change_processor.h
index dd72179..223cd6b 100644
--- a/chrome/browser/sync/glue/generic_change_processor.h
+++ b/chrome/browser/sync/glue/generic_change_processor.h
@@ -16,12 +16,12 @@
#include "chrome/browser/sync/glue/data_type_error_handler.h"
#include "sync/api/sync_change_processor.h"
-namespace csync {
+namespace syncer {
class SyncData;
class SyncableService;
-typedef std::vector<csync::SyncData> SyncDataList;
-} // namespace csync
+typedef std::vector<syncer::SyncData> SyncDataList;
+} // namespace syncer
namespace browser_sync {
@@ -36,36 +36,36 @@ namespace browser_sync {
// As a rule, the GenericChangeProcessor is not thread safe, and should only
// be used on the same thread in which it was created.
class GenericChangeProcessor : public ChangeProcessor,
- public csync::SyncChangeProcessor,
+ public syncer::SyncChangeProcessor,
public base::NonThreadSafe {
public:
// Create a change processor and connect it to the syncer.
GenericChangeProcessor(
DataTypeErrorHandler* error_handler,
- const base::WeakPtr<csync::SyncableService>& local_service,
- csync::UserShare* user_share);
+ const base::WeakPtr<syncer::SyncableService>& local_service,
+ syncer::UserShare* user_share);
virtual ~GenericChangeProcessor();
// ChangeProcessor interface.
// Build and store a list of all changes into |syncer_changes_|.
virtual void ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
// Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto
// |local_service_| by way of its ProcessSyncChanges method.
virtual void CommitChangesFromSyncModel() OVERRIDE;
- // csync::SyncChangeProcessor implementation.
- virtual csync::SyncError ProcessSyncChanges(
+ // syncer::SyncChangeProcessor implementation.
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
// Fills |current_sync_data| with all the syncer data for the specified type.
- virtual csync::SyncError GetSyncDataForType(syncable::ModelType type,
- csync::SyncDataList* current_sync_data);
+ virtual syncer::SyncError GetSyncDataForType(syncable::ModelType type,
+ syncer::SyncDataList* current_sync_data);
// Generic versions of AssociatorInterface methods. Called by
- // csync::SyncableServiceAdapter or the DataTypeController.
+ // syncer::SyncableServiceAdapter or the DataTypeController.
virtual bool SyncModelHasUserCreatedNodes(syncable::ModelType type,
bool* has_nodes);
virtual bool CryptoReadyIfNecessary(syncable::ModelType type);
@@ -76,24 +76,24 @@ class GenericChangeProcessor : public ChangeProcessor,
// Called from UI thread (as part of deactivating datatype), but does
// nothing and is guaranteed to still be alive, so it's okay.
virtual void StopImpl() OVERRIDE; // Does nothing.
- virtual csync::UserShare* share_handle() const OVERRIDE;
+ virtual syncer::UserShare* share_handle() const OVERRIDE;
private:
// The SyncableService this change processor will forward changes on to.
- const base::WeakPtr<csync::SyncableService> local_service_;
+ const base::WeakPtr<syncer::SyncableService> local_service_;
// The current list of changes received from the syncer. We buffer because
// we must ensure no syncapi transaction is held when we pass it on to
// |local_service_|.
// Set in ApplyChangesFromSyncModel, consumed in CommitChangesFromSyncModel.
- csync::SyncChangeList syncer_changes_;
+ syncer::SyncChangeList syncer_changes_;
// Our handle to the sync model. Unlike normal ChangeProcessors, we need to
// be able to access the sync model before the change processor begins
// listening to changes (the local_service_ will be interacting with us
// when it starts up). As such we can't wait until Start(_) has been called,
// and have to keep a local pointer to the user_share.
- csync::UserShare* const share_handle_;
+ syncer::UserShare* const share_handle_;
DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor);
};
diff --git a/chrome/browser/sync/glue/history_model_worker.cc b/chrome/browser/sync/glue/history_model_worker.cc
index 5480c12..4fa47ee 100644
--- a/chrome/browser/sync/glue/history_model_worker.cc
+++ b/chrome/browser/sync/glue/history_model_worker.cc
@@ -16,9 +16,9 @@ namespace browser_sync {
class WorkerTask : public HistoryDBTask {
public:
WorkerTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
WaitableEvent* done,
- csync::SyncerError* error)
+ syncer::SyncerError* error)
: work_(work), done_(done), error_(error) {}
virtual bool RunOnDBThread(history::HistoryBackend* backend,
@@ -35,9 +35,9 @@ class WorkerTask : public HistoryDBTask {
protected:
virtual ~WorkerTask() {}
- csync::WorkCallback work_;
+ syncer::WorkCallback work_;
WaitableEvent* done_;
- csync::SyncerError* error_;
+ syncer::SyncerError* error_;
};
@@ -46,18 +46,18 @@ HistoryModelWorker::HistoryModelWorker(HistoryService* history_service)
CHECK(history_service);
}
-csync::SyncerError HistoryModelWorker::DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) {
+syncer::SyncerError HistoryModelWorker::DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) {
WaitableEvent done(false, false);
- csync::SyncerError error = csync::UNSET;
+ syncer::SyncerError error = syncer::UNSET;
scoped_refptr<WorkerTask> task(new WorkerTask(work, &done, &error));
history_service_->ScheduleDBTask(task.get(), &cancelable_consumer_);
done.Wait();
return error;
}
-csync::ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() {
- return csync::GROUP_HISTORY;
+syncer::ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() {
+ return syncer::GROUP_HISTORY;
}
HistoryModelWorker::~HistoryModelWorker() {}
diff --git a/chrome/browser/sync/glue/history_model_worker.h b/chrome/browser/sync/glue/history_model_worker.h
index e744790..7aabd2d 100644
--- a/chrome/browser/sync/glue/history_model_worker.h
+++ b/chrome/browser/sync/glue/history_model_worker.h
@@ -18,16 +18,16 @@ class HistoryService;
namespace browser_sync {
-// A csync::ModelSafeWorker for history models that accepts requests
+// A syncer::ModelSafeWorker for history models that accepts requests
// from the syncapi that need to be fulfilled on the history thread.
-class HistoryModelWorker : public csync::ModelSafeWorker {
+class HistoryModelWorker : public syncer::ModelSafeWorker {
public:
explicit HistoryModelWorker(HistoryService* history_service);
- // csync::ModelSafeWorker implementation. Called on syncapi SyncerThread.
- virtual csync::SyncerError DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) OVERRIDE;
- virtual csync::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
+ // syncer::ModelSafeWorker implementation. Called on syncapi SyncerThread.
+ virtual syncer::SyncerError DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) OVERRIDE;
+ virtual syncer::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
private:
virtual ~HistoryModelWorker();
diff --git a/chrome/browser/sync/glue/model_association_manager.cc b/chrome/browser/sync/glue/model_association_manager.cc
index 2ab340c..e9cd9b3 100644
--- a/chrome/browser/sync/glue/model_association_manager.cc
+++ b/chrome/browser/sync/glue/model_association_manager.cc
@@ -264,7 +264,7 @@ bool ModelAssociationManager::GetControllersNeedingStart(
void ModelAssociationManager::AppendToFailedDatatypesAndLogError(
DataTypeController::StartResult result,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
failed_datatypes_info_.push_back(error);
LOG(ERROR) << "Failed to associate models for "
<< syncable::ModelTypeToString(error.type());
@@ -275,7 +275,7 @@ void ModelAssociationManager::AppendToFailedDatatypesAndLogError(
void ModelAssociationManager::TypeStartCallback(
DataTypeController::StartResult result,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
TRACE_EVENT_END0("sync", "ModelAssociation");
@@ -332,7 +332,7 @@ void ModelAssociationManager::TypeStartCallback(
break;
}
- std::list<csync::SyncError> errors;
+ std::list<syncer::SyncError> errors;
errors.push_back(error);
// Put our state to idle.
@@ -374,7 +374,7 @@ void ModelAssociationManager::LoadModelForNextType() {
}
void ModelAssociationManager::ModelLoadCallback(
- syncable::ModelType type, csync::SyncError error) {
+ syncable::ModelType type, syncer::SyncError error) {
DVLOG(1) << "ModelAssociationManager: ModelLoadCallback for "
<< syncable::ModelTypeToString(type);
if (state_ == CONFIGURING) {
diff --git a/chrome/browser/sync/glue/model_association_manager.h b/chrome/browser/sync/glue/model_association_manager.h
index bb5b8413..6e00068 100644
--- a/chrome/browser/sync/glue/model_association_manager.h
+++ b/chrome/browser/sync/glue/model_association_manager.h
@@ -97,11 +97,11 @@ class ModelAssociationManager {
// Callback passed to each data type controller on starting association. This
// callback will be invoked when the model association is done.
void TypeStartCallback(DataTypeController::StartResult result,
- const csync::SyncError& error);
+ const syncer::SyncError& error);
// Callback that will be invoked when the models finish loading. This callback
// will be passed to |LoadModels| function.
- void ModelLoadCallback(syncable::ModelType type, csync::SyncError error);
+ void ModelLoadCallback(syncable::ModelType type, syncer::SyncError error);
// Calls the |LoadModels| method on the next controller waiting to start.
void LoadModelForNextType();
@@ -114,14 +114,14 @@ class ModelAssociationManager {
// do the book keeping and do the UMA reporting.
void AppendToFailedDatatypesAndLogError(
DataTypeController::StartResult result,
- const csync::SyncError& error);
+ const syncer::SyncError& error);
syncable::ModelTypeSet GetTypesWaitingToLoad();
State state_;
syncable::ModelTypeSet desired_types_;
- std::list<csync::SyncError> failed_datatypes_info_;
+ std::list<syncer::SyncError> failed_datatypes_info_;
std::map<syncable::ModelType, int> start_order_;
// This illustration explains the movement of one DTC through various lists.
diff --git a/chrome/browser/sync/glue/model_association_manager_unittest.cc b/chrome/browser/sync/glue/model_association_manager_unittest.cc
index 18eed33..3d1f90d 100644
--- a/chrome/browser/sync/glue/model_association_manager_unittest.cc
+++ b/chrome/browser/sync/glue/model_association_manager_unittest.cc
@@ -41,7 +41,7 @@ ACTION_P(VerifyResult, expected_result) {
if (arg0.failed_data_types.size() ==
expected_result.failed_data_types.size()) {
- std::list<csync::SyncError>::const_iterator it1, it2;
+ std::list<syncer::SyncError>::const_iterator it1, it2;
for (it1 = arg0.failed_data_types.begin(),
it2 = expected_result.failed_data_types.begin();
it1 != arg0.failed_data_types.end();
@@ -78,7 +78,7 @@ TEST_F(ModelAssociationManagerTest, SimpleModelStart) {
DataTypeManager::ConfigureResult expected_result(
DataTypeManager::OK,
types,
- std::list<csync::SyncError>(),
+ std::list<syncer::SyncError>(),
syncable::ModelTypeSet());
EXPECT_CALL(result_processor_, OnModelAssociationDone(_)).
WillOnce(VerifyResult(expected_result));
@@ -106,7 +106,7 @@ TEST_F(ModelAssociationManagerTest, StopModelBeforeFinish) {
DataTypeManager::ConfigureResult expected_result(
DataTypeManager::ABORTED,
types,
- std::list<csync::SyncError>(),
+ std::list<syncer::SyncError>(),
syncable::ModelTypeSet());
EXPECT_CALL(result_processor_, OnModelAssociationDone(_)).
@@ -134,7 +134,7 @@ TEST_F(ModelAssociationManagerTest, StopAfterFinish) {
DataTypeManager::ConfigureResult expected_result(
DataTypeManager::OK,
types,
- std::list<csync::SyncError>(),
+ std::list<syncer::SyncError>(),
syncable::ModelTypeSet());
EXPECT_CALL(result_processor_, OnModelAssociationDone(_)).
WillOnce(VerifyResult(expected_result));
@@ -161,8 +161,8 @@ TEST_F(ModelAssociationManagerTest, TypeFailModelAssociation) {
&result_processor_);
syncable::ModelTypeSet types;
types.Put(syncable::BOOKMARKS);
- std::list<csync::SyncError> errors;
- csync::SyncError error(FROM_HERE, "Failed", syncable::BOOKMARKS);
+ std::list<syncer::SyncError> errors;
+ syncer::SyncError error(FROM_HERE, "Failed", syncable::BOOKMARKS);
errors.push_back(error);
DataTypeManager::ConfigureResult expected_result(
DataTypeManager::PARTIAL_SUCCESS,
@@ -190,8 +190,8 @@ TEST_F(ModelAssociationManagerTest, TypeReturnUnrecoverableError) {
&result_processor_);
syncable::ModelTypeSet types;
types.Put(syncable::BOOKMARKS);
- std::list<csync::SyncError> errors;
- csync::SyncError error(FROM_HERE, "Failed", syncable::BOOKMARKS);
+ std::list<syncer::SyncError> errors;
+ syncer::SyncError error(FROM_HERE, "Failed", syncable::BOOKMARKS);
errors.push_back(error);
DataTypeManager::ConfigureResult expected_result(
DataTypeManager::UNRECOVERABLE_ERROR,
@@ -227,7 +227,7 @@ TEST_F(ModelAssociationManagerTest, InitializeAbortsLoad) {
DataTypeManager::ConfigureResult expected_result_partially_done(
DataTypeManager::PARTIAL_SUCCESS,
types,
- std::list<csync::SyncError>(),
+ std::list<syncer::SyncError>(),
expected_types_waiting_to_load);
model_association_manager.Initialize(types);
@@ -267,7 +267,7 @@ TEST_F(ModelAssociationManagerTest, InitializeAbortsLoad) {
DataTypeManager::ConfigureResult expected_result_done(
DataTypeManager::OK,
types,
- std::list<csync::SyncError>(),
+ std::list<syncer::SyncError>(),
syncable::ModelTypeSet());
EXPECT_CALL(result_processor_, OnModelAssociationDone(_)).
WillOnce(VerifyResult(expected_result_done));
@@ -300,13 +300,13 @@ TEST_F(ModelAssociationManagerTest, ModelStartWithSlowLoadingType) {
DataTypeManager::ConfigureResult expected_result_partially_done(
DataTypeManager::PARTIAL_SUCCESS,
types,
- std::list<csync::SyncError>(),
+ std::list<syncer::SyncError>(),
expected_types_waiting_to_load);
DataTypeManager::ConfigureResult expected_result_done(
DataTypeManager::OK,
types,
- std::list<csync::SyncError>(),
+ std::list<syncer::SyncError>(),
syncable::ModelTypeSet());
EXPECT_CALL(result_processor_, OnModelAssociationDone(_)).
diff --git a/chrome/browser/sync/glue/model_associator.h b/chrome/browser/sync/glue/model_associator.h
index dadd86d..0e7dc61 100644
--- a/chrome/browser/sync/glue/model_associator.h
+++ b/chrome/browser/sync/glue/model_associator.h
@@ -11,7 +11,7 @@
#include "sync/api/sync_error.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
class BaseNode;
}
@@ -29,10 +29,10 @@ class AssociatorInterface {
// should be identical and corresponding. Returns true on
// success. On failure of this step, we should abort the sync
// operation and report an error to the user.
- virtual csync::SyncError AssociateModels() = 0;
+ virtual syncer::SyncError AssociateModels() = 0;
// Clears all the associations between the chrome and sync models.
- virtual csync::SyncError DisassociateModels() = 0;
+ virtual syncer::SyncError DisassociateModels() = 0;
// The has_nodes out parameter is set to true if the sync model has
// nodes other than the permanent tagged nodes. The method may
@@ -66,7 +66,7 @@ class PerDataTypeAssociatorInterface : public AssociatorInterface {
public:
virtual ~PerDataTypeAssociatorInterface() {}
// Returns sync id for the given chrome model id.
- // Returns csync::kInvalidId if the sync node is not found for the given
+ // Returns syncer::kInvalidId if the sync node is not found for the given
// chrome id.
virtual int64 GetSyncIdFromChromeId(const IDType& id) = 0;
@@ -79,7 +79,7 @@ class PerDataTypeAssociatorInterface : public AssociatorInterface {
// if the initialization of sync node fails.
virtual bool InitSyncNodeFromChromeId(
const IDType& node_id,
- csync::BaseNode* sync_node) = 0;
+ syncer::BaseNode* sync_node) = 0;
// Associates the given chrome node with the given sync id.
virtual void Associate(const Node* node, int64 sync_id) = 0;
diff --git a/chrome/browser/sync/glue/model_associator_mock.h b/chrome/browser/sync/glue/model_associator_mock.h
index 7252267d..c222bd7 100644
--- a/chrome/browser/sync/glue/model_associator_mock.h
+++ b/chrome/browser/sync/glue/model_associator_mock.h
@@ -22,8 +22,8 @@ class ModelAssociatorMock : public AssociatorInterface {
ModelAssociatorMock();
virtual ~ModelAssociatorMock();
- MOCK_METHOD0(AssociateModels, csync::SyncError());
- MOCK_METHOD0(DisassociateModels, csync::SyncError());
+ MOCK_METHOD0(AssociateModels, syncer::SyncError());
+ MOCK_METHOD0(DisassociateModels, syncer::SyncError());
MOCK_METHOD1(SyncModelHasUserCreatedNodes, bool(bool* has_nodes));
MOCK_METHOD0(AbortAssociation, void());
MOCK_METHOD0(CryptoReadyIfNecessary, bool());
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 26b4dc0..f7db76a 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
@@ -30,7 +30,7 @@ void NewNonFrontendDataTypeController::LoadModels(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!model_load_callback.is_null());
if (state() != NOT_RUNNING) {
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"Model already running",
type()));
return;
@@ -63,7 +63,7 @@ void NewNonFrontendDataTypeController::OnModelLoaded() {
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), csync::SyncError());
+ model_load_callback.Run(type(), syncer::SyncError());
}
void NewNonFrontendDataTypeController::StartAssociating(
@@ -75,7 +75,7 @@ void NewNonFrontendDataTypeController::StartAssociating(
set_start_callback(start_callback);
if (!StartAssociationAsync()) {
- csync::SyncError error(
+ syncer::SyncError error(
FROM_HERE, "Failed to post StartAssociation", type());
StartDoneImpl(ASSOCIATION_FAILED, NOT_RUNNING, error);
// StartDoneImpl should have called ClearSharedChangeProcessor();
@@ -93,7 +93,7 @@ void NewNonFrontendDataTypeController::Stop() {
}
// Disconnect the change processor. At this point, the
- // csync::SyncableService can no longer interact with the Syncer, even if
+ // syncer::SyncableService can no longer interact with the Syncer, even if
// it hasn't finished MergeDataAndStartSyncing.
ClearSharedChangeProcessor();
@@ -105,7 +105,7 @@ void NewNonFrontendDataTypeController::Stop() {
return; // The datatype was never activated, we're done.
case ASSOCIATING:
set_state(STOPPING);
- StartDoneImpl(ABORTED, NOT_RUNNING, csync::SyncError());
+ StartDoneImpl(ABORTED, NOT_RUNNING, syncer::SyncError());
// We continue on to deactivate the datatype and stop the local service.
break;
case DISABLED:
@@ -142,7 +142,7 @@ NewNonFrontendDataTypeController::~NewNonFrontendDataTypeController() {}
void NewNonFrontendDataTypeController::StartDone(
DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(
@@ -156,7 +156,7 @@ void NewNonFrontendDataTypeController::StartDone(
void NewNonFrontendDataTypeController::StartDoneImpl(
DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// If we failed to start up, and we haven't been stopped yet, we need to
// ensure we clean up the local service and shared change processor properly.
@@ -172,7 +172,7 @@ void NewNonFrontendDataTypeController::AbortModelStarting() {
StopModels();
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"ABORTED",
type()));
}
@@ -201,7 +201,7 @@ void NewNonFrontendDataTypeController::
DCHECK(shared_change_processor.get());
// Connect |shared_change_processor| to the syncer and get the
- // csync::SyncableService associated with type().
+ // syncer::SyncableService associated with type().
// Note that it's possible the shared_change_processor has already been
// disconnected at this point, so all our accesses to the syncer from this
// point on are through it.
@@ -210,26 +210,26 @@ void NewNonFrontendDataTypeController::
this,
type());
if (!local_service_.get()) {
- csync::SyncError error(FROM_HERE, "Failed to connect to syncer.", type());
+ syncer::SyncError error(FROM_HERE, "Failed to connect to syncer.", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return;
}
if (!shared_change_processor->CryptoReadyIfNecessary()) {
- StartFailed(NEEDS_CRYPTO, csync::SyncError());
+ StartFailed(NEEDS_CRYPTO, syncer::SyncError());
return;
}
bool sync_has_nodes = false;
if (!shared_change_processor->SyncModelHasUserCreatedNodes(&sync_has_nodes)) {
- csync::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
+ syncer::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return;
}
base::TimeTicks start_time = base::TimeTicks::Now();
- csync::SyncError error;
- csync::SyncDataList initial_sync_data;
+ syncer::SyncError error;
+ syncer::SyncDataList initial_sync_data;
error = shared_change_processor->GetSyncData(&initial_sync_data);
if (error.IsSet()) {
StartFailed(ASSOCIATION_FAILED, error);
@@ -239,9 +239,9 @@ void NewNonFrontendDataTypeController::
error = local_service_->MergeDataAndStartSyncing(
type(),
initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor>(
+ scoped_ptr<syncer::SyncChangeProcessor>(
new SharedChangeProcessorRef(shared_change_processor)),
- scoped_ptr<csync::SyncErrorFactory>(
+ scoped_ptr<syncer::SyncErrorFactory>(
new SharedChangeProcessorRef(shared_change_processor)));
RecordAssociationTime(base::TimeTicks::Now() - start_time);
if (error.IsSet()) {
@@ -256,7 +256,7 @@ void NewNonFrontendDataTypeController::
// doesn't start trying to push changes from its thread before we activate
// the datatype.
shared_change_processor->ActivateDataType(model_safe_group());
- StartDone(!sync_has_nodes ? OK_FIRST_RUN : OK, RUNNING, csync::SyncError());
+ StartDone(!sync_has_nodes ? OK_FIRST_RUN : OK, RUNNING, syncer::SyncError());
}
void NewNonFrontendDataTypeController::ClearSharedChangeProcessor() {
diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
index 1927520..928c9f4 100644
--- a/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
+++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
@@ -43,10 +43,10 @@ class NewNonFrontendDataTypeController : public NonFrontendDataTypeController {
// Overrides of NonFrontendDataTypeController methods.
virtual void StartDone(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error) OVERRIDE;
+ const syncer::SyncError& error) OVERRIDE;
virtual void StartDoneImpl(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error) OVERRIDE;
+ const syncer::SyncError& error) OVERRIDE;
private:
// This overrides the same method in |NonFrontendDataTypeController|.
@@ -93,7 +93,7 @@ class NewNonFrontendDataTypeController : public NonFrontendDataTypeController {
// DataType's thread.
// Lifetime: it gets set in StartAssociation() and released in
// StopLocalService().
- base::WeakPtr<csync::SyncableService> local_service_;
+ base::WeakPtr<syncer::SyncableService> local_service_;
};
} // namespace browser_sync
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 59b7aab..5aced58 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
@@ -27,7 +27,7 @@ class NewNonFrontendDataTypeControllerMock
MOCK_METHOD0(enabled, bool());
MOCK_CONST_METHOD0(type, syncable::ModelType());
MOCK_CONST_METHOD0(name, std::string());
- MOCK_CONST_METHOD0(model_safe_group, csync::ModelSafeGroup());
+ MOCK_CONST_METHOD0(model_safe_group, syncer::ModelSafeGroup());
MOCK_CONST_METHOD0(state, State());
MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&,
const std::string&));
@@ -40,13 +40,13 @@ class NewNonFrontendDataTypeControllerMock
MOCK_METHOD0(StartAssociation, void());
MOCK_METHOD0(CreateSyncComponents, void());
MOCK_METHOD2(StartFailed, void(StartResult result,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
MOCK_METHOD3(StartDone, void(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
MOCK_METHOD3(StartDoneImpl, void(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
MOCK_METHOD0(StopModels, void());
MOCK_METHOD0(StopAssociationAsync, bool());
MOCK_METHOD0(StopAssociation, void());
@@ -59,7 +59,7 @@ class NewNonFrontendDataTypeControllerMock
// NewNonFrontendDataTypeController mocks.
MOCK_CONST_METHOD0(GetWeakPtrToSyncableService,
- base::WeakPtr<csync::SyncableService>());
+ base::WeakPtr<syncer::SyncableService>());
protected:
virtual ~NewNonFrontendDataTypeControllerMock();
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 bd4bf0b..acad7b0 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
@@ -75,8 +75,8 @@ class NewNonFrontendDataTypeControllerFake
virtual syncable::ModelType type() const OVERRIDE {
return AUTOFILL_PROFILE;
}
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE {
- return csync::GROUP_DB;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE {
+ return syncer::GROUP_DB;
}
// Prevent tasks from being posted on the backend thread until
@@ -156,7 +156,7 @@ class SyncNewNonFrontendDataTypeControllerTest : public testing::Test {
virtual void SetUp() OVERRIDE {
EXPECT_CALL(service_, GetUserShare()).WillRepeatedly(
- Return((csync::UserShare*)NULL));
+ Return((syncer::UserShare*)NULL));
db_thread_.Start();
profile_sync_factory_.reset(
new StrictMock<ProfileSyncComponentsFactoryMock>());
@@ -206,7 +206,7 @@ class SyncNewNonFrontendDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*change_processor_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*change_processor_, GetSyncData(_)).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
}
@@ -250,11 +250,11 @@ class SyncNewNonFrontendDataTypeControllerTest : public testing::Test {
StartCallbackMock start_callback_;
ModelLoadCallbackMock model_load_callback_;
// Must be destroyed after new_non_frontend_dtc_.
- csync::FakeSyncableService syncable_service_;
+ syncer::FakeSyncableService syncable_service_;
scoped_refptr<NewNonFrontendDataTypeControllerFake> new_non_frontend_dtc_;
scoped_refptr<NewNonFrontendDataTypeControllerMock> dtc_mock_;
scoped_refptr<SharedChangeProcessorMock> change_processor_;
- scoped_ptr<csync::SyncChangeProcessor> saved_change_processor_;
+ scoped_ptr<syncer::SyncChangeProcessor> saved_change_processor_;
};
TEST_F(SyncNewNonFrontendDataTypeControllerTest, StartOk) {
@@ -276,7 +276,7 @@ TEST_F(SyncNewNonFrontendDataTypeControllerTest, StartFirstRun) {
EXPECT_CALL(*change_processor_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(false), Return(true)));
EXPECT_CALL(*change_processor_, GetSyncData(_)).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetActivateExpectations(DataTypeController::OK_FIRST_RUN);
EXPECT_EQ(DataTypeController::NOT_RUNNING, new_non_frontend_dtc_->state());
@@ -316,13 +316,14 @@ TEST_F(SyncNewNonFrontendDataTypeControllerTest, StartAssociationFailed) {
EXPECT_CALL(*change_processor_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*change_processor_, GetSyncData(_)).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetStartFailExpectations(DataTypeController::ASSOCIATION_FAILED);
// Set up association to fail with an association failed error.
EXPECT_EQ(DataTypeController::NOT_RUNNING, new_non_frontend_dtc_->state());
syncable_service_.set_merge_data_and_start_syncing_error(
- csync::SyncError(FROM_HERE, "Sync Error", new_non_frontend_dtc_->type()));
+ syncer::SyncError(FROM_HERE,
+ "Sync Error", new_non_frontend_dtc_->type()));
Start();
WaitForDTC();
EXPECT_EQ(DataTypeController::DISABLED, new_non_frontend_dtc_->state());
@@ -383,7 +384,7 @@ TEST_F(SyncNewNonFrontendDataTypeControllerTest, AbortDuringAssociation) {
EXPECT_CALL(*change_processor_, GetSyncData(_)).
WillOnce(
Return(
- csync::SyncError(FROM_HERE, "Disconnected.", AUTOFILL_PROFILE)));
+ syncer::SyncError(FROM_HERE, "Disconnected.", AUTOFILL_PROFILE)));
EXPECT_CALL(*change_processor_, Disconnect()).
WillOnce(DoAll(SignalEvent(&pause_db_thread), Return(true)));
EXPECT_CALL(service_, DeactivateDataType(_));
@@ -420,7 +421,7 @@ TEST_F(SyncNewNonFrontendDataTypeControllerTest, FLAKY_StartAfterSyncShutdown) {
Mock::VerifyAndClearExpectations(dtc_mock_);
EXPECT_CALL(*change_processor_, Connect(_,_,_,_)).
- WillOnce(Return(base::WeakPtr<csync::SyncableService>()));
+ WillOnce(Return(base::WeakPtr<syncer::SyncableService>()));
new_non_frontend_dtc_->UnblockBackendTasks();
EXPECT_CALL(*dtc_mock_, RecordUnrecoverableError(_, _));
WaitForDTC();
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 b84db9b..04298e3 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
@@ -48,7 +48,7 @@ void NonFrontendDataTypeController::LoadModels(
start_association_called_.Reset();
start_models_failed_ = false;
if (state_ != NOT_RUNNING) {
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"Model already loaded",
type()));
return;
@@ -63,14 +63,14 @@ void NonFrontendDataTypeController::LoadModels(
// get a false it means they failed.
DCHECK(state_ == NOT_RUNNING || state_ == MODEL_STARTING
|| state_ == DISABLED);
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"Failed loading",
type()));
return;
}
state_ = MODEL_LOADED;
- model_load_callback.Run(type(), csync::SyncError());
+ model_load_callback.Run(type(), syncer::SyncError());
}
void NonFrontendDataTypeController::OnModelLoaded() {
@@ -87,7 +87,7 @@ void NonFrontendDataTypeController::StartAssociating(
state_ = ASSOCIATING;
start_callback_ = start_callback;
if (!StartAssociationAsync()) {
- csync::SyncError error(
+ syncer::SyncError error(
FROM_HERE, "Failed to post StartAssociation", type());
StartDoneImpl(ASSOCIATION_FAILED, DISABLED, error);
}
@@ -101,7 +101,7 @@ void NonFrontendDataTypeController::StopWhileAssociating() {
if (model_associator_.get())
model_associator_->AbortAssociation();
if (!start_association_called_.IsSignaled()) {
- StartDoneImpl(ABORTED, NOT_RUNNING, csync::SyncError());
+ StartDoneImpl(ABORTED, NOT_RUNNING, syncer::SyncError());
return; // There is nothing more for us to do.
}
}
@@ -128,7 +128,7 @@ void NonFrontendDataTypeController::StopWhileAssociating() {
}
- StartDoneImpl(ABORTED, STOPPING, csync::SyncError());
+ StartDoneImpl(ABORTED, STOPPING, syncer::SyncError());
}
namespace {
@@ -284,8 +284,9 @@ bool NonFrontendDataTypeController::StartModels() {
return true;
}
-void NonFrontendDataTypeController::StartFailed(StartResult result,
- const csync::SyncError& error) {
+void NonFrontendDataTypeController::StartFailed(
+ StartResult result,
+ const syncer::SyncError& error) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
if (IsUnrecoverableResult(result))
@@ -299,7 +300,7 @@ void NonFrontendDataTypeController::StartFailed(StartResult result,
void NonFrontendDataTypeController::StartDone(
DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
abort_association_complete_.Signal();
base::AutoLock lock(abort_association_lock_);
@@ -316,7 +317,7 @@ void NonFrontendDataTypeController::StartDone(
void NonFrontendDataTypeController::StartDoneImpl(
DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// It's possible to have StartDoneImpl called first from the UI thread
// (due to Stop being called) and then posted from the non-UI thread. In
@@ -440,19 +441,19 @@ void NonFrontendDataTypeController::StartAssociation() {
DCHECK_EQ(state_, ASSOCIATING);
if (!model_associator_->CryptoReadyIfNecessary()) {
- StartFailed(NEEDS_CRYPTO, csync::SyncError());
+ StartFailed(NEEDS_CRYPTO, syncer::SyncError());
return;
}
bool sync_has_nodes = false;
if (!model_associator_->SyncModelHasUserCreatedNodes(&sync_has_nodes)) {
- csync::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
+ syncer::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return;
}
base::TimeTicks start_time = base::TimeTicks::Now();
- csync::SyncError error;
+ syncer::SyncError error;
error = model_associator_->AssociateModels();
// TODO(lipalani): crbug.com/122690 - handle abort.
RecordAssociationTime(base::TimeTicks::Now() - start_time);
@@ -463,7 +464,7 @@ void NonFrontendDataTypeController::StartAssociation() {
profile_sync_service_->ActivateDataType(type(), model_safe_group(),
change_processor());
- StartDone(!sync_has_nodes ? OK_FIRST_RUN : OK, RUNNING, csync::SyncError());
+ StartDone(!sync_has_nodes ? OK_FIRST_RUN : OK, RUNNING, syncer::SyncError());
}
bool NonFrontendDataTypeController::StopAssociationAsync() {
@@ -496,7 +497,7 @@ void NonFrontendDataTypeController::StopAssociation() {
DCHECK(!HasOneRef());
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
if (model_associator_.get()) {
- csync::SyncError error; // Not used.
+ syncer::SyncError error; // Not used.
error = model_associator_->DisassociateModels();
}
model_associator_.reset();
diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.h b/chrome/browser/sync/glue/non_frontend_data_type_controller.h
index 413526e..6e9173f 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller.h
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.h
@@ -25,7 +25,7 @@ namespace base {
class TimeDelta;
}
-namespace csync {
+namespace syncer {
class SyncError;
}
@@ -56,7 +56,7 @@ class NonFrontendDataTypeController : public DataTypeController {
virtual void StartAssociating(const StartCallback& start_callback) OVERRIDE;
virtual void Stop() OVERRIDE;
virtual syncable::ModelType type() const = 0;
- virtual csync::ModelSafeGroup model_safe_group() const = 0;
+ virtual syncer::ModelSafeGroup model_safe_group() const = 0;
virtual std::string name() const OVERRIDE;
virtual State state() const OVERRIDE;
@@ -101,18 +101,18 @@ class NonFrontendDataTypeController : public DataTypeController {
// Start failed, make sure we record it, clean up state, and invoke the
// callback on the frontend thread.
// Note: this is performed on the datatype's thread.
- virtual void StartFailed(StartResult result, const csync::SyncError& error);
+ virtual void StartFailed(StartResult result, const syncer::SyncError& error);
// Start up complete, update the state and invoke the callback.
// Note: this is performed on the datatype's thread.
virtual void StartDone(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error);
+ const syncer::SyncError& error);
// UI thread implementation of StartDone.
virtual void StartDoneImpl(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error);
+ const syncer::SyncError& error);
// Perform any DataType controller specific state cleanup before stopping
// the datatype controller. The default implementation is a no-op.
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 8a1afb9..cd73c1b 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
@@ -26,7 +26,7 @@ class NonFrontendDataTypeControllerMock : public NonFrontendDataTypeController {
MOCK_METHOD0(enabled, bool());
MOCK_CONST_METHOD0(type, syncable::ModelType());
MOCK_CONST_METHOD0(name, std::string());
- MOCK_CONST_METHOD0(model_safe_group, csync::ModelSafeGroup());
+ MOCK_CONST_METHOD0(model_safe_group, syncer::ModelSafeGroup());
MOCK_CONST_METHOD0(state, State());
MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&,
const std::string&));
@@ -39,13 +39,13 @@ class NonFrontendDataTypeControllerMock : public NonFrontendDataTypeController {
MOCK_METHOD0(StartAssociation, void());
MOCK_METHOD0(CreateSyncComponents, void());
MOCK_METHOD2(StartFailed, void(StartResult result,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
MOCK_METHOD3(StartDone, void(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
MOCK_METHOD3(StartDoneImpl, void(DataTypeController::StartResult result,
DataTypeController::State new_state,
- const csync::SyncError& error));
+ const syncer::SyncError& error));
MOCK_METHOD0(StopModels, void());
MOCK_METHOD0(StopAssociation, void());
MOCK_METHOD2(OnUnrecoverableErrorImpl, void(const tracked_objects::Location&,
diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
index 1df3a86..39c21dd 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
@@ -27,7 +27,7 @@
using base::WaitableEvent;
using browser_sync::ChangeProcessorMock;
using browser_sync::DataTypeController;
-using csync::GROUP_DB;
+using syncer::GROUP_DB;
using browser_sync::NonFrontendDataTypeController;
using browser_sync::NonFrontendDataTypeControllerMock;
using browser_sync::ModelAssociatorMock;
@@ -62,8 +62,8 @@ class NonFrontendDataTypeControllerFake : public NonFrontendDataTypeController {
mock_(mock) {}
virtual syncable::ModelType type() const { return syncable::BOOKMARKS; }
- virtual csync::ModelSafeGroup model_safe_group() const {
- return csync::GROUP_DB;
+ virtual syncer::ModelSafeGroup model_safe_group() const {
+ return syncer::GROUP_DB;
}
private:
@@ -149,7 +149,7 @@ class SyncNonFrontendDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
}
@@ -162,7 +162,7 @@ class SyncNonFrontendDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*dtc_mock_, StopModels());
EXPECT_CALL(service_, DeactivateDataType(_));
EXPECT_CALL(*model_associator_, DisassociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
}
void SetStartFailExpectations(DataTypeController::StartResult result) {
@@ -171,7 +171,7 @@ class SyncNonFrontendDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*dtc_mock_, RecordUnrecoverableError(_, _));
if (model_associator_) {
EXPECT_CALL(*model_associator_, DisassociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
}
EXPECT_CALL(*dtc_mock_, RecordStartFailure(result));
EXPECT_CALL(start_callback_, Run(result,_));
@@ -233,7 +233,7 @@ TEST_F(SyncNonFrontendDataTypeControllerTest, StartFirstRun) {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillOnce(DoAll(SetArgumentPointee<0>(false), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetActivateExpectations(DataTypeController::OK_FIRST_RUN);
EXPECT_EQ(DataTypeController::NOT_RUNNING, non_frontend_dtc_->state());
@@ -250,7 +250,7 @@ TEST_F(SyncNonFrontendDataTypeControllerTest, StartAssociationFailed) {
WillOnce(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
WillOnce(
- Return(csync::SyncError(FROM_HERE, "Error", syncable::AUTOFILL)));
+ Return(syncer::SyncError(FROM_HERE, "Error", syncable::AUTOFILL)));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
SetStartFailExpectations(DataTypeController::ASSOCIATION_FAILED);
// Set up association to fail with an association failed error.
@@ -305,7 +305,7 @@ TEST_F(SyncNonFrontendDataTypeControllerTest, AbortDuringAssociationInactive) {
EXPECT_CALL(*model_associator_, AbortAssociation()).WillOnce(
SignalEvent(&pause_db_thread));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
EXPECT_CALL(service_, ActivateDataType(_, _, _));
EXPECT_CALL(start_callback_, Run(DataTypeController::ABORTED,_));
@@ -334,7 +334,7 @@ TEST_F(SyncNonFrontendDataTypeControllerTest, AbortDuringAssociationActivated) {
EXPECT_CALL(*model_associator_, AbortAssociation()).WillOnce(
SignalEvent(&pause_db_thread));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
EXPECT_CALL(*dtc_mock_, RecordAssociationTime(_));
EXPECT_CALL(service_, ActivateDataType(_, _, _)).WillOnce(DoAll(
SignalEvent(&wait_for_db_thread_pause),
diff --git a/chrome/browser/sync/glue/password_change_processor.cc b/chrome/browser/sync/glue/password_change_processor.cc
index 348ce57..67b506d 100644
--- a/chrome/browser/sync/glue/password_change_processor.cc
+++ b/chrome/browser/sync/glue/password_change_processor.cc
@@ -63,11 +63,11 @@ void PasswordChangeProcessor::Observe(
DCHECK(running());
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
- csync::ReadNode password_root(&trans);
+ syncer::ReadNode password_root(&trans);
if (password_root.InitByTagLookup(kPasswordTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Server did not create the top-level password node. "
"We might be running against an out-of-date server.");
@@ -81,11 +81,11 @@ void PasswordChangeProcessor::Observe(
std::string tag = PasswordModelAssociator::MakeTag(change->form());
switch (change->type()) {
case PasswordStoreChange::ADD: {
- csync::WriteNode sync_node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode sync_node(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
sync_node.InitUniqueByCreation(syncable::PASSWORDS, password_root,
tag);
- if (result == csync::WriteNode::INIT_SUCCESS) {
+ if (result == syncer::WriteNode::INIT_SUCCESS) {
PasswordModelAssociator::WriteToSyncNode(change->form(), &sync_node);
model_associator_->Associate(&tag, sync_node.GetId());
break;
@@ -101,14 +101,14 @@ void PasswordChangeProcessor::Observe(
//
// TODO: Remove this. See crbug.com/87855.
int64 sync_id = model_associator_->GetSyncIdFromChromeId(tag);
- if (csync::kInvalidId == sync_id) {
+ if (syncer::kInvalidId == sync_id) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Unable to create or retrieve password node");
LOG(ERROR) << "Invalid sync id.";
return;
}
if (sync_node.InitByIdLookup(sync_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Password node lookup failed.");
LOG(ERROR) << "Password node lookup failed.";
@@ -119,16 +119,16 @@ void PasswordChangeProcessor::Observe(
}
}
case PasswordStoreChange::UPDATE: {
- csync::WriteNode sync_node(&trans);
+ syncer::WriteNode sync_node(&trans);
int64 sync_id = model_associator_->GetSyncIdFromChromeId(tag);
- if (csync::kInvalidId == sync_id) {
+ if (syncer::kInvalidId == sync_id) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Invalid sync id");
LOG(ERROR) << "Invalid sync id.";
return;
} else {
if (sync_node.InitByIdLookup(sync_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Password node lookup failed.");
LOG(ERROR) << "Password node lookup failed.";
@@ -140,9 +140,9 @@ void PasswordChangeProcessor::Observe(
break;
}
case PasswordStoreChange::REMOVE: {
- csync::WriteNode sync_node(&trans);
+ syncer::WriteNode sync_node(&trans);
int64 sync_id = model_associator_->GetSyncIdFromChromeId(tag);
- if (csync::kInvalidId == sync_id) {
+ if (syncer::kInvalidId == sync_id) {
// We've been asked to remove a password that we don't know about.
// That's weird, but apparently we were already in the requested
// state, so it's not really an unrecoverable error. Just return.
@@ -150,7 +150,7 @@ void PasswordChangeProcessor::Observe(
return;
} else {
if (sync_node.InitByIdLookup(sync_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Password node lookup failed.");
return;
@@ -165,15 +165,15 @@ void PasswordChangeProcessor::Observe(
}
void PasswordChangeProcessor::ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) {
DCHECK(expected_loop_ == MessageLoop::current());
if (!running())
return;
- csync::ReadNode password_root(trans);
+ syncer::ReadNode password_root(trans);
if (password_root.InitByTagLookup(kPasswordTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Password root node lookup failed.");
return;
@@ -182,14 +182,14 @@ void PasswordChangeProcessor::ApplyChangesFromSyncModel(
DCHECK(deleted_passwords_.empty() && new_passwords_.empty() &&
updated_passwords_.empty());
- for (csync::ChangeRecordList::const_iterator it =
+ for (syncer::ChangeRecordList::const_iterator it =
changes.Get().begin(); it != changes.Get().end(); ++it) {
- if (csync::ChangeRecord::ACTION_DELETE ==
+ if (syncer::ChangeRecord::ACTION_DELETE ==
it->action) {
DCHECK(it->specifics.has_password())
<< "Password specifics data not present on delete!";
DCHECK(it->extra.get());
- csync::ExtraPasswordChangeRecordData* extra =
+ syncer::ExtraPasswordChangeRecordData* extra =
it->extra.get();
const sync_pb::PasswordSpecificsData& password = extra->unencrypted();
webkit::forms::PasswordForm form;
@@ -199,8 +199,8 @@ void PasswordChangeProcessor::ApplyChangesFromSyncModel(
continue;
}
- csync::ReadNode sync_node(trans);
- if (sync_node.InitByIdLookup(it->id) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode sync_node(trans);
+ if (sync_node.InitByIdLookup(it->id) != syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Password node lookup failed.");
return;
@@ -215,12 +215,12 @@ void PasswordChangeProcessor::ApplyChangesFromSyncModel(
webkit::forms::PasswordForm password;
PasswordModelAssociator::CopyPassword(password_data, &password);
- if (csync::ChangeRecord::ACTION_ADD == it->action) {
+ if (syncer::ChangeRecord::ACTION_ADD == it->action) {
std::string tag(PasswordModelAssociator::MakeTag(password));
model_associator_->Associate(&tag, sync_node.GetId());
new_passwords_.push_back(password);
} else {
- DCHECK_EQ(csync::ChangeRecord::ACTION_UPDATE, it->action);
+ DCHECK_EQ(syncer::ChangeRecord::ACTION_UPDATE, it->action);
updated_passwords_.push_back(password);
}
}
@@ -232,7 +232,7 @@ void PasswordChangeProcessor::CommitChangesFromSyncModel() {
return;
ScopedStopObserving<PasswordChangeProcessor> stop_observing(this);
- csync::SyncError error = model_associator_->WriteToPasswordStore(
+ syncer::SyncError error = model_associator_->WriteToPasswordStore(
&new_passwords_,
&updated_passwords_,
&deleted_passwords_);
diff --git a/chrome/browser/sync/glue/password_change_processor.h b/chrome/browser/sync/glue/password_change_processor.h
index f631236..06eb72c 100644
--- a/chrome/browser/sync/glue/password_change_processor.h
+++ b/chrome/browser/sync/glue/password_change_processor.h
@@ -25,7 +25,7 @@ namespace browser_sync {
class DataTypeErrorHandler;
// This class is responsible for taking changes from the password backend and
-// applying them to the csync 'syncable' model, and vice versa. All
+// applying them to the sync API 'syncable' model, and vice versa. All
// operations and use of this class are from the DB thread on Windows and Linux,
// or the password thread on Mac.
class PasswordChangeProcessor : public ChangeProcessor,
@@ -37,18 +37,18 @@ class PasswordChangeProcessor : public ChangeProcessor,
virtual ~PasswordChangeProcessor();
// content::NotificationObserver implementation.
- // Passwords -> csync model change application.
+ // Passwords -> sync API model change application.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // csync model -> WebDataService change application.
+ // sync API model -> WebDataService change application.
virtual void ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
// Commit changes buffered during ApplyChanges. We must commit them to the
- // password store only after the csync transaction is released, else there
+ // password store only after the sync API transaction is released, else there
// is risk of deadlock due to the password store posting tasks to the UI
// thread (http://crbug.com/70658).
virtual void CommitChangesFromSyncModel() OVERRIDE;
diff --git a/chrome/browser/sync/glue/password_data_type_controller.cc b/chrome/browser/sync/glue/password_data_type_controller.cc
index b9bd690..e431751 100644
--- a/chrome/browser/sync/glue/password_data_type_controller.cc
+++ b/chrome/browser/sync/glue/password_data_type_controller.cc
@@ -32,9 +32,9 @@ syncable::ModelType PasswordDataTypeController::type() const {
return syncable::PASSWORDS;
}
-csync::ModelSafeGroup PasswordDataTypeController::model_safe_group()
+syncer::ModelSafeGroup PasswordDataTypeController::model_safe_group()
const {
- return csync::GROUP_PASSWORD;
+ return syncer::GROUP_PASSWORD;
}
PasswordDataTypeController::~PasswordDataTypeController() {}
@@ -53,7 +53,7 @@ bool PasswordDataTypeController::StartModels() {
password_store_ = PasswordStoreFactory::GetForProfile(
profile(), Profile::EXPLICIT_ACCESS);
if (!password_store_.get()) {
- csync::SyncError error(
+ syncer::SyncError error(
FROM_HERE,
"PasswordStore not initialized, password datatype controller aborting.",
type());
diff --git a/chrome/browser/sync/glue/password_data_type_controller.h b/chrome/browser/sync/glue/password_data_type_controller.h
index 89bf821..f9a0fc7 100644
--- a/chrome/browser/sync/glue/password_data_type_controller.h
+++ b/chrome/browser/sync/glue/password_data_type_controller.h
@@ -26,7 +26,7 @@ class PasswordDataTypeController : public NonFrontendDataTypeController {
// NonFrontendDataTypeController implementation
virtual syncable::ModelType type() const OVERRIDE;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
protected:
virtual ~PasswordDataTypeController();
diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc
index 49ebb21..e91e3ec 100644
--- a/chrome/browser/sync/glue/password_model_associator.cc
+++ b/chrome/browser/sync/glue/password_model_associator.cc
@@ -32,7 +32,7 @@ PasswordModelAssociator::PasswordModelAssociator(
DataTypeErrorHandler* error_handler)
: sync_service_(sync_service),
password_store_(password_store),
- password_node_id_(csync::kInvalidId),
+ password_node_id_(syncer::kInvalidId),
abort_association_pending_(false),
expected_loop_(MessageLoop::current()),
error_handler_(error_handler) {
@@ -47,8 +47,8 @@ PasswordModelAssociator::PasswordModelAssociator(
PasswordModelAssociator::~PasswordModelAssociator() {}
-csync::SyncError PasswordModelAssociator::AssociateModels() {
- csync::SyncError error;
+syncer::SyncError PasswordModelAssociator::AssociateModels() {
+ syncer::SyncError error;
DCHECK(expected_loop_ == MessageLoop::current());
{
base::AutoLock lock(abort_association_pending_lock_);
@@ -72,10 +72,10 @@ csync::SyncError PasswordModelAssociator::AssociateModels() {
PasswordVector new_passwords;
PasswordVector updated_passwords;
{
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode password_root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode password_root(&trans);
if (password_root.InitByTagLookup(kPasswordTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Server did not create the top-level password node. We "
@@ -87,13 +87,13 @@ csync::SyncError PasswordModelAssociator::AssociateModels() {
passwords.begin();
ix != passwords.end(); ++ix) {
if (IsAbortPending()) {
- return csync::SyncError();
+ return syncer::SyncError();
}
std::string tag = MakeTag(**ix);
- csync::ReadNode node(&trans);
+ syncer::ReadNode node(&trans);
if (node.InitByClientTagLookup(syncable::PASSWORDS, tag) ==
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
const sync_pb::PasswordSpecificsData& password =
node.GetPasswordSpecifics();
DCHECK_EQ(tag, MakeTag(password));
@@ -101,9 +101,9 @@ csync::SyncError PasswordModelAssociator::AssociateModels() {
webkit::forms::PasswordForm new_password;
if (MergePasswords(password, **ix, &new_password)) {
- csync::WriteNode write_node(&trans);
+ syncer::WriteNode write_node(&trans);
if (write_node.InitByClientTagLookup(syncable::PASSWORDS, tag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
STLDeleteElements(&passwords);
return error_handler_->CreateAndUploadError(
FROM_HERE,
@@ -116,10 +116,10 @@ csync::SyncError PasswordModelAssociator::AssociateModels() {
Associate(&tag, node.GetId());
} else {
- csync::WriteNode node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode node(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::PASSWORDS, password_root, tag);
- if (result != csync::WriteNode::INIT_SUCCESS) {
+ if (result != syncer::WriteNode::INIT_SUCCESS) {
STLDeleteElements(&passwords);
return error_handler_->CreateAndUploadError(
FROM_HERE,
@@ -138,10 +138,10 @@ csync::SyncError PasswordModelAssociator::AssociateModels() {
STLDeleteElements(&passwords);
int64 sync_child_id = password_root.GetFirstChildId();
- while (sync_child_id != csync::kInvalidId) {
- csync::ReadNode sync_child_node(&trans);
+ while (sync_child_id != syncer::kInvalidId) {
+ syncer::ReadNode sync_child_node(&trans);
if (sync_child_node.InitByIdLookup(sync_child_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to fetch child node.",
@@ -179,13 +179,13 @@ csync::SyncError PasswordModelAssociator::AssociateModels() {
}
bool PasswordModelAssociator::DeleteAllNodes(
- csync::WriteTransaction* trans) {
+ syncer::WriteTransaction* trans) {
DCHECK(expected_loop_ == MessageLoop::current());
for (PasswordToSyncIdMap::iterator node_id = id_map_.begin();
node_id != id_map_.end(); ++node_id) {
- csync::WriteNode sync_node(trans);
+ syncer::WriteNode sync_node(trans);
if (sync_node.InitByIdLookup(node_id->second) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
LOG(ERROR) << "Typed url node lookup failed.";
return false;
}
@@ -197,10 +197,10 @@ bool PasswordModelAssociator::DeleteAllNodes(
return true;
}
-csync::SyncError PasswordModelAssociator::DisassociateModels() {
+syncer::SyncError PasswordModelAssociator::DisassociateModels() {
id_map_.clear();
id_map_inverse_.clear();
- return csync::SyncError();
+ return syncer::SyncError();
}
bool PasswordModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
@@ -212,11 +212,11 @@ bool PasswordModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
<< "might be running against an out-of-date server.";
return false;
}
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode password_node(&trans);
+ syncer::ReadNode password_node(&trans);
if (password_node.InitByIdLookup(password_sync_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
LOG(ERROR) << "Server did not create the top-level password node. We "
<< "might be running against an out-of-date server.";
return false;
@@ -236,7 +236,7 @@ void PasswordModelAssociator::AbortAssociation() {
bool PasswordModelAssociator::CryptoReadyIfNecessary() {
// We only access the cryptographer while holding a transaction.
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
// We always encrypt passwords, so no need to check if encryption is enabled.
return sync_service_->IsCryptographerReady(&trans);
}
@@ -248,7 +248,7 @@ const std::string* PasswordModelAssociator::GetChromeNodeFromSyncId(
bool PasswordModelAssociator::InitSyncNodeFromChromeId(
const std::string& node_id,
- csync::BaseNode* sync_node) {
+ syncer::BaseNode* sync_node) {
return false;
}
@@ -260,13 +260,13 @@ bool PasswordModelAssociator::IsAbortPending() {
int64 PasswordModelAssociator::GetSyncIdFromChromeId(
const std::string& password) {
PasswordToSyncIdMap::const_iterator iter = id_map_.find(password);
- return iter == id_map_.end() ? csync::kInvalidId : iter->second;
+ return iter == id_map_.end() ? syncer::kInvalidId : iter->second;
}
void PasswordModelAssociator::Associate(
const std::string* password, int64 sync_id) {
DCHECK(expected_loop_ == MessageLoop::current());
- DCHECK_NE(csync::kInvalidId, sync_id);
+ DCHECK_NE(syncer::kInvalidId, sync_id);
DCHECK(id_map_.find(*password) == id_map_.end());
DCHECK(id_map_inverse_.find(sync_id) == id_map_inverse_.end());
id_map_[*password] = sync_id;
@@ -284,15 +284,15 @@ void PasswordModelAssociator::Disassociate(int64 sync_id) {
bool PasswordModelAssociator::GetSyncIdForTaggedNode(const std::string& tag,
int64* sync_id) {
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode sync_node(&trans);
- if (sync_node.InitByTagLookup(tag.c_str()) != csync::BaseNode::INIT_OK)
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode sync_node(&trans);
+ if (sync_node.InitByTagLookup(tag.c_str()) != syncer::BaseNode::INIT_OK)
return false;
*sync_id = sync_node.GetId();
return true;
}
-csync::SyncError PasswordModelAssociator::WriteToPasswordStore(
+syncer::SyncError PasswordModelAssociator::WriteToPasswordStore(
const PasswordVector* new_passwords,
const PasswordVector* updated_passwords,
const PasswordVector* deleted_passwords) {
@@ -322,7 +322,7 @@ csync::SyncError PasswordModelAssociator::WriteToPasswordStore(
// we use internal password store interfaces to make changes synchronously.
password_store_->PostNotifyLoginsChanged();
}
- return csync::SyncError();
+ return syncer::SyncError();
}
// static
@@ -390,7 +390,7 @@ bool PasswordModelAssociator::MergePasswords(
// static
void PasswordModelAssociator::WriteToSyncNode(
const webkit::forms::PasswordForm& password_form,
- csync::WriteNode* node) {
+ syncer::WriteNode* node) {
sync_pb::PasswordSpecificsData password;
password.set_scheme(password_form.scheme);
password.set_signon_realm(password_form.signon_realm);
diff --git a/chrome/browser/sync/glue/password_model_associator.h b/chrome/browser/sync/glue/password_model_associator.h
index 440e846..5c995f4 100644
--- a/chrome/browser/sync/glue/password_model_associator.h
+++ b/chrome/browser/sync/glue/password_model_associator.h
@@ -28,7 +28,7 @@ struct PasswordForm;
}
}
-namespace csync {
+namespace syncer {
class WriteNode;
class WriteTransaction;
}
@@ -56,13 +56,13 @@ class PasswordModelAssociator
// PerDataTypeAssociatorInterface implementation.
//
// Iterates through the sync model looking for matched pairs of items.
- virtual csync::SyncError AssociateModels() OVERRIDE;
+ virtual syncer::SyncError AssociateModels() OVERRIDE;
// Delete all password nodes.
- bool DeleteAllNodes(csync::WriteTransaction* trans);
+ bool DeleteAllNodes(syncer::WriteTransaction* trans);
// Clears all associations.
- virtual csync::SyncError DisassociateModels() OVERRIDE;
+ virtual syncer::SyncError DisassociateModels() OVERRIDE;
// The has_nodes out param is true if the sync model has nodes other
// than the permanent tagged nodes.
@@ -79,9 +79,9 @@ class PasswordModelAssociator
// Not implemented.
virtual bool InitSyncNodeFromChromeId(const std::string& node_id,
- csync::BaseNode* sync_node) OVERRIDE;
+ syncer::BaseNode* sync_node) OVERRIDE;
- // Returns the sync id for the given password name, or csync::kInvalidId
+ // Returns the sync id for the given password name, or syncer::kInvalidId
// if the password name is not associated to any sync id.
virtual int64 GetSyncIdFromChromeId(const std::string& node_id) OVERRIDE;
@@ -95,7 +95,7 @@ class PasswordModelAssociator
// |sync_id| with that node's id.
virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id);
- csync::SyncError WriteToPasswordStore(const PasswordVector* new_passwords,
+ syncer::SyncError WriteToPasswordStore(const PasswordVector* new_passwords,
const PasswordVector* updated_passwords,
const PasswordVector* deleted_passwords);
@@ -114,7 +114,7 @@ class PasswordModelAssociator
const webkit::forms::PasswordForm& password_form,
webkit::forms::PasswordForm* new_password);
static void WriteToSyncNode(const webkit::forms::PasswordForm& password_form,
- csync::WriteNode* node);
+ syncer::WriteNode* node);
// Called at various points in model association to determine if the
// user requested an abort.
diff --git a/chrome/browser/sync/glue/password_model_worker.cc b/chrome/browser/sync/glue/password_model_worker.cc
index edc59b7..14e850a 100644
--- a/chrome/browser/sync/glue/password_model_worker.cc
+++ b/chrome/browser/sync/glue/password_model_worker.cc
@@ -19,10 +19,10 @@ PasswordModelWorker::PasswordModelWorker(
DCHECK(password_store);
}
-csync::SyncerError PasswordModelWorker::DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) {
+syncer::SyncerError PasswordModelWorker::DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) {
WaitableEvent done(false, false);
- csync::SyncerError error = csync::UNSET;
+ syncer::SyncerError error = syncer::UNSET;
password_store_->ScheduleTask(
base::Bind(&PasswordModelWorker::CallDoWorkAndSignalTask,
this, work, &done, &error));
@@ -30,16 +30,16 @@ csync::SyncerError PasswordModelWorker::DoWorkAndWaitUntilDone(
return error;
}
-csync::ModelSafeGroup PasswordModelWorker::GetModelSafeGroup() {
- return csync::GROUP_PASSWORD;
+syncer::ModelSafeGroup PasswordModelWorker::GetModelSafeGroup() {
+ return syncer::GROUP_PASSWORD;
}
PasswordModelWorker::~PasswordModelWorker() {}
void PasswordModelWorker::CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
WaitableEvent* done,
- csync::SyncerError *error) {
+ syncer::SyncerError *error) {
*error = work.Run();
done->Signal();
}
diff --git a/chrome/browser/sync/glue/password_model_worker.h b/chrome/browser/sync/glue/password_model_worker.h
index a9fcbb94..ab95b27 100644
--- a/chrome/browser/sync/glue/password_model_worker.h
+++ b/chrome/browser/sync/glue/password_model_worker.h
@@ -21,26 +21,26 @@ class WaitableEvent;
namespace browser_sync {
-// A csync::ModelSafeWorker for password models that accepts requests
+// A syncer::ModelSafeWorker for password models that accepts requests
// from the syncapi that need to be fulfilled on the password thread,
// which is the DB thread on Linux and Windows.
-class PasswordModelWorker : public csync::ModelSafeWorker {
+class PasswordModelWorker : public syncer::ModelSafeWorker {
public:
explicit PasswordModelWorker(
const scoped_refptr<PasswordStore>& password_store);
- // csync::ModelSafeWorker implementation. Called on syncapi SyncerThread.
- virtual csync::SyncerError DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) OVERRIDE;
- virtual csync::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
+ // syncer::ModelSafeWorker implementation. Called on syncapi SyncerThread.
+ virtual syncer::SyncerError DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) OVERRIDE;
+ virtual syncer::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
private:
virtual ~PasswordModelWorker();
void CallDoWorkAndSignalTask(
- const csync::WorkCallback& work,
+ const syncer::WorkCallback& work,
base::WaitableEvent* done,
- csync::SyncerError* error);
+ syncer::SyncerError* error);
scoped_refptr<PasswordStore> password_store_;
DISALLOW_COPY_AND_ASSIGN(PasswordModelWorker);
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 ced562a..e5e8d70 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
@@ -103,7 +103,7 @@ class SyncSearchEngineDataTypeControllerTest : public testing::Test {
scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_;
ProfileSyncServiceMock service_;
scoped_ptr<FakeGenericChangeProcessor> change_processor_;
- csync::FakeSyncableService syncable_service_;
+ syncer::FakeSyncableService syncable_service_;
StartCallbackMock start_callback_;
ModelLoadCallbackMock model_load_callback_;
};
@@ -161,7 +161,7 @@ TEST_F(SyncSearchEngineDataTypeControllerTest, StartAssociationFailed) {
EXPECT_CALL(start_callback_,
Run(DataTypeController::ASSOCIATION_FAILED, _));
syncable_service_.set_merge_data_and_start_syncing_error(
- csync::SyncError(FROM_HERE, "Error", syncable::SEARCH_ENGINES));
+ syncer::SyncError(FROM_HERE, "Error", syncable::SEARCH_ENGINES));
Start();
EXPECT_EQ(DataTypeController::DISABLED, search_engine_dtc_->state());
diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc
index a2509be..7f0c69e 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -240,7 +240,7 @@ void SessionChangeProcessor::Observe(
if (reassociation_needed) {
LOG(WARNING) << "Reassociation of local models triggered.";
- csync::SyncError error;
+ syncer::SyncError error;
error = session_model_associator_->DisassociateModels();
error = session_model_associator_->AssociateModels();
if (error.IsSet()) {
@@ -252,8 +252,8 @@ void SessionChangeProcessor::Observe(
}
void SessionChangeProcessor::ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!running()) {
return;
@@ -261,19 +261,19 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
ScopedStopObserving<SessionChangeProcessor> stop_observing(this);
- csync::ReadNode root(trans);
- if (root.InitByTagLookup(kSessionsTag) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode root(trans);
+ if (root.InitByTagLookup(kSessionsTag) != syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Sessions root node lookup failed.");
return;
}
std::string local_tag = session_model_associator_->GetCurrentMachineTag();
- for (csync::ChangeRecordList::const_iterator it =
+ for (syncer::ChangeRecordList::const_iterator it =
changes.Get().begin(); it != changes.Get().end(); ++it) {
- const csync::ChangeRecord& change = *it;
- csync::ChangeRecord::Action action(change.action);
- if (csync::ChangeRecord::ACTION_DELETE == action) {
+ const syncer::ChangeRecord& change = *it;
+ syncer::ChangeRecord::Action action(change.action);
+ if (syncer::ChangeRecord::ACTION_DELETE == action) {
// Deletions are all or nothing (since we only ever delete entire
// sessions). Therefore we don't care if it's a tab node or meta node,
// and just ensure we've disassociated.
@@ -294,8 +294,8 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
}
// Handle an update or add.
- csync::ReadNode sync_node(trans);
- if (sync_node.InitByIdLookup(change.id) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode sync_node(trans);
+ if (sync_node.InitByIdLookup(change.id) != syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Session node lookup failed.");
return;
diff --git a/chrome/browser/sync/glue/session_change_processor.h b/chrome/browser/sync/glue/session_change_processor.h
index fefdd38..17cb936 100644
--- a/chrome/browser/sync/glue/session_change_processor.h
+++ b/chrome/browser/sync/glue/session_change_processor.h
@@ -22,7 +22,7 @@ class SessionModelAssociator;
class DataTypeErrorHandler;
// This class is responsible for taking changes from the
-// SessionService and applying them to the csync 'syncable'
+// SessionService and applying them to the sync API 'syncable'
// model, and vice versa. All operations and use of this class are
// from the UI thread.
class SessionChangeProcessor : public ChangeProcessor,
@@ -40,16 +40,16 @@ class SessionChangeProcessor : public ChangeProcessor,
virtual ~SessionChangeProcessor();
// content::NotificationObserver implementation.
- // BrowserSessionProvider -> csync model change application.
+ // BrowserSessionProvider -> sync API model change application.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
// ChangeProcessor implementation.
- // csync model -> BrowserSessionProvider change application.
+ // sync API model -> BrowserSessionProvider change application.
virtual void ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
protected:
// ChangeProcessor implementation.
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 3d0b442..a2cf336 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -80,7 +80,7 @@ sync_pb::SessionHeader::DeviceType GetLocalDeviceType() {
#elif defined(OS_WIN)
return sync_pb::SessionHeader_DeviceType_TYPE_WIN;
#elif defined(OS_ANDROID)
- return csync::internal::IsTabletUi() ?
+ return syncer::internal::IsTabletUi() ?
sync_pb::SessionHeader_DeviceType_TYPE_TABLET :
sync_pb::SessionHeader_DeviceType_TYPE_PHONE;
#else
@@ -93,7 +93,7 @@ sync_pb::SessionHeader::DeviceType GetLocalDeviceType() {
SessionModelAssociator::SessionModelAssociator(ProfileSyncService* sync_service,
DataTypeErrorHandler* error_handler)
: tab_pool_(sync_service),
- local_session_syncid_(csync::kInvalidId),
+ local_session_syncid_(syncer::kInvalidId),
sync_service_(sync_service),
stale_session_threshold_days_(kDefaultStaleSessionThresholdDays),
setup_for_test_(false),
@@ -115,7 +115,7 @@ SessionModelAssociator::SessionModelAssociator(ProfileSyncService* sync_service,
SessionModelAssociator::SessionModelAssociator(ProfileSyncService* sync_service,
bool setup_for_test)
: tab_pool_(sync_service),
- local_session_syncid_(csync::kInvalidId),
+ local_session_syncid_(syncer::kInvalidId),
sync_service_(sync_service),
stale_session_threshold_days_(kDefaultStaleSessionThresholdDays),
setup_for_test_(setup_for_test),
@@ -136,7 +136,7 @@ SessionModelAssociator::~SessionModelAssociator() {
bool SessionModelAssociator::InitSyncNodeFromChromeId(
const std::string& id,
- csync::BaseNode* sync_node) {
+ syncer::BaseNode* sync_node) {
NOTREACHED();
return false;
}
@@ -145,9 +145,9 @@ bool SessionModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
DCHECK(CalledOnValidThread());
CHECK(has_nodes);
*has_nodes = false;
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
- if (root.InitByTagLookup(kSessionsTag) != csync::BaseNode::INIT_OK) {
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
+ if (root.InitByTagLookup(kSessionsTag) != syncer::BaseNode::INIT_OK) {
LOG(ERROR) << kNoSessionsFolderError;
return false;
}
@@ -164,10 +164,10 @@ int64 SessionModelAssociator::GetSyncIdFromChromeId(const size_t& id) {
int64 SessionModelAssociator::GetSyncIdFromSessionTag(const std::string& tag) {
DCHECK(CalledOnValidThread());
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode node(&trans);
- if (node.InitByClientTagLookup(SESSIONS, tag) != csync::BaseNode::INIT_OK)
- return csync::kInvalidId;
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode node(&trans);
+ if (node.InitByClientTagLookup(SESSIONS, tag) != syncer::BaseNode::INIT_OK)
+ return syncer::kInvalidId;
return node.GetId();
}
@@ -179,13 +179,13 @@ SessionModelAssociator::GetChromeNodeFromSyncId(int64 sync_id) {
bool SessionModelAssociator::InitSyncNodeFromChromeId(
const size_t& id,
- csync::BaseNode* sync_node) {
+ syncer::BaseNode* sync_node) {
NOTREACHED();
return false;
}
bool SessionModelAssociator::AssociateWindows(bool reload_tabs,
- csync::SyncError* error) {
+ syncer::SyncError* error) {
DCHECK(CalledOnValidThread());
std::string local_tag = GetCurrentMachineTag();
sync_pb::SessionSpecifics specifics;
@@ -273,10 +273,10 @@ bool SessionModelAssociator::AssociateWindows(bool reload_tabs,
// Free memory for closed windows and tabs.
synced_session_tracker_.CleanupSession(local_tag);
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::WriteNode header_node(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteNode header_node(&trans);
if (header_node.InitByIdLookup(local_session_syncid_) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
if (error) {
*error = error_handler_->CreateAndUploadError(
FROM_HERE,
@@ -300,7 +300,7 @@ bool SessionModelAssociator::ShouldSyncWindow(
bool SessionModelAssociator::AssociateTabs(
const std::vector<SyncedTabDelegate*>& tabs,
- csync::SyncError* error) {
+ syncer::SyncError* error) {
DCHECK(CalledOnValidThread());
for (std::vector<SyncedTabDelegate*>::const_iterator i = tabs.begin();
i != tabs.end();
@@ -313,7 +313,7 @@ bool SessionModelAssociator::AssociateTabs(
}
bool SessionModelAssociator::AssociateTab(const SyncedTabDelegate& tab,
- csync::SyncError* error) {
+ syncer::SyncError* error) {
DCHECK(CalledOnValidThread());
int64 sync_id;
SessionID::id_type tab_id = tab.GetSessionId();
@@ -338,7 +338,7 @@ bool SessionModelAssociator::AssociateTab(const SyncedTabDelegate& tab,
if (tab_map_iter == tab_map_.end()) {
// This is a new tab, get a sync node for it.
sync_id = tab_pool_.GetFreeTabNode();
- if (sync_id == csync::kInvalidId) {
+ if (sync_id == syncer::kInvalidId) {
if (error) {
*error = error_handler_->CreateAndUploadError(
FROM_HERE,
@@ -357,7 +357,7 @@ bool SessionModelAssociator::AssociateTab(const SyncedTabDelegate& tab,
tab_map_iter->second->set_tab(&tab);
}
DCHECK(tab_link);
- DCHECK_NE(tab_link->sync_id(), csync::kInvalidId);
+ DCHECK_NE(tab_link->sync_id(), syncer::kInvalidId);
DVLOG(1) << "Reloading tab " << tab_id << " from window "
<< tab.GetWindowId();
@@ -366,7 +366,7 @@ bool SessionModelAssociator::AssociateTab(const SyncedTabDelegate& tab,
bool SessionModelAssociator::WriteTabContentsToSyncModel(
TabLink* tab_link,
- csync::SyncError* error) {
+ syncer::SyncError* error) {
DCHECK(CalledOnValidThread());
const SyncedTabDelegate& tab = *(tab_link->tab());
const SyncedWindowDelegate& window =
@@ -400,9 +400,9 @@ bool SessionModelAssociator::WriteTabContentsToSyncModel(
synced_session_tracker_.GetSession(GetCurrentMachineTag())->modified_time =
base::Time::Now();
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::WriteNode tab_node(&trans);
- if (tab_node.InitByIdLookup(sync_id) != csync::BaseNode::INIT_OK) {
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteNode tab_node(&trans);
+ if (tab_node.InitByIdLookup(sync_id) != syncer::BaseNode::INIT_OK) {
if (error) {
*error = error_handler_->CreateAndUploadError(
FROM_HERE,
@@ -506,7 +506,7 @@ void SessionModelAssociator::AssociateTabContents(
if (!(current_index != prev_tab->current_navigation_index &&
current_index == i)) {
sync_nav->set_timestamp(
- csync::TimeToProtoTime(prev_nav_iter->timestamp()));
+ syncer::TimeToProtoTime(prev_nav_iter->timestamp()));
DVLOG(2) << "Nav to " << sync_nav->virtual_url() << " already known, "
<< "reusing old timestamp " << sync_nav->timestamp();
}
@@ -580,12 +580,12 @@ void SessionModelAssociator::OnFaviconDataAvailable(
DCHECK_EQ(handle, tab_link->favicon_load_handle());
tab_link->set_favicon_load_handle(0);
DCHECK_EQ(favicon.icon_type, history::FAVICON);
- DCHECK_NE(tab_link->sync_id(), csync::kInvalidId);
+ DCHECK_NE(tab_link->sync_id(), syncer::kInvalidId);
// Load the sync tab node and update the favicon data.
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::WriteNode tab_node(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteNode tab_node(&trans);
if (tab_node.InitByIdLookup(tab_link->sync_id()) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
LOG(WARNING) << "Failed to load sync tab node for tab id " << tab_id
<< " and url " << tab_link->url().spec();
return;
@@ -716,7 +716,7 @@ void SessionModelAssociator::PopulateSessionSpecificsNavigation(
}
tab_navigation->set_unique_id(navigation.GetUniqueID());
tab_navigation->set_timestamp(
- csync::TimeToProtoTime(base::Time::Now()));
+ syncer::TimeToProtoTime(base::Time::Now()));
}
void SessionModelAssociator::Associate(const SyncedTabDelegate* tab,
@@ -729,24 +729,24 @@ void SessionModelAssociator::Disassociate(int64 sync_id) {
NOTIMPLEMENTED();
}
-csync::SyncError SessionModelAssociator::AssociateModels() {
+syncer::SyncError SessionModelAssociator::AssociateModels() {
DCHECK(CalledOnValidThread());
- csync::SyncError error;
+ syncer::SyncError error;
// Ensure that we disassociated properly, otherwise memory might leak.
DCHECK(synced_session_tracker_.Empty());
DCHECK_EQ(0U, tab_pool_.capacity());
- local_session_syncid_ = csync::kInvalidId;
+ local_session_syncid_ = syncer::kInvalidId;
// Read any available foreign sessions and load any session data we may have.
// If we don't have any local session data in the db, create a header node.
{
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
+ syncer::ReadNode root(&trans);
if (root.InitByTagLookup(syncable::ModelTypeToRootTag(model_type())) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
kNoSessionsFolderError,
@@ -767,12 +767,12 @@ csync::SyncError SessionModelAssociator::AssociateModels() {
return error;
}
- if (local_session_syncid_ == csync::kInvalidId) {
+ if (local_session_syncid_ == syncer::kInvalidId) {
// The sync db didn't have a header node for us, we need to create one.
- csync::WriteNode write_node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode write_node(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
write_node.InitUniqueByCreation(SESSIONS, root, current_machine_tag_);
- if (result != csync::WriteNode::INIT_SUCCESS) {
+ if (result != syncer::WriteNode::INIT_SUCCESS) {
// If we can't look it up, and we can't create it, chances are there's
// a pre-existing node that has encryption issues. But, since we can't
// load the item, we can't remove it, and error out at this point.
@@ -807,13 +807,13 @@ csync::SyncError SessionModelAssociator::AssociateModels() {
return error;
}
-csync::SyncError SessionModelAssociator::DisassociateModels() {
+syncer::SyncError SessionModelAssociator::DisassociateModels() {
DCHECK(CalledOnValidThread());
DVLOG(1) << "Disassociating local session " << GetCurrentMachineTag();
synced_session_tracker_.Clear();
tab_map_.clear();
tab_pool_.clear();
- local_session_syncid_ = csync::kInvalidId;
+ local_session_syncid_ = syncer::kInvalidId;
current_machine_tag_ = "";
current_session_name_ = "";
load_consumer_.CancelAllRequests();
@@ -826,11 +826,11 @@ csync::SyncError SessionModelAssociator::DisassociateModels() {
chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED,
content::Source<Profile>(sync_service_->profile()),
content::NotificationService::NoDetails());
- return csync::SyncError();
+ return syncer::SyncError();
}
void SessionModelAssociator::InitializeCurrentMachineTag(
- csync::WriteTransaction* trans) {
+ syncer::WriteTransaction* trans) {
DCHECK(CalledOnValidThread());
DCHECK(current_machine_tag_.empty());
std::string persisted_guid;
@@ -891,7 +891,7 @@ void SessionModelAssociator::InitializeCurrentSessionName() {
AsWeakPtr(),
std::string("TestSessionName")));
} else {
- csync::GetSessionName(
+ syncer::GetSessionName(
BrowserThread::GetBlockingPool(),
base::Bind(&SessionModelAssociator::OnSessionNameInitialized,
AsWeakPtr()));
@@ -899,18 +899,18 @@ void SessionModelAssociator::InitializeCurrentSessionName() {
}
bool SessionModelAssociator::UpdateAssociationsFromSyncModel(
- const csync::ReadNode& root,
- csync::WriteTransaction* trans,
- csync::SyncError* error) {
+ const syncer::ReadNode& root,
+ syncer::WriteTransaction* trans,
+ syncer::SyncError* error) {
DCHECK(CalledOnValidThread());
DCHECK(tab_pool_.empty());
- DCHECK_EQ(local_session_syncid_, csync::kInvalidId);
+ DCHECK_EQ(local_session_syncid_, syncer::kInvalidId);
// Iterate through the nodes and associate any foreign sessions.
int64 id = root.GetFirstChildId();
- while (id != csync::kInvalidId) {
- csync::WriteNode sync_node(trans);
- if (sync_node.InitByIdLookup(id) != csync::BaseNode::INIT_OK) {
+ while (id != syncer::kInvalidId) {
+ syncer::WriteNode sync_node(trans);
+ if (sync_node.InitByIdLookup(id) != syncer::BaseNode::INIT_OK) {
if (error) {
*error = error_handler_->CreateAndUploadError(
FROM_HERE,
@@ -933,7 +933,7 @@ bool SessionModelAssociator::UpdateAssociationsFromSyncModel(
} else {
// This is previously stored local session information.
if (specifics.has_header() &&
- local_session_syncid_ == csync::kInvalidId) {
+ local_session_syncid_ == syncer::kInvalidId) {
// This is our previous header node, reuse it.
local_session_syncid_ = id;
if (specifics.header().has_client_name()) {
@@ -1271,7 +1271,7 @@ void SessionModelAssociator::AppendSessionTabNavigation(
}
}
if (specifics.has_timestamp()) {
- timestamp = csync::ProtoTimeToTime(specifics.timestamp());
+ timestamp = syncer::ProtoTimeToTime(specifics.timestamp());
}
if (specifics.has_unique_id()) {
unique_id = specifics.unique_id();
@@ -1327,7 +1327,7 @@ void SessionModelAssociator::LoadForeignTabFavicon(
}
bool SessionModelAssociator::UpdateSyncModelDataFromClient(
- csync::SyncError* error) {
+ syncer::SyncError* error) {
DCHECK(CalledOnValidThread());
// Associate all open windows and their tabs.
@@ -1351,21 +1351,21 @@ int64 SessionModelAssociator::TabNodePool::GetFreeTabNode() {
DCHECK_GT(machine_tag_.length(), 0U);
if (tab_pool_fp_ == -1) {
// Tab pool has no free nodes, allocate new one.
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
- if (root.InitByTagLookup(kSessionsTag) != csync::BaseNode::INIT_OK) {
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
+ if (root.InitByTagLookup(kSessionsTag) != syncer::BaseNode::INIT_OK) {
LOG(ERROR) << kNoSessionsFolderError;
- return csync::kInvalidId;
+ return syncer::kInvalidId;
}
size_t tab_node_id = tab_syncid_pool_.size();
std::string tab_node_tag = TabIdToTag(machine_tag_, tab_node_id);
- csync::WriteNode tab_node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode tab_node(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
tab_node.InitUniqueByCreation(SESSIONS, root, tab_node_tag);
- if (result != csync::WriteNode::INIT_SUCCESS) {
+ if (result != syncer::WriteNode::INIT_SUCCESS) {
LOG(ERROR) << "Could not create new node with tag "
<< tab_node_tag << "!";
- return csync::kInvalidId;
+ return syncer::kInvalidId;
}
// We fill the new node with just enough data so that in case of a crash/bug
// we can identify the node as our own on re-association and reuse it.
@@ -1492,16 +1492,16 @@ void SessionModelAssociator::DeleteForeignSession(const std::string& tag) {
return;
}
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
- if (root.InitByTagLookup(kSessionsTag) != csync::BaseNode::INIT_OK) {
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
+ if (root.InitByTagLookup(kSessionsTag) != syncer::BaseNode::INIT_OK) {
LOG(ERROR) << kNoSessionsFolderError;
return;
}
int64 id = root.GetFirstChildId();
- while (id != csync::kInvalidId) {
- csync::WriteNode sync_node(&trans);
- if (sync_node.InitByIdLookup(id) != csync::BaseNode::INIT_OK) {
+ while (id != syncer::kInvalidId) {
+ syncer::WriteNode sync_node(&trans);
+ if (sync_node.InitByIdLookup(id) != syncer::BaseNode::INIT_OK) {
LOG(ERROR) << "Failed to fetch sync node for id " << id;
continue;
}
@@ -1579,9 +1579,9 @@ void SessionModelAssociator::BlockUntilLocalChangeForTest(
bool SessionModelAssociator::CryptoReadyIfNecessary() {
// We only access the cryptographer while holding a transaction.
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
const syncable::ModelTypeSet encrypted_types =
- csync::GetEncryptedTypes(&trans);
+ syncer::GetEncryptedTypes(&trans);
return !encrypted_types.Has(SESSIONS) ||
sync_service_->IsCryptographerReady(&trans);
}
diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h
index cdf2f8c..69ca7f1 100644
--- a/chrome/browser/sync/glue/session_model_associator.h
+++ b/chrome/browser/sync/glue/session_model_associator.h
@@ -40,11 +40,11 @@ namespace content {
class NavigationEntry;
} // namespace content
-namespace csync {
+namespace syncer {
class BaseTransaction;
class ReadNode;
class WriteTransaction;
-} // namespace csync
+} // namespace syncer
namespace sync_pb {
class SessionHeader;
@@ -86,12 +86,12 @@ class SessionModelAssociator
virtual bool CryptoReadyIfNecessary() OVERRIDE;
// Returns sync id for the given chrome model id.
- // Returns csync::kInvalidId if the sync node is not found for the given
+ // Returns syncer::kInvalidId if the sync node is not found for the given
// chrome id.
virtual int64 GetSyncIdFromChromeId(const size_t& id) OVERRIDE;
// Returns sync id for the given session tag.
- // Returns csync::kInvalidId if the sync node is not found for the given
+ // Returns syncer::kInvalidId if the sync node is not found for the given
// tag
virtual int64 GetSyncIdFromSessionTag(const std::string& tag);
@@ -101,7 +101,7 @@ class SessionModelAssociator
// Not used.
virtual bool InitSyncNodeFromChromeId(const size_t& id,
- csync::BaseNode* sync_node) OVERRIDE;
+ syncer::BaseNode* sync_node) OVERRIDE;
// Not used.
virtual void Associate(const SyncedTabDelegate* tab, int64 sync_id) OVERRIDE;
@@ -119,14 +119,14 @@ class SessionModelAssociator
// |error| gets set if any association error occurred.
// Returns: false if the local session's sync nodes were deleted and
// reassociation is necessary, true otherwise.
- bool AssociateWindows(bool reload_tabs, csync::SyncError* error);
+ bool AssociateWindows(bool reload_tabs, syncer::SyncError* error);
// Loads and reassociates the local tabs referenced in |tabs|.
// |error| gets set if any association error occurred.
// Returns: false if the local session's sync nodes were deleted and
// reassociation is necessary, true otherwise.
bool AssociateTabs(const std::vector<SyncedTabDelegate*>& tabs,
- csync::SyncError* error);
+ syncer::SyncError* error);
// Reassociates a single tab with the sync model. Will check if the tab
// already is associated with a sync node and allocate one if necessary.
@@ -134,23 +134,23 @@ class SessionModelAssociator
// Returns: false if the local session's sync nodes were deleted and
// reassociation is necessary, true otherwise.
bool AssociateTab(const SyncedTabDelegate& tab,
- csync::SyncError* error);
+ syncer::SyncError* error);
// Load any foreign session info stored in sync db and update the sync db
// with local client data. Processes/reuses any sync nodes owned by this
// client and creates any further sync nodes needed to store local header and
// tab info.
- virtual csync::SyncError AssociateModels() OVERRIDE;
+ virtual syncer::SyncError AssociateModels() OVERRIDE;
// Initializes the given sync node from the given chrome node id.
// Returns false if no sync node was found for the given chrome node id or
// if the initialization of sync node fails.
virtual bool InitSyncNodeFromChromeId(const std::string& id,
- csync::BaseNode* sync_node);
+ syncer::BaseNode* sync_node);
// Clear local sync data buffers. Does not delete sync nodes to avoid
// tombstones. TODO(zea): way to eventually delete orphaned nodes.
- virtual csync::SyncError DisassociateModels() OVERRIDE;
+ virtual syncer::SyncError DisassociateModels() OVERRIDE;
// Returns the tag used to uniquely identify this machine's session in the
// sync model.
@@ -312,7 +312,7 @@ class SessionModelAssociator
// Returns the sync_id for the next free tab node. If none are available,
// creates a new tab node.
// Note: We make use of the following "id's"
- // - a sync_id: an int64 used in |csync::InitByIdLookup|
+ // - a sync_id: an int64 used in |syncer::InitByIdLookup|
// - a tab_id: created by session service, unique to this client
// - a tab_node_id: the id for a particular sync tab node. This is used
// to generate the sync tab node tag through:
@@ -387,7 +387,7 @@ class SessionModelAssociator
}
// Initializes the tag corresponding to this machine.
- void InitializeCurrentMachineTag(csync::WriteTransaction* trans);
+ void InitializeCurrentMachineTag(syncer::WriteTransaction* trans);
// Initializes the user visible name for this session
void InitializeCurrentSessionName();
@@ -395,21 +395,21 @@ class SessionModelAssociator
// Updates the server data based upon the current client session. If no node
// corresponding to this machine exists in the sync model, one is created.
// Returns true on success, false if association failed.
- bool UpdateSyncModelDataFromClient(csync::SyncError* error);
+ bool UpdateSyncModelDataFromClient(syncer::SyncError* error);
// Pulls the current sync model from the sync database and returns true upon
// update of the client model. Will associate any foreign sessions as well as
// keep track of any local tab nodes, adding them to our free tab node pool.
- bool UpdateAssociationsFromSyncModel(const csync::ReadNode& root,
- csync::WriteTransaction* trans,
- csync::SyncError* error);
+ bool UpdateAssociationsFromSyncModel(const syncer::ReadNode& root,
+ syncer::WriteTransaction* trans,
+ syncer::SyncError* error);
// Fills a tab sync node with data from a WebContents object. Updates
// |tab_link| with the current url if it's valid and triggers a favicon
// load if the url has changed.
// Returns true on success, false if we need to reassociate due to corruption.
bool WriteTabContentsToSyncModel(TabLink* tab_link,
- csync::SyncError* error);
+ syncer::SyncError* error);
// Decrements the favicon usage counters for the favicon used by |page_url|.
// Deletes the favicon and associated pages from the favicon usage maps
diff --git a/chrome/browser/sync/glue/session_model_associator_unittest.cc b/chrome/browser/sync/glue/session_model_associator_unittest.cc
index bc2db96..8d7f6b4 100644
--- a/chrome/browser/sync/glue/session_model_associator_unittest.cc
+++ b/chrome/browser/sync/glue/session_model_associator_unittest.cc
@@ -596,7 +596,7 @@ TEST_F(SyncSessionModelAssociatorTest, AssociateNewTab) {
sync_pb::SessionTab sync_tab;
GURL new_url;
- int64 now = csync::TimeToProtoTime(base::Time::Now());
+ int64 now = syncer::TimeToProtoTime(base::Time::Now());
AssociateTabContents(window_mock, tab_mock, &prev_tab, &sync_tab, &new_url);
EXPECT_EQ(new_url, entry3->GetVirtualURL());
@@ -650,9 +650,9 @@ TEST_F(SyncSessionModelAssociatorTest, AssociateExistingTab) {
AssociateTabContents(window_mock, tab_mock, &prev_tab, &sync_tab, &new_url);
// Override the timestamps to arbitrary old values we can compare against.
- prev_tab.synced_tab_navigations[0].set_timestamp(csync::ProtoTimeToTime(1));
- prev_tab.synced_tab_navigations[1].set_timestamp(csync::ProtoTimeToTime(2));
- prev_tab.synced_tab_navigations[2].set_timestamp(csync::ProtoTimeToTime(3));
+ prev_tab.synced_tab_navigations[0].set_timestamp(syncer::ProtoTimeToTime(1));
+ prev_tab.synced_tab_navigations[1].set_timestamp(syncer::ProtoTimeToTime(2));
+ prev_tab.synced_tab_navigations[2].set_timestamp(syncer::ProtoTimeToTime(3));
// Now re-associate with the same data.
AssociateTabContents(window_mock, tab_mock, &prev_tab, &sync_tab, &new_url);
@@ -710,9 +710,9 @@ TEST_F(SyncSessionModelAssociatorTest, AssociateAppendedTab) {
AssociateTabContents(window_mock, tab_mock, &prev_tab, &sync_tab, &new_url);
// Override the timestamps to arbitrary old values we can compare against.
- prev_tab.synced_tab_navigations[0].set_timestamp(csync::ProtoTimeToTime(1));
- prev_tab.synced_tab_navigations[1].set_timestamp(csync::ProtoTimeToTime(2));
- prev_tab.synced_tab_navigations[2].set_timestamp(csync::ProtoTimeToTime(3));
+ prev_tab.synced_tab_navigations[0].set_timestamp(syncer::ProtoTimeToTime(1));
+ prev_tab.synced_tab_navigations[1].set_timestamp(syncer::ProtoTimeToTime(2));
+ prev_tab.synced_tab_navigations[2].set_timestamp(syncer::ProtoTimeToTime(3));
// Add a new entry and change the current navigation index.
scoped_ptr<content::NavigationEntry> entry4(
@@ -724,7 +724,7 @@ TEST_F(SyncSessionModelAssociatorTest, AssociateAppendedTab) {
EXPECT_CALL(tab_mock, GetCurrentEntryIndex()).WillRepeatedly(Return(3));
// The new entry should have a timestamp later than this.
- int64 now = csync::TimeToProtoTime(base::Time::Now());
+ int64 now = syncer::TimeToProtoTime(base::Time::Now());
// Now re-associate with the new version.
AssociateTabContents(window_mock, tab_mock, &prev_tab, &sync_tab, &new_url);
@@ -792,10 +792,10 @@ TEST_F(SyncSessionModelAssociatorTest, AssociatePrunedTab) {
AssociateTabContents(window_mock, tab_mock, &prev_tab, &sync_tab, &new_url);
// Override the timestamps to arbitrary old values we can compare against.
- prev_tab.synced_tab_navigations[0].set_timestamp(csync::ProtoTimeToTime(1));
- prev_tab.synced_tab_navigations[1].set_timestamp(csync::ProtoTimeToTime(2));
- prev_tab.synced_tab_navigations[2].set_timestamp(csync::ProtoTimeToTime(3));
- prev_tab.synced_tab_navigations[2].set_timestamp(csync::ProtoTimeToTime(4));
+ prev_tab.synced_tab_navigations[0].set_timestamp(syncer::ProtoTimeToTime(1));
+ prev_tab.synced_tab_navigations[1].set_timestamp(syncer::ProtoTimeToTime(2));
+ prev_tab.synced_tab_navigations[2].set_timestamp(syncer::ProtoTimeToTime(3));
+ prev_tab.synced_tab_navigations[2].set_timestamp(syncer::ProtoTimeToTime(4));
// Reset new tab to have the oldest entry pruned, the current navigation
// set to entry3, and a new entry added in place of entry4.
@@ -814,7 +814,7 @@ TEST_F(SyncSessionModelAssociatorTest, AssociatePrunedTab) {
EXPECT_CALL(tab_mock, GetPendingEntryIndex()).WillRepeatedly(Return(-1));
// The new entry should have a timestamp later than this.
- int64 now = csync::TimeToProtoTime(base::Time::Now());
+ int64 now = syncer::TimeToProtoTime(base::Time::Now());
// Now re-associate with the new version.
AssociateTabContents(window_mock, tab_mock, &prev_tab, &sync_tab, &new_url);
diff --git a/chrome/browser/sync/glue/shared_change_processor.cc b/chrome/browser/sync/glue/shared_change_processor.cc
index b149f98..dd25227 100644
--- a/chrome/browser/sync/glue/shared_change_processor.cc
+++ b/chrome/browser/sync/glue/shared_change_processor.cc
@@ -27,7 +27,7 @@ SharedChangeProcessor::SharedChangeProcessor()
SharedChangeProcessor::~SharedChangeProcessor() {
// We can either be deleted when the DTC is destroyed (on UI
- // thread), or when the csync::SyncableService stop's syncing (datatype
+ // thread), or when the syncer::SyncableService stop's syncing (datatype
// thread). |generic_change_processor_|, if non-NULL, must be
// deleted on |backend_loop_|.
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
@@ -45,7 +45,7 @@ SharedChangeProcessor::~SharedChangeProcessor() {
}
}
-base::WeakPtr<csync::SyncableService> SharedChangeProcessor::Connect(
+base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect(
ProfileSyncComponentsFactory* sync_factory,
ProfileSyncService* sync_service,
DataTypeErrorHandler* error_handler,
@@ -57,16 +57,16 @@ base::WeakPtr<csync::SyncableService> SharedChangeProcessor::Connect(
backend_loop_ = base::MessageLoopProxy::current();
AutoLock lock(monitor_lock_);
if (disconnected_)
- return base::WeakPtr<csync::SyncableService>();
+ return base::WeakPtr<syncer::SyncableService>();
type_ = type;
sync_service_ = sync_service;
error_handler_ = error_handler;
- base::WeakPtr<csync::SyncableService> local_service =
+ base::WeakPtr<syncer::SyncableService> local_service =
sync_factory->GetSyncableServiceForType(type);
if (!local_service.get()) {
NOTREACHED() << "SyncableService destroyed before DTC was stopped.";
disconnected_ = true;
- return base::WeakPtr<csync::SyncableService>();
+ return base::WeakPtr<syncer::SyncableService>();
}
generic_change_processor_ =
sync_factory->CreateGenericChangeProcessor(sync_service_,
@@ -85,29 +85,29 @@ bool SharedChangeProcessor::Disconnect() {
return was_connected;
}
-csync::SyncError SharedChangeProcessor::GetSyncData(
- csync::SyncDataList* current_sync_data) {
+syncer::SyncError SharedChangeProcessor::GetSyncData(
+ syncer::SyncDataList* current_sync_data) {
DCHECK(backend_loop_.get());
DCHECK(backend_loop_->BelongsToCurrentThread());
AutoLock lock(monitor_lock_);
if (disconnected_) {
- csync::SyncError error(FROM_HERE, "Change processor disconnected.", type_);
+ syncer::SyncError error(FROM_HERE, "Change processor disconnected.", type_);
return error;
}
return generic_change_processor_->GetSyncDataForType(type_,
current_sync_data);
}
-csync::SyncError SharedChangeProcessor::ProcessSyncChanges(
+syncer::SyncError SharedChangeProcessor::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& list_of_changes) {
+ const syncer::SyncChangeList& list_of_changes) {
DCHECK(backend_loop_.get());
DCHECK(backend_loop_->BelongsToCurrentThread());
AutoLock lock(monitor_lock_);
if (disconnected_) {
// The DTC that disconnects us must ensure it posts a StopSyncing task.
// If we reach this, it means it just hasn't executed yet.
- csync::SyncError error(FROM_HERE, "Change processor disconnected.", type_);
+ syncer::SyncError error(FROM_HERE, "Change processor disconnected.", type_);
return error;
}
return generic_change_processor_->ProcessSyncChanges(
@@ -138,7 +138,7 @@ bool SharedChangeProcessor::CryptoReadyIfNecessary() {
}
void SharedChangeProcessor::ActivateDataType(
- csync::ModelSafeGroup model_safe_group) {
+ syncer::ModelSafeGroup model_safe_group) {
DCHECK(backend_loop_.get());
DCHECK(backend_loop_->BelongsToCurrentThread());
AutoLock lock(monitor_lock_);
@@ -151,14 +151,14 @@ void SharedChangeProcessor::ActivateDataType(
generic_change_processor_);
}
-csync::SyncError SharedChangeProcessor::CreateAndUploadError(
+syncer::SyncError SharedChangeProcessor::CreateAndUploadError(
const tracked_objects::Location& location,
const std::string& message) {
AutoLock lock(monitor_lock_);
if (!disconnected_) {
return error_handler_->CreateAndUploadError(location, message, type_);
} else {
- return csync::SyncError(location, message, type_);
+ return syncer::SyncError(location, message, type_);
}
}
diff --git a/chrome/browser/sync/glue/shared_change_processor.h b/chrome/browser/sync/glue/shared_change_processor.h
index 9f8499f..5b2fae5 100644
--- a/chrome/browser/sync/glue/shared_change_processor.h
+++ b/chrome/browser/sync/glue/shared_change_processor.h
@@ -20,11 +20,11 @@
class ProfileSyncComponentsFactory;
class ProfileSyncService;
-namespace csync {
+namespace syncer {
class SyncData;
class SyncableService;
-typedef std::vector<csync::SyncData> SyncDataList;
+typedef std::vector<syncer::SyncData> SyncDataList;
} // namespace
namespace browser_sync {
@@ -57,10 +57,10 @@ class SharedChangeProcessor
// Connect to the Syncer and prepare to handle changes for |type|. Will
// create and store a new GenericChangeProcessor and return a weak pointer to
- // the csync::SyncableService associated with |type|.
+ // the syncer::SyncableService associated with |type|.
// Note: If this SharedChangeProcessor has been disconnected, or the
- // csync::SyncableService was not alive, will return a null weak pointer.
- virtual base::WeakPtr<csync::SyncableService> Connect(
+ // syncer::SyncableService was not alive, will return a null weak pointer.
+ virtual base::WeakPtr<syncer::SyncableService> Connect(
ProfileSyncComponentsFactory* sync_factory,
ProfileSyncService* sync_service,
DataTypeErrorHandler* error_handler,
@@ -78,19 +78,20 @@ class SharedChangeProcessor
// GenericChangeProcessor stubs (with disconnect support).
// Should only be called on the same thread the datatype resides.
- virtual csync::SyncError GetSyncData(csync::SyncDataList* current_sync_data);
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError GetSyncData(
+ syncer::SyncDataList* current_sync_data);
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list);
+ const syncer::SyncChangeList& change_list);
virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes);
virtual bool CryptoReadyIfNecessary();
// Register |generic_change_processor_| as the change processor for the
// current type on |model_safe_group|.
// Does nothing if |disconnected_| is true.
- virtual void ActivateDataType(csync::ModelSafeGroup model_safe_group);
+ virtual void ActivateDataType(syncer::ModelSafeGroup model_safe_group);
- virtual csync::SyncError CreateAndUploadError(
+ virtual syncer::SyncError CreateAndUploadError(
const tracked_objects::Location& location,
const std::string& message);
diff --git a/chrome/browser/sync/glue/shared_change_processor_mock.h b/chrome/browser/sync/glue/shared_change_processor_mock.h
index 0fb0887..ec7d141 100644
--- a/chrome/browser/sync/glue/shared_change_processor_mock.h
+++ b/chrome/browser/sync/glue/shared_change_processor_mock.h
@@ -17,22 +17,22 @@ class SharedChangeProcessorMock : public SharedChangeProcessor {
public:
SharedChangeProcessorMock();
- MOCK_METHOD4(Connect, base::WeakPtr<csync::SyncableService>(
+ MOCK_METHOD4(Connect, base::WeakPtr<syncer::SyncableService>(
ProfileSyncComponentsFactory*,
ProfileSyncService*,
DataTypeErrorHandler*,
syncable::ModelType));
MOCK_METHOD0(Disconnect, bool());
MOCK_METHOD2(ProcessSyncChanges,
- csync::SyncError(const tracked_objects::Location&,
- const csync::SyncChangeList&));
+ syncer::SyncError(const tracked_objects::Location&,
+ const syncer::SyncChangeList&));
MOCK_METHOD1(GetSyncData,
- csync::SyncError(csync::SyncDataList*));
+ syncer::SyncError(syncer::SyncDataList*));
MOCK_METHOD1(SyncModelHasUserCreatedNodes,
bool(bool*));
MOCK_METHOD0(CryptoReadyIfNecessary, bool());
MOCK_METHOD1(ActivateDataType,
- void(csync::ModelSafeGroup));
+ void(syncer::ModelSafeGroup));
protected:
virtual ~SharedChangeProcessorMock();
diff --git a/chrome/browser/sync/glue/shared_change_processor_ref.cc b/chrome/browser/sync/glue/shared_change_processor_ref.cc
index 4151e17..12dc2cd 100644
--- a/chrome/browser/sync/glue/shared_change_processor_ref.cc
+++ b/chrome/browser/sync/glue/shared_change_processor_ref.cc
@@ -14,13 +14,13 @@ SharedChangeProcessorRef::SharedChangeProcessorRef(
SharedChangeProcessorRef::~SharedChangeProcessorRef() {}
-csync::SyncError SharedChangeProcessorRef::ProcessSyncChanges(
+syncer::SyncError SharedChangeProcessorRef::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
return change_processor_->ProcessSyncChanges(from_here, change_list);
}
-csync::SyncError SharedChangeProcessorRef::CreateAndUploadError(
+syncer::SyncError SharedChangeProcessorRef::CreateAndUploadError(
const tracked_objects::Location& from_here,
const std::string& message) {
return change_processor_->CreateAndUploadError(from_here, message);
diff --git a/chrome/browser/sync/glue/shared_change_processor_ref.h b/chrome/browser/sync/glue/shared_change_processor_ref.h
index b618430b9..0078c99 100644
--- a/chrome/browser/sync/glue/shared_change_processor_ref.h
+++ b/chrome/browser/sync/glue/shared_change_processor_ref.h
@@ -14,23 +14,23 @@
namespace browser_sync {
-// A csync::SyncChangeProcessor stub for interacting with a refcounted
+// A syncer::SyncChangeProcessor stub for interacting with a refcounted
// SharedChangeProcessor.
-class SharedChangeProcessorRef : public csync::SyncChangeProcessor,
- public csync::SyncErrorFactory {
+class SharedChangeProcessorRef : public syncer::SyncChangeProcessor,
+ public syncer::SyncErrorFactory {
public:
SharedChangeProcessorRef(
const scoped_refptr<browser_sync::SharedChangeProcessor>&
change_processor);
virtual ~SharedChangeProcessorRef();
- // csync::SyncChangeProcessor implementation.
- virtual csync::SyncError ProcessSyncChanges(
+ // syncer::SyncChangeProcessor implementation.
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
- // csync::SyncErrorFactory implementation.
- virtual csync::SyncError CreateAndUploadError(
+ // syncer::SyncErrorFactory implementation.
+ virtual syncer::SyncError CreateAndUploadError(
const tracked_objects::Location& from_here,
const std::string& message) OVERRIDE;
diff --git a/chrome/browser/sync/glue/shared_change_processor_unittest.cc b/chrome/browser/sync/glue/shared_change_processor_unittest.cc
index db2b7b6..f40dc22 100644
--- a/chrome/browser/sync/glue/shared_change_processor_unittest.cc
+++ b/chrome/browser/sync/glue/shared_change_processor_unittest.cc
@@ -86,7 +86,7 @@ class SyncSharedChangeProcessorTest : public testing::Test {
void SetUpDBSyncableService() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
DCHECK(!db_syncable_service_.get());
- db_syncable_service_.reset(new csync::FakeSyncableService());
+ db_syncable_service_.reset(new syncer::FakeSyncableService());
}
// Used by TearDown().
@@ -120,7 +120,7 @@ class SyncSharedChangeProcessorTest : public testing::Test {
StrictMock<DataTypeErrorHandlerMock> error_handler_;
// Used only on DB thread.
- scoped_ptr<csync::FakeSyncableService> db_syncable_service_;
+ scoped_ptr<syncer::FakeSyncableService> db_syncable_service_;
};
// Simply connect the shared change processor. It should succeed, and
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 94cd272..6c33d3f 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -61,8 +61,8 @@ typedef GoogleServiceAuthError AuthError;
namespace browser_sync {
using content::BrowserThread;
-using csync::sessions::SyncSessionSnapshot;
-using csync::SyncCredentials;
+using syncer::sessions::SyncSessionSnapshot;
+using syncer::SyncCredentials;
// Helper macros to log with the syncer thread name; useful when there
// are multiple syncers involved.
@@ -73,7 +73,7 @@ using csync::SyncCredentials;
class SyncBackendHost::Core
: public base::RefCountedThreadSafe<SyncBackendHost::Core>,
- public csync::SyncManager::Observer {
+ public syncer::SyncManager::Observer {
public:
Core(const std::string& name,
const FilePath& sync_data_folder_path,
@@ -83,14 +83,14 @@ class SyncBackendHost::Core
// traffic controller here, forwarding incoming messages to appropriate
// landing threads.
virtual void OnSyncCycleCompleted(
- const csync::sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
+ const syncer::sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
virtual void OnInitializationComplete(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
bool success) OVERRIDE;
virtual void OnConnectionStatusChange(
- csync::ConnectionStatus status) OVERRIDE;
+ syncer::ConnectionStatus status) OVERRIDE;
virtual void OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) OVERRIDE;
virtual void OnPassphraseAccepted() OVERRIDE;
virtual void OnBootstrapTokenUpdated(
@@ -102,7 +102,7 @@ class SyncBackendHost::Core
bool encrypt_everything) OVERRIDE;
virtual void OnEncryptionComplete() OVERRIDE;
virtual void OnActionableError(
- const csync::SyncProtocolError& sync_error) OVERRIDE;
+ const syncer::SyncProtocolError& sync_error) OVERRIDE;
// Note:
//
@@ -117,18 +117,18 @@ class SyncBackendHost::Core
// Called to perform credential update on behalf of
// SyncBackendHost::UpdateCredentials
- void DoUpdateCredentials(const csync::SyncCredentials& credentials);
+ void DoUpdateCredentials(const syncer::SyncCredentials& credentials);
// Called when the user disables or enables a sync type.
void DoUpdateEnabledTypes(const syncable::ModelTypeSet& enabled_types);
// Called to tell the syncapi to start syncing (generally after
// initialization and authentication).
- void DoStartSyncing(const csync::ModelSafeRoutingInfo& routing_info);
+ void DoStartSyncing(const syncer::ModelSafeRoutingInfo& routing_info);
// Called to cleanup disabled types.
void DoRequestCleanupDisabledTypes(
- const csync::ModelSafeRoutingInfo& routing_info);
+ const syncer::ModelSafeRoutingInfo& routing_info);
// Called to set the passphrase for encryption.
void DoSetEncryptionPassphrase(const std::string& passphrase,
@@ -160,9 +160,9 @@ class SyncBackendHost::Core
void DoShutdown(bool stopping_sync);
virtual void DoRequestConfig(
- const csync::ModelSafeRoutingInfo& routing_info,
+ const syncer::ModelSafeRoutingInfo& routing_info,
syncable::ModelTypeSet types_to_config,
- csync::ConfigureReason reason);
+ syncer::ConfigureReason reason);
// Start the configuration mode. |callback| is called on the sync
// thread.
@@ -172,7 +172,7 @@ class SyncBackendHost::Core
// This method will add a reference to the context to persist it
// on the IO thread. Must be removed from IO thread.
- csync::SyncManager* sync_manager() { return sync_manager_.get(); }
+ syncer::SyncManager* sync_manager() { return sync_manager_.get(); }
// Delete the sync data folder to cleanup backend data. Happens the first
// time sync is enabled for a user (to prevent accidentally reusing old
@@ -209,7 +209,7 @@ class SyncBackendHost::Core
const FilePath sync_data_folder_path_;
// Our parent SyncBackendHost.
- csync::WeakHandle<SyncBackendHost> host_;
+ syncer::WeakHandle<SyncBackendHost> host_;
// The loop where all the sync backend operations happen.
// Non-NULL only between calls to DoInitialize() and DoShutdown().
@@ -226,7 +226,7 @@ class SyncBackendHost::Core
ChromeEncryptor encryptor_;
// The top-level syncapi entry point. Lives on the sync thread.
- scoped_ptr<csync::SyncManager> sync_manager_;
+ scoped_ptr<syncer::SyncManager> sync_manager_;
DISALLOW_COPY_AND_ASSIGN(Core);
};
@@ -312,7 +312,7 @@ SyncBackendHost::SyncBackendHost(Profile* profile)
ParseNotifierOptions(*CommandLine::ForCurrentProcess(),
profile_->GetRequestContext()),
content::GetUserAgent(GURL()),
- base::WeakPtr<csync::InvalidationStateTracker>()),
+ base::WeakPtr<syncer::InvalidationStateTracker>()),
frontend_(NULL) {
}
@@ -355,7 +355,7 @@ std::string MakeUserAgentForSyncApi() {
return user_agent;
}
-csync::HttpPostProviderFactory* MakeHttpBridgeFactory(
+syncer::HttpPostProviderFactory* MakeHttpBridgeFactory(
const scoped_refptr<net::URLRequestContextGetter>& getter) {
return new HttpBridgeFactory(getter, MakeUserAgentForSyncApi());
}
@@ -364,13 +364,13 @@ csync::HttpPostProviderFactory* MakeHttpBridgeFactory(
void SyncBackendHost::Initialize(
SyncFrontend* frontend,
- const csync::WeakHandle<csync::JsEventHandler>& event_handler,
+ const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
const GURL& sync_service_url,
syncable::ModelTypeSet initial_types,
const SyncCredentials& credentials,
bool delete_sync_data_folder,
- csync::UnrecoverableErrorHandler* unrecoverable_error_handler,
- csync::ReportUnrecoverableErrorFunction
+ syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
+ syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function) {
if (!sync_thread_.Start())
return;
@@ -388,8 +388,8 @@ void SyncBackendHost::Initialize(
name_,
profile_,
sync_thread_.message_loop()));
- csync::ModelSafeRoutingInfo routing_info;
- std::vector<csync::ModelSafeWorker*> workers;
+ syncer::ModelSafeRoutingInfo routing_info;
+ std::vector<syncer::ModelSafeWorker*> workers;
registrar_->GetModelSafeRoutingInfo(&routing_info);
registrar_->GetWorkers(&workers);
@@ -409,7 +409,7 @@ void SyncBackendHost::Initialize(
&sync_notifier_factory_,
delete_sync_data_folder,
sync_prefs_->GetEncryptionBootstrapToken(),
- csync::SyncManager::NON_TEST,
+ syncer::SyncManager::NON_TEST,
unrecoverable_error_handler,
report_unrecoverable_error_function));
}
@@ -423,7 +423,7 @@ void SyncBackendHost::UpdateCredentials(const SyncCredentials& credentials) {
void SyncBackendHost::StartSyncingWithServer() {
SDVLOG(1) << "SyncBackendHost::StartSyncingWithServer called.";
- csync::ModelSafeRoutingInfo routing_info;
+ syncer::ModelSafeRoutingInfo routing_info;
registrar_->GetModelSafeRoutingInfo(&routing_info);
sync_thread_.message_loop()->PostTask(FROM_HERE,
@@ -585,7 +585,7 @@ void SyncBackendHost::Shutdown(bool sync_disabled) {
}
void SyncBackendHost::ConfigureDataTypes(
- csync::ConfigureReason reason,
+ syncer::ConfigureReason reason,
syncable::ModelTypeSet types_to_add,
syncable::ModelTypeSet types_to_remove,
NigoriState nigori_state,
@@ -618,7 +618,7 @@ void SyncBackendHost::ConfigureDataTypes(
// callers can assume that the data types are cleaned up once
// configuration is done.
if (!types_to_remove_with_nigori.Empty()) {
- csync::ModelSafeRoutingInfo routing_info;
+ syncer::ModelSafeRoutingInfo routing_info;
registrar_->GetModelSafeRoutingInfo(&routing_info);
sync_thread_.message_loop()->PostTask(
FROM_HERE,
@@ -647,7 +647,7 @@ void SyncBackendHost::EnableEncryptEverything() {
}
void SyncBackendHost::ActivateDataType(
- syncable::ModelType type, csync::ModelSafeGroup group,
+ syncable::ModelType type, syncer::ModelSafeGroup group,
ChangeProcessor* change_processor) {
registrar_->ActivateDataType(type, group, change_processor, GetUserShare());
}
@@ -656,7 +656,7 @@ void SyncBackendHost::DeactivateDataType(syncable::ModelType type) {
registrar_->DeactivateDataType(type);
}
-csync::UserShare* SyncBackendHost::GetUserShare() const {
+syncer::UserShare* SyncBackendHost::GetUserShare() const {
DCHECK(initialized());
return core_->sync_manager()->GetUserShare();
}
@@ -689,12 +689,12 @@ bool SyncBackendHost::IsUsingExplicitPassphrase() {
}
bool SyncBackendHost::IsCryptographerReady(
- const csync::BaseTransaction* trans) const {
+ const syncer::BaseTransaction* trans) const {
return initialized() && trans->GetCryptographer()->is_ready();
}
void SyncBackendHost::GetModelSafeRoutingInfo(
- csync::ModelSafeRoutingInfo* out) const {
+ syncer::ModelSafeRoutingInfo* out) const {
if (initialized()) {
CHECK(registrar_.get());
registrar_->GetModelSafeRoutingInfo(out);
@@ -791,7 +791,7 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
<< "FinishConfigureDataTypesOnFrontendLoop";
- csync::ModelSafeRoutingInfo routing_info;
+ syncer::ModelSafeRoutingInfo routing_info;
registrar_->GetModelSafeRoutingInfo(&routing_info);
const syncable::ModelTypeSet enabled_types =
GetRoutingInfoTypes(routing_info);
@@ -811,7 +811,7 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
// to true. However this is a very corner case. So it is not explicitly
// handled.
pending_config_mode_state_->added_types =
- csync::GetTypesWithEmptyProgressMarkerToken(enabled_types,
+ syncer::GetTypesWithEmptyProgressMarkerToken(enabled_types,
GetUserShare());
}
@@ -839,7 +839,7 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
SDVLOG(1) << "Types "
<< syncable::ModelTypeSetToString(types_to_config)
<< " added; calling DoRequestConfig";
- csync::ModelSafeRoutingInfo routing_info;
+ syncer::ModelSafeRoutingInfo routing_info;
registrar_->GetModelSafeRoutingInfo(&routing_info);
sync_thread_.message_loop()->PostTask(FROM_HERE,
base::Bind(&SyncBackendHost::Core::DoRequestConfig,
@@ -864,20 +864,20 @@ bool SyncBackendHost::IsDownloadingNigoriForTest() const {
SyncBackendHost::DoInitializeOptions::DoInitializeOptions(
MessageLoop* sync_loop,
SyncBackendRegistrar* registrar,
- const csync::ModelSafeRoutingInfo& routing_info,
- const std::vector<csync::ModelSafeWorker*>& workers,
- csync::ExtensionsActivityMonitor* extensions_activity_monitor,
- const csync::WeakHandle<csync::JsEventHandler>& event_handler,
+ const syncer::ModelSafeRoutingInfo& routing_info,
+ const std::vector<syncer::ModelSafeWorker*>& workers,
+ syncer::ExtensionsActivityMonitor* extensions_activity_monitor,
+ const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
const GURL& service_url,
MakeHttpBridgeFactoryFn make_http_bridge_factory_fn,
- const csync::SyncCredentials& credentials,
+ const syncer::SyncCredentials& credentials,
ChromeSyncNotificationBridge* chrome_sync_notification_bridge,
- csync::SyncNotifierFactory* sync_notifier_factory,
+ syncer::SyncNotifierFactory* sync_notifier_factory,
bool delete_sync_data_folder,
const std::string& restored_key_for_bootstrapping,
- csync::SyncManager::TestingMode testing_mode,
- csync::UnrecoverableErrorHandler* unrecoverable_error_handler,
- csync::ReportUnrecoverableErrorFunction
+ syncer::SyncManager::TestingMode testing_mode,
+ syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
+ syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function)
: sync_loop(sync_loop),
registrar(registrar),
@@ -918,7 +918,7 @@ SyncBackendHost::Core::~Core() {
SyncBackendHost::PendingConfigureDataTypesState::
PendingConfigureDataTypesState()
- : reason(csync::CONFIGURE_REASON_UNKNOWN),
+ : reason(syncer::CONFIGURE_REASON_UNKNOWN),
retry_in_progress(false) {}
SyncBackendHost::PendingConfigureDataTypesState::
@@ -937,7 +937,7 @@ void SyncBackendHost::Core::OnSyncCycleCompleted(
void SyncBackendHost::Core::OnInitializationComplete(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
bool success) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
host_.Call(
@@ -953,7 +953,7 @@ void SyncBackendHost::Core::OnInitializationComplete(
}
void SyncBackendHost::Core::OnConnectionStatusChange(
- csync::ConnectionStatus status) {
+ syncer::ConnectionStatus status) {
if (!sync_loop_)
return;
DCHECK_EQ(MessageLoop::current(), sync_loop_);
@@ -963,7 +963,7 @@ void SyncBackendHost::Core::OnConnectionStatusChange(
}
void SyncBackendHost::Core::OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) {
if (!sync_loop_)
return;
@@ -1034,7 +1034,7 @@ void SyncBackendHost::Core::OnEncryptionComplete() {
}
void SyncBackendHost::Core::OnActionableError(
- const csync::SyncProtocolError& sync_error) {
+ const syncer::SyncProtocolError& sync_error) {
if (!sync_loop_)
return;
DCHECK_EQ(MessageLoop::current(), sync_loop_);
@@ -1064,7 +1064,7 @@ void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) {
registrar_ = options.registrar;
DCHECK(registrar_);
- sync_manager_.reset(new csync::SyncManager(name_));
+ sync_manager_.reset(new syncer::SyncManager(name_));
sync_manager_->AddObserver(this);
success = sync_manager_->Init(
sync_data_folder_path_,
@@ -1114,13 +1114,13 @@ void SyncBackendHost::Core::DoUpdateEnabledTypes(
}
void SyncBackendHost::Core::DoStartSyncing(
- const csync::ModelSafeRoutingInfo& routing_info) {
+ const syncer::ModelSafeRoutingInfo& routing_info) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
sync_manager_->StartSyncingNormally(routing_info);
}
void SyncBackendHost::Core::DoRequestCleanupDisabledTypes(
- const csync::ModelSafeRoutingInfo& routing_info) {
+ const syncer::ModelSafeRoutingInfo& routing_info) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
sync_manager_->RequestCleanupDisabledTypes(routing_info);
}
@@ -1177,9 +1177,9 @@ void SyncBackendHost::Core::DoShutdown(bool sync_disabled) {
}
void SyncBackendHost::Core::DoRequestConfig(
- const csync::ModelSafeRoutingInfo& routing_info,
+ const syncer::ModelSafeRoutingInfo& routing_info,
syncable::ModelTypeSet types_to_config,
- csync::ConfigureReason reason) {
+ syncer::ConfigureReason reason) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
sync_manager_->RequestConfig(routing_info, types_to_config, reason);
}
@@ -1224,7 +1224,7 @@ void SyncBackendHost::Core::SaveChanges() {
void SyncBackendHost::AddExperimentalTypes() {
CHECK(initialized());
- csync::Experiments experiments;
+ syncer::Experiments experiments;
if (core_->sync_manager()->ReceivedExperiment(&experiments))
frontend_->OnExperimentsChanged(experiments);
}
@@ -1238,7 +1238,7 @@ void SyncBackendHost::OnNigoriDownloadRetry() {
}
void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop(
- const csync::WeakHandle<csync::JsBackend>& js_backend, bool success) {
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) {
DCHECK_NE(NOT_ATTEMPTED, initialization_state_);
if (!frontend_)
return;
@@ -1252,7 +1252,7 @@ void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop(
if (!success) {
initialization_state_ = NOT_INITIALIZED;
frontend_->OnBackendInitialized(
- csync::WeakHandle<csync::JsBackend>(), false);
+ syncer::WeakHandle<syncer::JsBackend>(), false);
return;
}
@@ -1269,7 +1269,7 @@ void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop(
case NOT_INITIALIZED:
initialization_state_ = DOWNLOADING_NIGORI;
ConfigureDataTypes(
- csync::CONFIGURE_REASON_NEW_CLIENT,
+ syncer::CONFIGURE_REASON_NEW_CLIENT,
syncable::ModelTypeSet(),
syncable::ModelTypeSet(),
WITH_NIGORI,
@@ -1311,7 +1311,7 @@ void SyncBackendHost::PersistEncryptionBootstrapToken(
}
void SyncBackendHost::HandleActionableErrorEventOnFrontendLoop(
- const csync::SyncProtocolError& sync_error) {
+ const syncer::SyncProtocolError& sync_error) {
if (!frontend_)
return;
DCHECK_EQ(MessageLoop::current(), frontend_loop_);
@@ -1322,7 +1322,7 @@ bool SyncBackendHost::CheckPassphraseAgainstCachedPendingKeys(
const std::string& passphrase) const {
DCHECK(cached_pending_keys_.has_blob());
DCHECK(!passphrase.empty());
- csync::Nigori nigori;
+ syncer::Nigori nigori;
nigori.InitByDerivation("localhost", "dummy", passphrase);
std::string plaintext;
bool result = nigori.Decrypt(cached_pending_keys_.blob(), &plaintext);
@@ -1330,7 +1330,7 @@ bool SyncBackendHost::CheckPassphraseAgainstCachedPendingKeys(
}
void SyncBackendHost::NotifyPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
sync_pb::EncryptedData pending_keys) {
if (!frontend_)
return;
@@ -1389,7 +1389,7 @@ void SyncBackendHost::HandleStopSyncingPermanentlyOnFrontendLoop() {
}
void SyncBackendHost::HandleConnectionStatusChangeOnFrontendLoop(
- csync::ConnectionStatus status) {
+ syncer::ConnectionStatus status) {
if (!frontend_)
return;
@@ -1399,7 +1399,7 @@ void SyncBackendHost::HandleConnectionStatusChangeOnFrontendLoop(
}
void SyncBackendHost::HandleNigoriConfigurationCompletedOnFrontendLoop(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
const syncable::ModelTypeSet failed_configuration_types) {
HandleInitializationCompletedOnFrontendLoop(
js_backend, failed_configuration_types.Empty());
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index c417d6b..b577fd2 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -62,7 +62,8 @@ class SyncFrontend {
// from the 'Backend' in 'OnBackendInitialized' (unfortunately). It
// is initialized only if |success| is true.
virtual void OnBackendInitialized(
- const csync::WeakHandle<csync::JsBackend>& js_backend, bool success) = 0;
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
+ bool success) = 0;
// The backend queried the server recently and received some updates.
virtual void OnSyncCycleCompleted() = 0;
@@ -73,7 +74,7 @@ class SyncFrontend {
// The status of the connection to the sync server has changed.
virtual void OnConnectionStatusChange(
- csync::ConnectionStatus status) = 0;
+ syncer::ConnectionStatus status) = 0;
// We are no longer permitted to communicate with the server. Sync should
// be disabled and state cleaned up at once.
@@ -86,7 +87,7 @@ class SyncFrontend {
// cryptographer's pending keys to be passed on to the frontend in order to
// be cached.
virtual void OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) = 0;
// Called when the passphrase provided by the user is
@@ -100,11 +101,11 @@ class SyncFrontend {
// below).
//
// |encrypted_types| will always be a superset of
- // csync::Cryptographer::SensitiveTypes(). If |encrypt_everything| is
+ // syncer::Cryptographer::SensitiveTypes(). If |encrypt_everything| is
// true, |encrypted_types| will be the set of all known types.
//
// Until this function is called, observers can assume that the set
- // of encrypted types is csync::Cryptographer::SensitiveTypes() and that
+ // of encrypted types is syncer::Cryptographer::SensitiveTypes() and that
// the encrypt everything flag is false.
virtual void OnEncryptedTypesChanged(
syncable::ModelTypeSet encrypted_types,
@@ -120,11 +121,11 @@ class SyncFrontend {
// Inform the Frontend that new datatypes are available for registration.
virtual void OnExperimentsChanged(
- const csync::Experiments& experiments) = 0;
+ const syncer::Experiments& experiments) = 0;
// Called when the sync cycle returns there is an user actionable error.
virtual void OnActionableError(
- const csync::SyncProtocolError& error) = 0;
+ const syncer::SyncProtocolError& error) = 0;
protected:
// Don't delete through SyncFrontend interface.
@@ -140,7 +141,7 @@ class SyncFrontend {
// that the SyncFrontend is only accessed on the UI loop.
class SyncBackendHost : public BackendDataTypeConfigurer {
public:
- typedef csync::SyncStatus Status;
+ typedef syncer::SyncStatus Status;
// Create a SyncBackendHost with a reference to the |frontend| that
// it serves and communicates to via the SyncFrontend interface (on
@@ -164,18 +165,19 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Optionally delete the Sync Data folder (if it's corrupt).
// |report_unrecoverable_error_function| can be NULL.
// Note: |unrecoverable_error_handler| may be invoked from any thread.
- void Initialize(SyncFrontend* frontend,
- const csync::WeakHandle<csync::JsEventHandler>& event_handler,
- const GURL& service_url,
- syncable::ModelTypeSet initial_types,
- const csync::SyncCredentials& credentials,
- bool delete_sync_data_folder,
- csync::UnrecoverableErrorHandler* unrecoverable_error_handler,
- csync::ReportUnrecoverableErrorFunction
- report_unrecoverable_error_function);
+ void Initialize(
+ SyncFrontend* frontend,
+ const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
+ const GURL& service_url,
+ syncable::ModelTypeSet initial_types,
+ const syncer::SyncCredentials& credentials,
+ bool delete_sync_data_folder,
+ syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
+ syncer::ReportUnrecoverableErrorFunction
+ report_unrecoverable_error_function);
// Called from |frontend_loop| to update SyncCredentials.
- void UpdateCredentials(const csync::SyncCredentials& credentials);
+ void UpdateCredentials(const syncer::SyncCredentials& credentials);
// This starts the SyncerThread running a Syncer object to communicate with
// sync servers. Until this is called, no changes will leave or enter this
@@ -221,7 +223,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// set of all types that failed configuration (i.e., if its argument
// is non-empty, then an error was encountered).
virtual void ConfigureDataTypes(
- csync::ConfigureReason reason,
+ syncer::ConfigureReason reason,
syncable::ModelTypeSet types_to_add,
syncable::ModelTypeSet types_to_remove,
NigoriState nigori_state,
@@ -240,7 +242,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// no changes are dropped between model association and change
// processor activation.
void ActivateDataType(
- syncable::ModelType type, csync::ModelSafeGroup group,
+ syncable::ModelType type, syncer::ModelSafeGroup group,
ChangeProcessor* change_processor);
// Deactivates change processing for the given data type.
@@ -248,12 +250,12 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Called on |frontend_loop_| to obtain a handle to the UserShare needed
// for creating transactions.
- csync::UserShare* GetUserShare() const;
+ syncer::UserShare* GetUserShare() const;
// Called from any thread to obtain current status information in detailed or
// summarized form.
Status GetDetailedStatus();
- csync::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const;
+ syncer::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const;
// Determines if the underlying sync engine has made any local changes to
// items that have not yet been synced with the server.
@@ -269,9 +271,9 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// True if the cryptographer has any keys available to attempt decryption.
// Could mean we've downloaded and loaded Nigori objects, or we bootstrapped
// using a token previously received.
- bool IsCryptographerReady(const csync::BaseTransaction* trans) const;
+ bool IsCryptographerReady(const syncer::BaseTransaction* trans) const;
- void GetModelSafeRoutingInfo(csync::ModelSafeRoutingInfo* out) const;
+ void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out) const;
protected:
// The types and functions below are protected so that test
@@ -280,48 +282,48 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// TODO(akalin): Figure out a better way for tests to hook into
// SyncBackendHost.
- typedef base::Callback<csync::HttpPostProviderFactory*(void)>
+ typedef base::Callback<syncer::HttpPostProviderFactory*(void)>
MakeHttpBridgeFactoryFn;
struct DoInitializeOptions {
DoInitializeOptions(
MessageLoop* sync_loop,
SyncBackendRegistrar* registrar,
- const csync::ModelSafeRoutingInfo& routing_info,
- const std::vector<csync::ModelSafeWorker*>& workers,
- csync::ExtensionsActivityMonitor* extensions_activity_monitor,
- const csync::WeakHandle<csync::JsEventHandler>& event_handler,
+ const syncer::ModelSafeRoutingInfo& routing_info,
+ const std::vector<syncer::ModelSafeWorker*>& workers,
+ syncer::ExtensionsActivityMonitor* extensions_activity_monitor,
+ const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
const GURL& service_url,
MakeHttpBridgeFactoryFn make_http_bridge_factory_fn,
- const csync::SyncCredentials& credentials,
+ const syncer::SyncCredentials& credentials,
ChromeSyncNotificationBridge* chrome_sync_notification_bridge,
- csync::SyncNotifierFactory* sync_notifier_factory,
+ syncer::SyncNotifierFactory* sync_notifier_factory,
bool delete_sync_data_folder,
const std::string& restored_key_for_bootstrapping,
- csync::SyncManager::TestingMode testing_mode,
- csync::UnrecoverableErrorHandler* unrecoverable_error_handler,
- csync::ReportUnrecoverableErrorFunction
+ syncer::SyncManager::TestingMode testing_mode,
+ syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
+ syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function);
~DoInitializeOptions();
MessageLoop* sync_loop;
SyncBackendRegistrar* registrar;
- csync::ModelSafeRoutingInfo routing_info;
- std::vector<csync::ModelSafeWorker*> workers;
- csync::ExtensionsActivityMonitor* extensions_activity_monitor;
- csync::WeakHandle<csync::JsEventHandler> event_handler;
+ syncer::ModelSafeRoutingInfo routing_info;
+ std::vector<syncer::ModelSafeWorker*> workers;
+ syncer::ExtensionsActivityMonitor* extensions_activity_monitor;
+ syncer::WeakHandle<syncer::JsEventHandler> event_handler;
GURL service_url;
// Overridden by tests.
MakeHttpBridgeFactoryFn make_http_bridge_factory_fn;
- csync::SyncCredentials credentials;
+ syncer::SyncCredentials credentials;
ChromeSyncNotificationBridge* const chrome_sync_notification_bridge;
- csync::SyncNotifierFactory* const sync_notifier_factory;
+ syncer::SyncNotifierFactory* const sync_notifier_factory;
std::string lsid;
bool delete_sync_data_folder;
std::string restored_key_for_bootstrapping;
- csync::SyncManager::TestingMode testing_mode;
- csync::UnrecoverableErrorHandler* unrecoverable_error_handler;
- csync::ReportUnrecoverableErrorFunction
+ syncer::SyncManager::TestingMode testing_mode;
+ syncer::UnrecoverableErrorHandler* unrecoverable_error_handler;
+ syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function;
};
@@ -331,7 +333,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Called from Core::OnSyncCycleCompleted to handle updating frontend
// thread components.
void HandleSyncCycleCompletedOnFrontendLoop(
- const csync::sessions::SyncSessionSnapshot& snapshot);
+ const syncer::sessions::SyncSessionSnapshot& snapshot);
// Called to finish the job of ConfigureDataTypes once the syncer is in
// configuration mode.
@@ -382,7 +384,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Additional details about which types were added.
syncable::ModelTypeSet added_types;
- csync::ConfigureReason reason;
+ syncer::ConfigureReason reason;
bool retry_in_progress;
};
@@ -398,7 +400,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// on to |frontend_|, and so that tests can intercept here if they need to
// set up initial conditions.
virtual void HandleInitializationCompletedOnFrontendLoop(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
bool success);
// Helpers to persist a token that can be used to bootstrap sync encryption
@@ -412,7 +414,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Let the front end handle the actionable error event.
void HandleActionableErrorEventOnFrontendLoop(
- const csync::SyncProtocolError& sync_error);
+ const syncer::SyncProtocolError& sync_error);
// Checks if |passphrase| can be used to decrypt the cryptographer's pending
// keys that were cached during NotifyPassphraseRequired. Returns true if
@@ -427,7 +429,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// cached by the frontend. If there are no pending keys, or if the passphrase
// required reason is REASON_ENCRYPTION, an empty EncryptedData object is
// passed.
- void NotifyPassphraseRequired(csync::PassphraseRequiredReason reason,
+ void NotifyPassphraseRequired(syncer::PassphraseRequiredReason reason,
sync_pb::EncryptedData pending_keys);
// Invoked when the passphrase provided by the user has been accepted.
@@ -450,12 +452,12 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Dispatched to from OnConnectionStatusChange to handle updating
// frontend UI components.
void HandleConnectionStatusChangeOnFrontendLoop(
- csync::ConnectionStatus status);
+ syncer::ConnectionStatus status);
// Called when configuration of the Nigori node has completed as
// part of the initialization process.
void HandleNigoriConfigurationCompletedOnFrontendLoop(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
syncable::ModelTypeSet failed_configuration_types);
// Must be called on |frontend_loop_|. |done_callback| is called on
@@ -491,7 +493,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// chrome events.
ChromeSyncNotificationBridge chrome_sync_notification_bridge_;
- csync::SyncNotifierFactory sync_notifier_factory_;
+ syncer::SyncNotifierFactory sync_notifier_factory_;
ChromeExtensionsActivityMonitor extensions_activity_monitor_;
@@ -514,7 +516,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
sync_pb::EncryptedData cached_pending_keys_;
// UI-thread cache of the last SyncSessionSnapshot received from syncapi.
- csync::sessions::SyncSessionSnapshot last_snapshot_;
+ syncer::sessions::SyncSessionSnapshot last_snapshot_;
DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
};
diff --git a/chrome/browser/sync/glue/sync_backend_host_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
index f6de9ae..2fa250d 100644
--- a/chrome/browser/sync/glue/sync_backend_host_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
@@ -34,15 +34,15 @@ class MockSyncFrontend : public SyncFrontend {
virtual ~MockSyncFrontend() {}
MOCK_METHOD2(OnBackendInitialized,
- void(const csync::WeakHandle<csync::JsBackend>&, bool));
+ void(const syncer::WeakHandle<syncer::JsBackend>&, bool));
MOCK_METHOD0(OnSyncCycleCompleted, void());
MOCK_METHOD1(OnConnectionStatusChange,
- void(csync::ConnectionStatus status));
+ void(syncer::ConnectionStatus status));
MOCK_METHOD0(OnStopSyncingPermanently, void());
MOCK_METHOD0(OnClearServerDataSucceeded, void());
MOCK_METHOD0(OnClearServerDataFailed, void());
MOCK_METHOD2(OnPassphraseRequired,
- void(csync::PassphraseRequiredReason,
+ void(syncer::PassphraseRequiredReason,
const sync_pb::EncryptedData&));
MOCK_METHOD0(OnPassphraseAccepted, void());
MOCK_METHOD2(OnEncryptedTypesChanged,
@@ -50,9 +50,9 @@ class MockSyncFrontend : public SyncFrontend {
MOCK_METHOD0(OnEncryptionComplete, void());
MOCK_METHOD1(OnMigrationNeededForTypes, void(syncable::ModelTypeSet));
MOCK_METHOD1(OnExperimentsChanged,
- void(const csync::Experiments&));
+ void(const syncer::Experiments&));
MOCK_METHOD1(OnActionableError,
- void(const csync::SyncProtocolError& sync_error));
+ void(const syncer::SyncProtocolError& sync_error));
MOCK_METHOD0(OnSyncConfigureRetry, void());
};
@@ -101,12 +101,12 @@ TEST_F(SyncBackendHostTest, InitShutdown) {
invalidator_storage.AsWeakPtr());
MockSyncFrontend mock_frontend;
- csync::SyncCredentials credentials;
+ syncer::SyncCredentials credentials;
credentials.email = "user@example.com";
credentials.sync_token = "sync_token";
- csync::TestUnrecoverableErrorHandler handler;
+ syncer::TestUnrecoverableErrorHandler handler;
backend.Initialize(&mock_frontend,
- csync::WeakHandle<csync::JsEventHandler>(),
+ syncer::WeakHandle<syncer::JsEventHandler>(),
GURL(k_mock_url),
syncable::ModelTypeSet(),
credentials,
diff --git a/chrome/browser/sync/glue/sync_backend_registrar.cc b/chrome/browser/sync/glue/sync_backend_registrar.cc
index 45da9af..f36475c 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar.cc
@@ -28,23 +28,23 @@ namespace {
// Returns true if the current thread is the native thread for the
// given group (or if it is undeterminable).
-bool IsOnThreadForGroup(csync::ModelSafeGroup group) {
+bool IsOnThreadForGroup(syncer::ModelSafeGroup group) {
switch (group) {
- case csync::GROUP_PASSIVE:
+ case syncer::GROUP_PASSIVE:
return false;
- case csync::GROUP_UI:
+ case syncer::GROUP_UI:
return BrowserThread::CurrentlyOn(BrowserThread::UI);
- case csync::GROUP_DB:
+ case syncer::GROUP_DB:
return BrowserThread::CurrentlyOn(BrowserThread::DB);
- case csync::GROUP_FILE:
+ case syncer::GROUP_FILE:
return BrowserThread::CurrentlyOn(BrowserThread::FILE);
- case csync::GROUP_HISTORY:
+ case syncer::GROUP_HISTORY:
// TODO(ncarter): How to determine this?
return true;
- case csync::GROUP_PASSWORD:
+ case syncer::GROUP_PASSWORD:
// TODO(ncarter): How to determine this?
return true;
- case csync::MODEL_SAFE_GROUP_COUNT:
+ case syncer::MODEL_SAFE_GROUP_COUNT:
default:
return false;
}
@@ -64,10 +64,10 @@ SyncBackendRegistrar::SyncBackendRegistrar(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK(profile_);
DCHECK(sync_loop_);
- workers_[csync::GROUP_DB] = new DatabaseModelWorker();
- workers_[csync::GROUP_FILE] = new FileModelWorker();
- workers_[csync::GROUP_UI] = ui_worker_;
- workers_[csync::GROUP_PASSIVE] = new csync::PassiveModelWorker(sync_loop_);
+ workers_[syncer::GROUP_DB] = new DatabaseModelWorker();
+ workers_[syncer::GROUP_FILE] = new FileModelWorker();
+ workers_[syncer::GROUP_UI] = ui_worker_;
+ workers_[syncer::GROUP_PASSIVE] = new syncer::PassiveModelWorker(sync_loop_);
// Any datatypes that we want the syncer to pull down must be in the
// routing_info map. We set them to group passive, meaning that
@@ -75,13 +75,13 @@ SyncBackendRegistrar::SyncBackendRegistrar(
// models.
for (syncable::ModelTypeSet::Iterator it = initial_types.First();
it.Good(); it.Inc()) {
- routing_info_[it.Get()] = csync::GROUP_PASSIVE;
+ routing_info_[it.Get()] = syncer::GROUP_PASSIVE;
}
HistoryService* history_service = profile->GetHistoryService(
Profile::IMPLICIT_ACCESS);
if (history_service) {
- workers_[csync::GROUP_HISTORY] = new HistoryModelWorker(history_service);
+ workers_[syncer::GROUP_HISTORY] = new HistoryModelWorker(history_service);
} else {
LOG_IF(WARNING, initial_types.Has(syncable::TYPED_URLS))
<< "History store disabled, cannot sync Omnibox History";
@@ -91,7 +91,7 @@ SyncBackendRegistrar::SyncBackendRegistrar(
scoped_refptr<PasswordStore> password_store =
PasswordStoreFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS);
if (password_store.get()) {
- workers_[csync::GROUP_PASSWORD] = new PasswordModelWorker(password_store);
+ workers_[syncer::GROUP_PASSWORD] = new PasswordModelWorker(password_store);
} else {
LOG_IF(WARNING, initial_types.Has(syncable::PASSWORDS))
<< "Password store not initialized, cannot sync passwords";
@@ -116,11 +116,11 @@ syncable::ModelTypeSet SyncBackendRegistrar::ConfigureDataTypes(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(Intersection(types_to_add, types_to_remove).Empty());
syncable::ModelTypeSet filtered_types_to_add = types_to_add;
- if (workers_.count(csync::GROUP_HISTORY) == 0) {
+ if (workers_.count(syncer::GROUP_HISTORY) == 0) {
LOG(WARNING) << "No history worker -- removing TYPED_URLS";
filtered_types_to_add.Remove(syncable::TYPED_URLS);
}
- if (workers_.count(csync::GROUP_PASSWORD) == 0) {
+ if (workers_.count(syncer::GROUP_PASSWORD) == 0) {
LOG(WARNING) << "No password worker -- removing PASSWORDS";
filtered_types_to_add.Remove(syncable::PASSWORDS);
}
@@ -130,10 +130,10 @@ syncable::ModelTypeSet SyncBackendRegistrar::ConfigureDataTypes(
for (syncable::ModelTypeSet::Iterator it =
filtered_types_to_add.First();
it.Good(); it.Inc()) {
- // Add a newly specified data type as csync::GROUP_PASSIVE into the
+ // Add a newly specified data type as syncer::GROUP_PASSIVE into the
// routing_info, if it does not already exist.
if (routing_info_.count(it.Get()) == 0) {
- routing_info_[it.Get()] = csync::GROUP_PASSIVE;
+ routing_info_[it.Get()] = syncer::GROUP_PASSIVE;
newly_added_types.Put(it.Get());
}
}
@@ -150,7 +150,7 @@ syncable::ModelTypeSet SyncBackendRegistrar::ConfigureDataTypes(
<< ") and removing types "
<< syncable::ModelTypeSetToString(types_to_remove)
<< " to get new routing info "
- <<csync::ModelSafeRoutingInfoToString(routing_info_);
+ <<syncer::ModelSafeRoutingInfoToString(routing_info_);
return newly_added_types;
}
@@ -169,15 +169,15 @@ void SyncBackendRegistrar::OnSyncerShutdownComplete() {
void SyncBackendRegistrar::ActivateDataType(
syncable::ModelType type,
- csync::ModelSafeGroup group,
+ syncer::ModelSafeGroup group,
ChangeProcessor* change_processor,
- csync::UserShare* user_share) {
+ syncer::UserShare* user_share) {
CHECK(IsOnThreadForGroup(group));
base::AutoLock lock(lock_);
// Ensure that the given data type is in the PASSIVE group.
- csync::ModelSafeRoutingInfo::iterator i = routing_info_.find(type);
+ syncer::ModelSafeRoutingInfo::iterator i = routing_info_.find(type);
DCHECK(i != routing_info_.end());
- DCHECK_EQ(i->second, csync::GROUP_PASSIVE);
+ DCHECK_EQ(i->second, syncer::GROUP_PASSIVE);
routing_info_[type] = group;
CHECK(IsCurrentThreadSafeForModel(type));
@@ -210,8 +210,8 @@ bool SyncBackendRegistrar::IsTypeActivatedForTest(
void SyncBackendRegistrar::OnChangesApplied(
syncable::ModelType model_type,
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) {
ChangeProcessor* processor = GetProcessor(model_type);
if (!processor)
return;
@@ -232,7 +232,7 @@ void SyncBackendRegistrar::OnChangesComplete(
}
void SyncBackendRegistrar::GetWorkers(
- std::vector<csync::ModelSafeWorker*>* out) {
+ std::vector<syncer::ModelSafeWorker*>* out) {
base::AutoLock lock(lock_);
out->clear();
for (WorkerMap::const_iterator it = workers_.begin();
@@ -242,9 +242,9 @@ void SyncBackendRegistrar::GetWorkers(
}
void SyncBackendRegistrar::GetModelSafeRoutingInfo(
- csync::ModelSafeRoutingInfo* out) {
+ syncer::ModelSafeRoutingInfo* out) {
base::AutoLock lock(lock_);
- csync::ModelSafeRoutingInfo copy(routing_info_);
+ syncer::ModelSafeRoutingInfo copy(routing_info_);
out->swap(copy);
}
@@ -256,7 +256,7 @@ ChangeProcessor* SyncBackendRegistrar::GetProcessor(
return NULL;
// We can only check if |processor| exists, as otherwise the type is
- // mapped to csync::GROUP_PASSIVE.
+ // mapped to syncer::GROUP_PASSIVE.
CHECK(IsCurrentThreadSafeForModel(type));
CHECK(processor->IsRunning());
return processor;
diff --git a/chrome/browser/sync/glue/sync_backend_registrar.h b/chrome/browser/sync/glue/sync_backend_registrar.h
index 39978ca..b06160d 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar.h
+++ b/chrome/browser/sync/glue/sync_backend_registrar.h
@@ -20,9 +20,9 @@
class MessageLoop;
class Profile;
-namespace csync {
+namespace syncer {
struct UserShare;
-} // namespace csync
+} // namespace syncer
namespace browser_sync {
@@ -32,7 +32,7 @@ class UIModelWorker;
// A class that keep track of the workers, change processors, and
// routing info for the enabled sync types, and also routes change
// events to the right processors.
-class SyncBackendRegistrar : public csync::SyncManager::ChangeDelegate {
+class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate {
public:
// |initial_types| contains the initial set of types to sync
// (initially put in the passive group). |name| is used for
@@ -79,9 +79,9 @@ class SyncBackendRegistrar : public csync::SyncManager::ChangeDelegate {
// group) and starts the given change processor. Must be called
// from |group|'s native thread.
void ActivateDataType(syncable::ModelType type,
- csync::ModelSafeGroup group,
+ syncer::ModelSafeGroup group,
ChangeProcessor* change_processor,
- csync::UserShare* user_share);
+ syncer::UserShare* user_share);
// Deactivates the given type if necessary. Must be called from the
// UI thread and not |type|'s native thread. Yes, this is
@@ -96,16 +96,16 @@ class SyncBackendRegistrar : public csync::SyncManager::ChangeDelegate {
// any thread.
virtual void OnChangesApplied(
syncable::ModelType model_type,
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
virtual void OnChangesComplete(syncable::ModelType model_type) OVERRIDE;
- void GetWorkers(std::vector<csync::ModelSafeWorker*>* out);
- void GetModelSafeRoutingInfo(csync::ModelSafeRoutingInfo* out);
+ void GetWorkers(std::vector<syncer::ModelSafeWorker*>* out);
+ void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out);
private:
- typedef std::map<csync::ModelSafeGroup,
- scoped_refptr<csync::ModelSafeWorker> > WorkerMap;
+ typedef std::map<syncer::ModelSafeGroup,
+ scoped_refptr<syncer::ModelSafeWorker> > WorkerMap;
// Returns the change processor for the given model, or NULL if none
// exists. Must be called from |group|'s native thread.
@@ -142,11 +142,11 @@ class SyncBackendRegistrar : public csync::SyncManager::ChangeDelegate {
// destroyed. Unless a worker is no longer needed because all types
// that get routed to it have been disabled (from syncing). In that
// case, we'll destroy on demand *after* routing any dependent types
- // to csync::GROUP_PASSIVE, so that the syncapi doesn't call into garbage.
+ // to syncer::GROUP_PASSIVE, so that the syncapi doesn't call into garbage.
// If a key is present, it means at least one ModelType that routes
// to that model safe group is being synced.
WorkerMap workers_;
- csync::ModelSafeRoutingInfo routing_info_;
+ syncer::ModelSafeRoutingInfo routing_info_;
// The change processors that handle the different data types.
std::map<syncable::ModelType, ChangeProcessor*> processors_;
diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
index e456901..0d51739 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
@@ -50,8 +50,8 @@ class SyncBackendRegistrarTest : public testing::Test {
void ExpectRoutingInfo(
SyncBackendRegistrar* registrar,
- const csync::ModelSafeRoutingInfo& expected_routing_info) {
- csync::ModelSafeRoutingInfo routing_info;
+ const syncer::ModelSafeRoutingInfo& expected_routing_info) {
+ syncer::ModelSafeRoutingInfo routing_info;
registrar->GetModelSafeRoutingInfo(&routing_info);
EXPECT_EQ(expected_routing_info, routing_info);
}
@@ -66,7 +66,7 @@ class SyncBackendRegistrarTest : public testing::Test {
}
MessageLoop loop_;
- csync::TestUserShare test_user_share_;
+ syncer::TestUserShare test_user_share_;
private:
content::TestBrowserThread ui_thread_;
@@ -77,11 +77,11 @@ TEST_F(SyncBackendRegistrarTest, ConstructorEmpty) {
SyncBackendRegistrar registrar(ModelTypeSet(), "test", &profile, &loop_);
EXPECT_FALSE(registrar.IsNigoriEnabled());
{
- std::vector<csync::ModelSafeWorker*> workers;
+ std::vector<syncer::ModelSafeWorker*> workers;
registrar.GetWorkers(&workers);
EXPECT_EQ(4u, workers.size());
}
- ExpectRoutingInfo(&registrar, csync::ModelSafeRoutingInfo());
+ ExpectRoutingInfo(&registrar, syncer::ModelSafeRoutingInfo());
ExpectHasProcessorsForTypes(registrar, ModelTypeSet());
registrar.OnSyncerShutdownComplete();
registrar.StopOnUIThread();
@@ -93,14 +93,14 @@ TEST_F(SyncBackendRegistrarTest, ConstructorNonEmpty) {
SyncBackendRegistrar registrar(initial_types, "test", &profile, &loop_);
EXPECT_TRUE(registrar.IsNigoriEnabled());
{
- std::vector<csync::ModelSafeWorker*> workers;
+ std::vector<syncer::ModelSafeWorker*> workers;
registrar.GetWorkers(&workers);
EXPECT_EQ(4u, workers.size());
}
{
- csync::ModelSafeRoutingInfo expected_routing_info;
- expected_routing_info[BOOKMARKS] = csync::GROUP_PASSIVE;
- expected_routing_info[NIGORI] = csync::GROUP_PASSIVE;
+ syncer::ModelSafeRoutingInfo expected_routing_info;
+ expected_routing_info[BOOKMARKS] = syncer::GROUP_PASSIVE;
+ expected_routing_info[NIGORI] = syncer::GROUP_PASSIVE;
// Passwords dropped because of no password store.
ExpectRoutingInfo(&registrar, expected_routing_info);
}
@@ -118,10 +118,10 @@ TEST_F(SyncBackendRegistrarTest, ConfigureDataTypes) {
EXPECT_TRUE(
registrar.ConfigureDataTypes(types1, ModelTypeSet()).Equals(types1));
{
- csync::ModelSafeRoutingInfo expected_routing_info;
- expected_routing_info[BOOKMARKS] = csync::GROUP_PASSIVE;
- expected_routing_info[NIGORI] = csync::GROUP_PASSIVE;
- expected_routing_info[AUTOFILL] = csync::GROUP_PASSIVE;
+ syncer::ModelSafeRoutingInfo expected_routing_info;
+ expected_routing_info[BOOKMARKS] = syncer::GROUP_PASSIVE;
+ expected_routing_info[NIGORI] = syncer::GROUP_PASSIVE;
+ expected_routing_info[AUTOFILL] = syncer::GROUP_PASSIVE;
ExpectRoutingInfo(&registrar, expected_routing_info);
}
ExpectHasProcessorsForTypes(registrar, ModelTypeSet());
@@ -130,16 +130,16 @@ TEST_F(SyncBackendRegistrarTest, ConfigureDataTypes) {
const ModelTypeSet types2(PREFERENCES, THEMES);
EXPECT_TRUE(registrar.ConfigureDataTypes(types2, types1).Equals(types2));
{
- csync::ModelSafeRoutingInfo expected_routing_info;
- expected_routing_info[PREFERENCES] = csync::GROUP_PASSIVE;
- expected_routing_info[THEMES] = csync::GROUP_PASSIVE;
+ syncer::ModelSafeRoutingInfo expected_routing_info;
+ expected_routing_info[PREFERENCES] = syncer::GROUP_PASSIVE;
+ expected_routing_info[THEMES] = syncer::GROUP_PASSIVE;
ExpectRoutingInfo(&registrar, expected_routing_info);
}
ExpectHasProcessorsForTypes(registrar, ModelTypeSet());
// Remove.
EXPECT_TRUE(registrar.ConfigureDataTypes(ModelTypeSet(), types2).Empty());
- ExpectRoutingInfo(&registrar, csync::ModelSafeRoutingInfo());
+ ExpectRoutingInfo(&registrar, syncer::ModelSafeRoutingInfo());
ExpectHasProcessorsForTypes(registrar, ModelTypeSet());
registrar.OnSyncerShutdownComplete();
@@ -148,7 +148,7 @@ TEST_F(SyncBackendRegistrarTest, ConfigureDataTypes) {
void TriggerChanges(SyncBackendRegistrar* registrar, ModelType type) {
registrar->OnChangesApplied(type, NULL,
- csync::ImmutableChangeRecordList());
+ syncer::ImmutableChangeRecordList());
registrar->OnChangesComplete(type);
}
@@ -175,12 +175,12 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateUIDataType) {
const ModelTypeSet types(BOOKMARKS);
EXPECT_TRUE(
registrar.ConfigureDataTypes(types, ModelTypeSet()).Equals(types));
- registrar.ActivateDataType(BOOKMARKS, csync::GROUP_UI,
+ registrar.ActivateDataType(BOOKMARKS, syncer::GROUP_UI,
&change_processor_mock,
test_user_share_.user_share());
{
- csync::ModelSafeRoutingInfo expected_routing_info;
- expected_routing_info[BOOKMARKS] = csync::GROUP_UI;
+ syncer::ModelSafeRoutingInfo expected_routing_info;
+ expected_routing_info[BOOKMARKS] = syncer::GROUP_UI;
ExpectRoutingInfo(&registrar, expected_routing_info);
}
ExpectHasProcessorsForTypes(registrar, types);
@@ -188,7 +188,7 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateUIDataType) {
TriggerChanges(&registrar, BOOKMARKS);
registrar.DeactivateDataType(BOOKMARKS);
- ExpectRoutingInfo(&registrar, csync::ModelSafeRoutingInfo());
+ ExpectRoutingInfo(&registrar, syncer::ModelSafeRoutingInfo());
ExpectHasProcessorsForTypes(registrar, ModelTypeSet());
// Should do nothing.
@@ -222,12 +222,12 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateNonUIDataType) {
const ModelTypeSet types(AUTOFILL);
EXPECT_TRUE(
registrar.ConfigureDataTypes(types, ModelTypeSet()).Equals(types));
- registrar.ActivateDataType(AUTOFILL, csync::GROUP_DB,
+ registrar.ActivateDataType(AUTOFILL, syncer::GROUP_DB,
&change_processor_mock,
test_user_share_.user_share());
{
- csync::ModelSafeRoutingInfo expected_routing_info;
- expected_routing_info[AUTOFILL] = csync::GROUP_DB;
+ syncer::ModelSafeRoutingInfo expected_routing_info;
+ expected_routing_info[AUTOFILL] = syncer::GROUP_DB;
ExpectRoutingInfo(&registrar, expected_routing_info);
}
ExpectHasProcessorsForTypes(registrar, types);
@@ -235,7 +235,7 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateNonUIDataType) {
TriggerChanges(&registrar, AUTOFILL);
registrar.DeactivateDataType(AUTOFILL);
- ExpectRoutingInfo(&registrar, csync::ModelSafeRoutingInfo());
+ ExpectRoutingInfo(&registrar, syncer::ModelSafeRoutingInfo());
ExpectHasProcessorsForTypes(registrar, ModelTypeSet());
// Should do nothing.
diff --git a/chrome/browser/sync/glue/theme_change_processor.cc b/chrome/browser/sync/glue/theme_change_processor.cc
index 0391d58..d975af1 100644
--- a/chrome/browser/sync/glue/theme_change_processor.cc
+++ b/chrome/browser/sync/glue/theme_change_processor.cc
@@ -41,11 +41,11 @@ void ThemeChangeProcessor::Observe(
DCHECK(profile_);
DCHECK(type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
- csync::WriteTransaction trans(FROM_HERE, share_handle());
- csync::WriteNode node(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteNode node(&trans);
if (node.InitByClientTagLookup(syncable::THEMES,
kCurrentThemeClientTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
std::string err = "Could not create node with client tag: ";
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
err + kCurrentThemeClientTag);
@@ -66,8 +66,8 @@ void ThemeChangeProcessor::Observe(
}
void ThemeChangeProcessor::ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) {
if (!running()) {
return;
}
@@ -86,10 +86,10 @@ void ThemeChangeProcessor::ApplyChangesFromSyncModel(
LOG(WARNING) << change_count << " theme changes detected; "
<< "only applying the last one";
}
- const csync::ChangeRecord& change =
+ const syncer::ChangeRecord& change =
changes.Get()[change_count - 1];
- if (change.action != csync::ChangeRecord::ACTION_UPDATE &&
- change.action != csync::ChangeRecord::ACTION_DELETE) {
+ if (change.action != syncer::ChangeRecord::ACTION_UPDATE &&
+ change.action != syncer::ChangeRecord::ACTION_DELETE) {
std::string err = "strange theme change.action " +
base::IntToString(change.action);
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE, err);
@@ -98,9 +98,9 @@ void ThemeChangeProcessor::ApplyChangesFromSyncModel(
sync_pb::ThemeSpecifics theme_specifics;
// If the action is a delete, simply use the default values for
// ThemeSpecifics, which would cause the default theme to be set.
- if (change.action != csync::ChangeRecord::ACTION_DELETE) {
- csync::ReadNode node(trans);
- if (node.InitByIdLookup(change.id) != csync::BaseNode::INIT_OK) {
+ if (change.action != syncer::ChangeRecord::ACTION_DELETE) {
+ syncer::ReadNode node(trans);
+ if (node.InitByIdLookup(change.id) != syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Theme node lookup failed.");
return;
diff --git a/chrome/browser/sync/glue/theme_change_processor.h b/chrome/browser/sync/glue/theme_change_processor.h
index 33024d4..2af215a 100644
--- a/chrome/browser/sync/glue/theme_change_processor.h
+++ b/chrome/browser/sync/glue/theme_change_processor.h
@@ -21,7 +21,7 @@ namespace browser_sync {
class DataTypeErrorHandler;
// This class is responsible for taking changes from the
-// ThemeService and applying them to the csync 'syncable'
+// ThemeService and applying them to the sync API 'syncable'
// model, and vice versa. All operations and use of this class are
// from the UI thread.
class ThemeChangeProcessor : public ChangeProcessor,
@@ -31,16 +31,16 @@ class ThemeChangeProcessor : public ChangeProcessor,
virtual ~ThemeChangeProcessor();
// content::NotificationObserver implementation.
- // ThemeService -> csync model change application.
+ // ThemeService -> sync API model change application.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
// ChangeProcessor implementation.
- // csync model -> ThemeService change application.
+ // sync API model -> ThemeService change application.
virtual void ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
protected:
// ChangeProcessor implementation.
diff --git a/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc b/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc
index a6d3e8c..5fa09a9 100644
--- a/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc
@@ -59,7 +59,7 @@ class SyncThemeDataTypeControllerTest : public testing::Test {
EXPECT_CALL(*model_associator_, SyncModelHasUserCreatedNodes(_)).
WillRepeatedly(DoAll(SetArgumentPointee<0>(true), Return(true)));
EXPECT_CALL(*model_associator_, AssociateModels()).
- WillRepeatedly(Return(csync::SyncError()));
+ WillRepeatedly(Return(syncer::SyncError()));
}
void SetActivateExpectations() {
@@ -69,7 +69,7 @@ class SyncThemeDataTypeControllerTest : public testing::Test {
void SetStopExpectations() {
EXPECT_CALL(service_, DeactivateDataType(_));
EXPECT_CALL(*model_associator_, DisassociateModels()).
- WillOnce(Return(csync::SyncError()));
+ WillOnce(Return(syncer::SyncError()));
}
void PumpLoop() {
@@ -133,7 +133,7 @@ TEST_F(SyncThemeDataTypeControllerTest, StartAssociationFailed) {
SetAssociateExpectations();
EXPECT_CALL(*model_associator_, AssociateModels()).
WillRepeatedly(
- Return(csync::SyncError(FROM_HERE, "Error", syncable::THEMES)));
+ Return(syncer::SyncError(FROM_HERE, "Error", syncable::THEMES)));
EXPECT_CALL(start_callback_,
Run(DataTypeController::ASSOCIATION_FAILED, _));
diff --git a/chrome/browser/sync/glue/theme_model_associator.cc b/chrome/browser/sync/glue/theme_model_associator.cc
index be8eeb7..e1210db 100644
--- a/chrome/browser/sync/glue/theme_model_associator.cc
+++ b/chrome/browser/sync/glue/theme_model_associator.cc
@@ -41,22 +41,22 @@ ThemeModelAssociator::ThemeModelAssociator(
ThemeModelAssociator::~ThemeModelAssociator() {}
-csync::SyncError ThemeModelAssociator::AssociateModels() {
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
- if (root.InitByTagLookup(kThemesTag) != csync::BaseNode::INIT_OK) {
+syncer::SyncError ThemeModelAssociator::AssociateModels() {
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
+ if (root.InitByTagLookup(kThemesTag) != syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(FROM_HERE,
kNoThemesFolderError,
model_type());
}
Profile* profile = sync_service_->profile();
- csync::WriteNode node(&trans);
+ syncer::WriteNode node(&trans);
// TODO(akalin): When we have timestamps, we may want to do
// something more intelligent than preferring the sync data over our
// local data.
if (node.InitByClientTagLookup(syncable::THEMES, kCurrentThemeClientTag) ==
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
// Update the current theme from the sync data.
// TODO(akalin): If the sync data does not have
// use_system_theme_by_default and we do, update that flag on the
@@ -67,11 +67,11 @@ csync::SyncError ThemeModelAssociator::AssociateModels() {
node.SetThemeSpecifics(theme_specifics);
} else {
// Set the sync data from the current theme.
- csync::WriteNode node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode node(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::THEMES, root,
kCurrentThemeClientTag);
- if (result != csync::WriteNode::INIT_SUCCESS) {
+ if (result != syncer::WriteNode::INIT_SUCCESS) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Could not create current theme node.",
@@ -83,20 +83,20 @@ csync::SyncError ThemeModelAssociator::AssociateModels() {
GetThemeSpecificsFromCurrentTheme(profile, &theme_specifics);
node.SetThemeSpecifics(theme_specifics);
}
- return csync::SyncError();
+ return syncer::SyncError();
}
-csync::SyncError ThemeModelAssociator::DisassociateModels() {
+syncer::SyncError ThemeModelAssociator::DisassociateModels() {
// We don't maintain any association state, so nothing to do.
- return csync::SyncError();
+ return syncer::SyncError();
}
bool ThemeModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
DCHECK(has_nodes);
*has_nodes = false;
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
- if (root.InitByTagLookup(kThemesTag) != csync::BaseNode::INIT_OK) {
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
+ if (root.InitByTagLookup(kThemesTag) != syncer::BaseNode::INIT_OK) {
LOG(ERROR) << kNoThemesFolderError;
return false;
}
@@ -108,9 +108,9 @@ bool ThemeModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
bool ThemeModelAssociator::CryptoReadyIfNecessary() {
// We only access the cryptographer while holding a transaction.
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
const syncable::ModelTypeSet encrypted_types =
- csync::GetEncryptedTypes(&trans);
+ syncer::GetEncryptedTypes(&trans);
return !encrypted_types.Has(syncable::THEMES) ||
sync_service_->IsCryptographerReady(&trans);
}
diff --git a/chrome/browser/sync/glue/theme_model_associator.h b/chrome/browser/sync/glue/theme_model_associator.h
index b2200a7..cd7f014 100644
--- a/chrome/browser/sync/glue/theme_model_associator.h
+++ b/chrome/browser/sync/glue/theme_model_associator.h
@@ -28,8 +28,8 @@ class ThemeModelAssociator : public AssociatorInterface {
static syncable::ModelType model_type() { return syncable::THEMES; }
// AssociatorInterface implementation.
- virtual csync::SyncError AssociateModels() OVERRIDE;
- virtual csync::SyncError DisassociateModels() OVERRIDE;
+ virtual syncer::SyncError AssociateModels() OVERRIDE;
+ virtual syncer::SyncError DisassociateModels() OVERRIDE;
virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) OVERRIDE;
virtual void AbortAssociation() OVERRIDE {
// No implementation needed, this associator runs on the main
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.cc b/chrome/browser/sync/glue/typed_url_change_processor.cc
index 03935fb..f54829a 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.cc
+++ b/chrome/browser/sync/glue/typed_url_change_processor.cc
@@ -88,7 +88,7 @@ void TypedUrlChangeProcessor::Observe(
void TypedUrlChangeProcessor::HandleURLsModified(
history::URLsModifiedDetails* details) {
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
for (history::URLRows::iterator url = details->changed_urls.begin();
url != details->changed_urls.end(); ++url) {
if (url->typed_count() > 0) {
@@ -100,7 +100,7 @@ void TypedUrlChangeProcessor::HandleURLsModified(
}
bool TypedUrlChangeProcessor::CreateOrUpdateSyncNode(
- history::URLRow url, csync::WriteTransaction* trans) {
+ history::URLRow url, syncer::WriteTransaction* trans) {
DCHECK_GT(url.typed_count(), 0);
// Get the visits for this node.
history::VisitVector visit_vector;
@@ -109,9 +109,9 @@ bool TypedUrlChangeProcessor::CreateOrUpdateSyncNode(
return false;
}
- csync::ReadNode typed_url_root(trans);
+ syncer::ReadNode typed_url_root(trans);
if (typed_url_root.InitByTagLookup(kTypedUrlTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Server did not create the top-level typed_url node. We "
"might be running against an out-of-date server.");
@@ -125,14 +125,14 @@ bool TypedUrlChangeProcessor::CreateOrUpdateSyncNode(
return true;
DCHECK(!visit_vector.empty());
- csync::WriteNode update_node(trans);
- csync::BaseNode::InitByLookupResult result =
+ syncer::WriteNode update_node(trans);
+ syncer::BaseNode::InitByLookupResult result =
update_node.InitByClientTagLookup(syncable::TYPED_URLS, tag);
- if (result == csync::BaseNode::INIT_OK) {
+ if (result == syncer::BaseNode::INIT_OK) {
model_associator_->WriteToSyncNode(url, visit_vector, &update_node);
- } else if (result == csync::BaseNode::INIT_FAILED_DECRYPT_IF_NECESSARY) {
+ } else if (result == syncer::BaseNode::INIT_FAILED_DECRYPT_IF_NECESSARY) {
// TODO(tim): Investigating bug 121587.
- csync::Cryptographer* crypto = trans->GetCryptographer();
+ syncer::Cryptographer* crypto = trans->GetCryptographer();
syncable::ModelTypeSet encrypted_types(crypto->GetEncryptedTypes());
const sync_pb::EntitySpecifics& specifics =
update_node.GetEntry()->Get(syncable::SPECIFICS);
@@ -165,11 +165,11 @@ bool TypedUrlChangeProcessor::CreateOrUpdateSyncNode(
LOG(ERROR) << "Case 4.";
}
} else {
- csync::WriteNode create_node(trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode create_node(trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
create_node.InitUniqueByCreation(syncable::TYPED_URLS,
typed_url_root, tag);
- if (result != csync::WriteNode::INIT_SUCCESS) {
+ if (result != syncer::WriteNode::INIT_SUCCESS) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"Failed to create typed_url sync node.");
return false;
@@ -183,7 +183,7 @@ bool TypedUrlChangeProcessor::CreateOrUpdateSyncNode(
void TypedUrlChangeProcessor::HandleURLsDeleted(
history::URLsDeletedDetails* details) {
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
// Ignore archivals (we don't want to sync them as deletions, to avoid
// extra traffic up to the server, and also to make sure that a client with
@@ -202,12 +202,12 @@ void TypedUrlChangeProcessor::HandleURLsDeleted(
} else {
for (history::URLRows::const_iterator row = details->rows.begin();
row != details->rows.end(); ++row) {
- csync::WriteNode sync_node(&trans);
+ syncer::WriteNode sync_node(&trans);
// The deleted URL could have been non-typed, so it might not be found
// in the sync DB.
if (sync_node.InitByClientTagLookup(syncable::TYPED_URLS,
row->url().spec()) ==
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
sync_node.Remove();
}
}
@@ -219,7 +219,7 @@ void TypedUrlChangeProcessor::HandleURLsVisited(
if (!ShouldSyncVisit(details))
return;
- csync::WriteTransaction trans(FROM_HERE, share_handle());
+ syncer::WriteTransaction trans(FROM_HERE, share_handle());
CreateOrUpdateSyncNode(details->row, &trans);
}
@@ -243,15 +243,15 @@ bool TypedUrlChangeProcessor::ShouldSyncVisit(
}
void TypedUrlChangeProcessor::ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) {
DCHECK(expected_loop_ == MessageLoop::current());
if (!running())
return;
- csync::ReadNode typed_url_root(trans);
+ syncer::ReadNode typed_url_root(trans);
if (typed_url_root.InitByTagLookup(kTypedUrlTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"TypedUrl root node lookup failed.");
return;
@@ -261,9 +261,9 @@ void TypedUrlChangeProcessor::ApplyChangesFromSyncModel(
pending_deleted_visits_.empty() && pending_updated_urls_.empty() &&
pending_deleted_urls_.empty());
- for (csync::ChangeRecordList::const_iterator it =
+ for (syncer::ChangeRecordList::const_iterator it =
changes.Get().begin(); it != changes.Get().end(); ++it) {
- if (csync::ChangeRecord::ACTION_DELETE ==
+ if (syncer::ChangeRecord::ACTION_DELETE ==
it->action) {
DCHECK(it->specifics.has_typed_url()) <<
"Typed URL delete change does not have necessary specifics.";
@@ -272,8 +272,8 @@ void TypedUrlChangeProcessor::ApplyChangesFromSyncModel(
continue;
}
- csync::ReadNode sync_node(trans);
- if (sync_node.InitByIdLookup(it->id) != csync::BaseNode::INIT_OK) {
+ syncer::ReadNode sync_node(trans);
+ if (sync_node.InitByIdLookup(it->id) != syncer::BaseNode::INIT_OK) {
error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
"TypedUrl node lookup failed.");
return;
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.h b/chrome/browser/sync/glue/typed_url_change_processor.h
index 97f5d72..2374370 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.h
+++ b/chrome/browser/sync/glue/typed_url_change_processor.h
@@ -39,7 +39,7 @@ namespace browser_sync {
class DataTypeErrorHandler;
// This class is responsible for taking changes from the history backend and
-// applying them to the csync 'syncable' model, and vice versa. All
+// applying them to the sync API 'syncable' model, and vice versa. All
// operations and use of this class are from the UI thread.
class TypedUrlChangeProcessor : public ChangeProcessor,
public content::NotificationObserver {
@@ -51,15 +51,15 @@ class TypedUrlChangeProcessor : public ChangeProcessor,
virtual ~TypedUrlChangeProcessor();
// content::NotificationObserver implementation.
- // History -> csync model change application.
+ // History -> sync API change application.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // csync model -> WebDataService change application.
+ // sync API model -> WebDataService change application.
virtual void ApplyChangesFromSyncModel(
- const csync::BaseTransaction* trans,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::BaseTransaction* trans,
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
// Commit changes here, after we've released the transaction lock to avoid
// jank.
@@ -88,7 +88,7 @@ class TypedUrlChangeProcessor : public ChangeProcessor,
// new one for the passed |typed_url| if one does not already exist. Returns
// false and sets an unrecoverable error if the operation failed.
bool CreateOrUpdateSyncNode(history::URLRow typed_url,
- csync::WriteTransaction* transaction);
+ syncer::WriteTransaction* transaction);
// The profile with which we are associated.
Profile* profile_;
diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.cc b/chrome/browser/sync/glue/typed_url_data_type_controller.cc
index c8097b1..dc46aba 100644
--- a/chrome/browser/sync/glue/typed_url_data_type_controller.cc
+++ b/chrome/browser/sync/glue/typed_url_data_type_controller.cc
@@ -76,9 +76,9 @@ syncable::ModelType TypedUrlDataTypeController::type() const {
return syncable::TYPED_URLS;
}
-csync::ModelSafeGroup TypedUrlDataTypeController::model_safe_group()
+syncer::ModelSafeGroup TypedUrlDataTypeController::model_safe_group()
const {
- return csync::GROUP_HISTORY;
+ return syncer::GROUP_HISTORY;
}
void TypedUrlDataTypeController::SetBackend(history::HistoryBackend* backend) {
diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.h b/chrome/browser/sync/glue/typed_url_data_type_controller.h
index a7d4471..01a1bdc 100644
--- a/chrome/browser/sync/glue/typed_url_data_type_controller.h
+++ b/chrome/browser/sync/glue/typed_url_data_type_controller.h
@@ -38,7 +38,7 @@ class TypedUrlDataTypeController : public NonFrontendDataTypeController,
// NonFrontendDataTypeController implementation
virtual syncable::ModelType type() const OVERRIDE;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
// content::NotificationObserver implementation.
virtual void Observe(int type,
diff --git a/chrome/browser/sync/glue/typed_url_model_associator.cc b/chrome/browser/sync/glue/typed_url_model_associator.cc
index 729495e..d05c8d6 100644
--- a/chrome/browser/sync/glue/typed_url_model_associator.cc
+++ b/chrome/browser/sync/glue/typed_url_model_associator.cc
@@ -138,9 +138,9 @@ bool TypedUrlModelAssociator::ShouldIgnoreUrl(
return true;
}
-csync::SyncError TypedUrlModelAssociator::AssociateModels() {
+syncer::SyncError TypedUrlModelAssociator::AssociateModels() {
ClearErrorStats();
- csync::SyncError error = DoAssociateModels();
+ syncer::SyncError error = DoAssociateModels();
UMA_HISTOGRAM_PERCENTAGE("Sync.TypedUrlModelAssociationErrors",
GetErrorPercentage());
ClearErrorStats();
@@ -156,12 +156,12 @@ int TypedUrlModelAssociator::GetErrorPercentage() const {
return num_db_accesses_ ? (100 * num_db_errors_ / num_db_accesses_) : 0;
}
-csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
+syncer::SyncError TypedUrlModelAssociator::DoAssociateModels() {
DVLOG(1) << "Associating TypedUrl Models";
- csync::SyncError error;
+ syncer::SyncError error;
DCHECK(expected_loop_ == MessageLoop::current());
if (IsAbortPending())
- return csync::SyncError();
+ return syncer::SyncError();
history::URLRows typed_urls;
++num_db_accesses_;
if (!history_backend_->GetAllTypedURLs(&typed_urls)) {
@@ -177,7 +177,7 @@ csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
for (history::URLRows::iterator ix = typed_urls.begin();
ix != typed_urls.end();) {
if (IsAbortPending())
- return csync::SyncError();
+ return syncer::SyncError();
DCHECK_EQ(0U, visit_vectors.count(ix->id()));
if (!FixupURLAndGetVisits(&(*ix), &(visit_vectors[ix->id()])) ||
ShouldIgnoreUrl(*ix, visit_vectors[ix->id()])) {
@@ -194,10 +194,10 @@ csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
TypedUrlUpdateVector updated_urls;
{
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode typed_url_root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode typed_url_root(&trans);
if (typed_url_root.InitByTagLookup(kTypedUrlTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Server did not create the top-level typed_url node. We "
@@ -209,15 +209,15 @@ csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
for (history::URLRows::iterator ix = typed_urls.begin();
ix != typed_urls.end(); ++ix) {
if (IsAbortPending())
- return csync::SyncError();
+ return syncer::SyncError();
std::string tag = ix->url().spec();
// Empty URLs should be filtered out by ShouldIgnoreUrl() previously.
DCHECK(!tag.empty());
history::VisitVector& visits = visit_vectors[ix->id()];
- csync::ReadNode node(&trans);
+ syncer::ReadNode node(&trans);
if (node.InitByClientTagLookup(syncable::TYPED_URLS, tag) ==
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
// Same URL exists in sync data and in history data - compare the
// entries to see if there's any difference.
sync_pb::TypedUrlSpecifics typed_url(
@@ -235,9 +235,9 @@ csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
MergeResult difference =
MergeUrls(typed_url, *ix, &visits, &new_url, &added_visits);
if (difference & DIFF_UPDATE_NODE) {
- csync::WriteNode write_node(&trans);
+ syncer::WriteNode write_node(&trans);
if (write_node.InitByClientTagLookup(syncable::TYPED_URLS, tag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to edit typed_url sync node.",
@@ -272,11 +272,11 @@ csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
}
} else {
// Sync has never seen this URL before.
- csync::WriteNode node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode node(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::TYPED_URLS,
typed_url_root, tag);
- if (result != csync::WriteNode::INIT_SUCCESS) {
+ if (result != syncer::WriteNode::INIT_SUCCESS) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to create typed_url sync node: " + tag,
@@ -294,12 +294,12 @@ csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
// the history DB, so we can add them to our local history DB.
std::vector<int64> obsolete_nodes;
int64 sync_child_id = typed_url_root.GetFirstChildId();
- while (sync_child_id != csync::kInvalidId) {
+ while (sync_child_id != syncer::kInvalidId) {
if (IsAbortPending())
- return csync::SyncError();
- csync::ReadNode sync_child_node(&trans);
+ return syncer::SyncError();
+ syncer::ReadNode sync_child_node(&trans);
if (sync_child_node.InitByIdLookup(sync_child_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to fetch child node.",
@@ -357,9 +357,9 @@ csync::SyncError TypedUrlModelAssociator::DoAssociateModels() {
it != obsolete_nodes.end();
++it) {
if (IsAbortPending())
- return csync::SyncError();
- csync::WriteNode sync_node(&trans);
- if (sync_node.InitByIdLookup(*it) != csync::BaseNode::INIT_OK) {
+ return syncer::SyncError();
+ syncer::WriteNode sync_node(&trans);
+ if (sync_node.InitByIdLookup(*it) != syncer::BaseNode::INIT_OK) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Failed to fetch obsolete node.",
@@ -435,21 +435,21 @@ sync_pb::TypedUrlSpecifics TypedUrlModelAssociator::FilterExpiredVisits(
}
bool TypedUrlModelAssociator::DeleteAllNodes(
- csync::WriteTransaction* trans) {
+ syncer::WriteTransaction* trans) {
DCHECK(expected_loop_ == MessageLoop::current());
// Just walk through all our child nodes and delete them.
- csync::ReadNode typed_url_root(trans);
+ syncer::ReadNode typed_url_root(trans);
if (typed_url_root.InitByTagLookup(kTypedUrlTag) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
LOG(ERROR) << "Could not lookup root node";
return false;
}
int64 sync_child_id = typed_url_root.GetFirstChildId();
- while (sync_child_id != csync::kInvalidId) {
- csync::WriteNode sync_child_node(trans);
+ while (sync_child_id != syncer::kInvalidId) {
+ syncer::WriteNode sync_child_node(trans);
if (sync_child_node.InitByIdLookup(sync_child_id) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
LOG(ERROR) << "Typed url node lookup failed.";
return false;
}
@@ -459,8 +459,8 @@ bool TypedUrlModelAssociator::DeleteAllNodes(
return true;
}
-csync::SyncError TypedUrlModelAssociator::DisassociateModels() {
- return csync::SyncError();
+syncer::SyncError TypedUrlModelAssociator::DisassociateModels() {
+ return syncer::SyncError();
}
void TypedUrlModelAssociator::AbortAssociation() {
@@ -476,9 +476,9 @@ bool TypedUrlModelAssociator::IsAbortPending() {
bool TypedUrlModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
DCHECK(has_nodes);
*has_nodes = false;
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode sync_node(&trans);
- if (sync_node.InitByTagLookup(kTypedUrlTag) != csync::BaseNode::INIT_OK) {
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode sync_node(&trans);
+ if (sync_node.InitByTagLookup(kTypedUrlTag) != syncer::BaseNode::INIT_OK) {
LOG(ERROR) << "Server did not create the top-level typed_url node. We "
<< "might be running against an out-of-date server.";
return false;
@@ -661,7 +661,7 @@ TypedUrlModelAssociator::MergeResult TypedUrlModelAssociator::MergeUrls(
void TypedUrlModelAssociator::WriteToSyncNode(
const history::URLRow& url,
const history::VisitVector& visits,
- csync::WriteNode* node) {
+ syncer::WriteNode* node) {
sync_pb::TypedUrlSpecifics typed_url;
WriteToTypedUrlSpecifics(url, visits, &typed_url);
node->SetTypedUrlSpecifics(typed_url);
@@ -821,9 +821,9 @@ void TypedUrlModelAssociator::UpdateURLRowFromTypedUrlSpecifics(
bool TypedUrlModelAssociator::CryptoReadyIfNecessary() {
// We only access the cryptographer while holding a transaction.
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
const syncable::ModelTypeSet encrypted_types =
- csync::GetEncryptedTypes(&trans);
+ syncer::GetEncryptedTypes(&trans);
return !encrypted_types.Has(syncable::TYPED_URLS) ||
sync_service_->IsCryptographerReady(&trans);
}
diff --git a/chrome/browser/sync/glue/typed_url_model_associator.h b/chrome/browser/sync/glue/typed_url_model_associator.h
index 0127cf0..66cfc84 100644
--- a/chrome/browser/sync/glue/typed_url_model_associator.h
+++ b/chrome/browser/sync/glue/typed_url_model_associator.h
@@ -28,7 +28,7 @@ class HistoryBackend;
class URLRow;
};
-namespace csync {
+namespace syncer {
class WriteNode;
class WriteTransaction;
};
@@ -58,10 +58,10 @@ class TypedUrlModelAssociator : public AssociatorInterface {
// AssociatorInterface implementation.
//
// Iterates through the sync model looking for matched pairs of items.
- virtual csync::SyncError AssociateModels() OVERRIDE;
+ virtual syncer::SyncError AssociateModels() OVERRIDE;
// Clears all associations.
- virtual csync::SyncError DisassociateModels() OVERRIDE;
+ virtual syncer::SyncError DisassociateModels() OVERRIDE;
// Called from the main thread, to abort the currently active model
// association (for example, if we are shutting down).
@@ -74,7 +74,7 @@ class TypedUrlModelAssociator : public AssociatorInterface {
virtual bool CryptoReadyIfNecessary() OVERRIDE;
// Delete all typed url nodes.
- bool DeleteAllNodes(csync::WriteTransaction* trans);
+ bool DeleteAllNodes(syncer::WriteTransaction* trans);
void WriteToHistoryBackend(const history::URLRows* new_urls,
const TypedUrlUpdateVector* updated_urls,
@@ -127,7 +127,7 @@ class TypedUrlModelAssociator : public AssociatorInterface {
std::vector<history::VisitInfo>* new_visits);
static void WriteToSyncNode(const history::URLRow& url,
const history::VisitVector& visits,
- csync::WriteNode* node);
+ syncer::WriteNode* node);
// Diffs the set of visits between the history DB and the sync DB, using the
// sync DB as the canonical copy. Result is the set of |new_visits| and
@@ -173,7 +173,7 @@ class TypedUrlModelAssociator : public AssociatorInterface {
private:
// Helper routine that actually does the work of associating models.
- csync::SyncError DoAssociateModels();
+ syncer::SyncError DoAssociateModels();
// Helper function that determines if we should ignore a URL for the purposes
// of sync, because it contains invalid data or is import-only.
diff --git a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc
index aa522b2..fe377fc 100644
--- a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc
+++ b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc
@@ -94,7 +94,7 @@ static void CreateModelAssociator(base::WaitableEvent* startup,
// test to finish.
*associator = new TestTypedUrlModelAssociator(startup, aborted);
// AssociateModels should be aborted and should return false.
- csync::SyncError error = (*associator)->AssociateModels();
+ syncer::SyncError error = (*associator)->AssociateModels();
// TODO(lipalani): crbug.com/122690 fix this when fixing abort.
// EXPECT_TRUE(error.IsSet());
diff --git a/chrome/browser/sync/glue/ui_data_type_controller.cc b/chrome/browser/sync/glue/ui_data_type_controller.cc
index dd41c8c..0734c78 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller.cc
+++ b/chrome/browser/sync/glue/ui_data_type_controller.cc
@@ -54,7 +54,7 @@ void UIDataTypeController::LoadModels(
DCHECK(!model_load_callback.is_null());
DCHECK(syncable::IsRealDataType(type_));
if (state_ != NOT_RUNNING) {
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"Model already loaded",
type()));
return;
@@ -79,7 +79,7 @@ void UIDataTypeController::LoadModels(
state_ = MODEL_LOADED;
model_load_callback_.Reset();
- model_load_callback.Run(type(), csync::SyncError());
+ model_load_callback.Run(type(), syncer::SyncError());
}
void UIDataTypeController::OnModelLoaded() {
@@ -90,7 +90,7 @@ void UIDataTypeController::OnModelLoaded() {
state_ = MODEL_LOADED;
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), csync::SyncError());
+ model_load_callback.Run(type(), syncer::SyncError());
}
void UIDataTypeController::StartAssociating(
@@ -118,33 +118,33 @@ void UIDataTypeController::Associate() {
DCHECK_EQ(state_, ASSOCIATING);
// Connect |shared_change_processor_| to the syncer and get the
- // csync::SyncableService associated with type().
+ // syncer::SyncableService associated with type().
local_service_ = shared_change_processor_->Connect(profile_sync_factory_,
sync_service_,
this,
type());
if (!local_service_.get()) {
- csync::SyncError error(FROM_HERE, "Failed to connect to syncer.", type());
+ syncer::SyncError error(FROM_HERE, "Failed to connect to syncer.", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return;
}
if (!shared_change_processor_->CryptoReadyIfNecessary()) {
- StartFailed(NEEDS_CRYPTO, csync::SyncError());
+ StartFailed(NEEDS_CRYPTO, syncer::SyncError());
return;
}
bool sync_has_nodes = false;
if (!shared_change_processor_->SyncModelHasUserCreatedNodes(
&sync_has_nodes)) {
- csync::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
+ syncer::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return;
}
base::TimeTicks start_time = base::TimeTicks::Now();
- csync::SyncError error;
- csync::SyncDataList initial_sync_data;
+ syncer::SyncError error;
+ syncer::SyncDataList initial_sync_data;
error = shared_change_processor_->GetSyncData(&initial_sync_data);
if (error.IsSet()) {
StartFailed(ASSOCIATION_FAILED, error);
@@ -155,9 +155,9 @@ void UIDataTypeController::Associate() {
error = local_service_->MergeDataAndStartSyncing(
type(),
initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor>(
+ scoped_ptr<syncer::SyncChangeProcessor>(
new SharedChangeProcessorRef(shared_change_processor_)),
- scoped_ptr<csync::SyncErrorFactory>(
+ scoped_ptr<syncer::SyncErrorFactory>(
new SharedChangeProcessorRef(shared_change_processor_)));
RecordAssociationTime(base::TimeTicks::Now() - start_time);
if (error.IsSet()) {
@@ -171,7 +171,7 @@ void UIDataTypeController::Associate() {
}
void UIDataTypeController::StartFailed(StartResult result,
- const csync::SyncError& error) {
+ const syncer::SyncError& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (IsUnrecoverableResult(result))
RecordUnrecoverableError(FROM_HERE, "StartFailed");
@@ -206,7 +206,7 @@ void UIDataTypeController::AbortModelLoad() {
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
+ model_load_callback.Run(type(), syncer::SyncError(FROM_HERE,
"Aborted",
type()));
}
@@ -219,7 +219,7 @@ void UIDataTypeController::StartDone(StartResult result) {
// confused by the non-NULL start_callback_.
StartCallback callback = start_callback_;
start_callback_.Reset();
- callback.Run(result, csync::SyncError());
+ callback.Run(result, syncer::SyncError());
}
void UIDataTypeController::Stop() {
@@ -264,9 +264,9 @@ void UIDataTypeController::StopModels() {
// Do nothing by default.
}
-csync::ModelSafeGroup UIDataTypeController::model_safe_group() const {
+syncer::ModelSafeGroup UIDataTypeController::model_safe_group() const {
DCHECK(syncable::IsRealDataType(type_));
- return csync::GROUP_UI;
+ return syncer::GROUP_UI;
}
std::string UIDataTypeController::name() const {
diff --git a/chrome/browser/sync/glue/ui_data_type_controller.h b/chrome/browser/sync/glue/ui_data_type_controller.h
index 8120f58..9bbc753 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller.h
+++ b/chrome/browser/sync/glue/ui_data_type_controller.h
@@ -23,7 +23,7 @@ namespace base {
class TimeDelta;
}
-namespace csync {
+namespace syncer {
class SyncableService;
class SyncError;
}
@@ -48,7 +48,7 @@ class UIDataTypeController : public DataTypeController {
virtual void StartAssociating(const StartCallback& start_callback) OVERRIDE;
virtual void Stop() OVERRIDE;
virtual syncable::ModelType type() const OVERRIDE;
- virtual csync::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
virtual std::string name() const OVERRIDE;
virtual State state() const OVERRIDE;
@@ -79,7 +79,7 @@ class UIDataTypeController : public DataTypeController {
virtual void OnModelLoaded() OVERRIDE;
// Helper methods for cleaning up state and invoking the start callback.
- virtual void StartFailed(StartResult result, const csync::SyncError& error);
+ virtual void StartFailed(StartResult result, const syncer::SyncError& error);
virtual void StartDone(StartResult result);
// Record association time.
@@ -110,7 +110,7 @@ class UIDataTypeController : public DataTypeController {
//
// Note: we use refcounting here primarily so that we can keep a uniform
// SyncableService API, whether the datatype lives on the UI thread or not
- // (a csync::SyncableService takes ownership of its SyncChangeProcessor when
+ // (a syncer::SyncableService takes ownership of its SyncChangeProcessor when
// MergeDataAndStartSyncing is called). This will help us eventually merge the
// two datatype controller implementations (for ui and non-ui thread
// datatypes).
@@ -118,7 +118,7 @@ class UIDataTypeController : public DataTypeController {
// A weak pointer to the actual local syncable service, which performs all the
// real work. We do not own the object.
- base::WeakPtr<csync::SyncableService> local_service_;
+ base::WeakPtr<syncer::SyncableService> local_service_;
private:
// Associate the sync model with the service's model, then start syncing.
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 b252971..e62be2d 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/ui_data_type_controller_unittest.cc
@@ -105,7 +105,7 @@ class SyncUIDataTypeControllerTest : public testing::Test {
ModelLoadCallbackMock model_load_callback_;
scoped_refptr<UIDataTypeController> preference_dtc_;
scoped_ptr<FakeGenericChangeProcessor> change_processor_;
- csync::FakeSyncableService syncable_service_;
+ syncer::FakeSyncableService syncable_service_;
};
// Start the DTC. Verify that the callback is called with OK, the
@@ -165,7 +165,7 @@ TEST_F(SyncUIDataTypeControllerTest, StartAssociationFailed) {
EXPECT_CALL(start_callback_,
Run(DataTypeController::ASSOCIATION_FAILED, _));
syncable_service_.set_merge_data_and_start_syncing_error(
- csync::SyncError(FROM_HERE, "Error", type_));
+ syncer::SyncError(FROM_HERE, "Error", type_));
EXPECT_EQ(DataTypeController::NOT_RUNNING, preference_dtc_->state());
EXPECT_FALSE(syncable_service_.syncing());
diff --git a/chrome/browser/sync/glue/ui_model_worker.cc b/chrome/browser/sync/glue/ui_model_worker.cc
index 0eda00f..5bc35a7 100644
--- a/chrome/browser/sync/glue/ui_model_worker.cc
+++ b/chrome/browser/sync/glue/ui_model_worker.cc
@@ -19,10 +19,10 @@ namespace browser_sync {
namespace {
// A simple callback to signal a waitable event after running a closure.
-void CallDoWorkAndSignalCallback(const csync::WorkCallback& work,
+void CallDoWorkAndSignalCallback(const syncer::WorkCallback& work,
base::WaitableEvent* work_done,
UIModelWorker* const scheduler,
- csync::SyncerError* error_info) {
+ syncer::SyncerError* error_info) {
if (work.is_null()) {
// This can happen during tests or cases where there are more than just the
// default UIModelWorker in existence and it gets destroyed before
@@ -76,8 +76,8 @@ void UIModelWorker::Stop() {
state_ = STOPPED;
}
-csync::SyncerError UIModelWorker::DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) {
+syncer::SyncerError UIModelWorker::DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) {
// In most cases, this method is called in WORKING state. It is possible this
// gets called when we are in the RUNNING_MANUAL_SHUTDOWN_PUMP state, because
// the UI loop has initiated shutdown but the syncer hasn't got the memo yet.
@@ -85,7 +85,7 @@ csync::SyncerError UIModelWorker::DoWorkAndWaitUntilDone(
// code handling this case in Stop(). Note there _no_ way we can be in here
// with state_ = STOPPED, so it is safe to read / compare in this case.
CHECK_NE(ANNOTATE_UNPROTECTED_READ(state_), STOPPED);
- csync::SyncerError error_info;
+ syncer::SyncerError error_info;
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
DLOG(WARNING) << "DoWorkAndWaitUntilDone called from "
<< "ui_loop_. Probably a nested invocation?";
@@ -114,8 +114,8 @@ csync::SyncerError UIModelWorker::DoWorkAndWaitUntilDone(
return error_info;
}
-csync::ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
- return csync::GROUP_UI;
+syncer::ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
+ return syncer::GROUP_UI;
}
void UIModelWorker::OnSyncerShutdownComplete() {
diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h
index df0e0fb..7f60405 100644
--- a/chrome/browser/sync/glue/ui_model_worker.h
+++ b/chrome/browser/sync/glue/ui_model_worker.h
@@ -17,7 +17,7 @@ class MessageLoop;
namespace browser_sync {
-// A csync::ModelSafeWorker for UI models (e.g. bookmarks) that
+// A syncer::ModelSafeWorker for UI models (e.g. bookmarks) that
// accepts work requests from the syncapi that need to be fulfilled
// from the MessageLoop home to the native model.
//
@@ -25,7 +25,7 @@ namespace browser_sync {
// SyncerThread. When the SyncerThread _object_ is destroyed, the
// UIModelWorker will be destroyed. The SyncerThread object is destroyed
// after the actual syncer pthread has exited.
-class UIModelWorker : public csync::ModelSafeWorker {
+class UIModelWorker : public syncer::ModelSafeWorker {
public:
UIModelWorker();
@@ -35,12 +35,12 @@ class UIModelWorker : public csync::ModelSafeWorker {
// processed and that syncapi will not schedule any further work for us to do.
void Stop();
- // csync::ModelSafeWorker implementation. Called on syncapi SyncerThread.
- virtual csync::SyncerError DoWorkAndWaitUntilDone(
- const csync::WorkCallback& work) OVERRIDE;
- virtual csync::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
+ // syncer::ModelSafeWorker implementation. Called on syncapi SyncerThread.
+ virtual syncer::SyncerError DoWorkAndWaitUntilDone(
+ const syncer::WorkCallback& work) OVERRIDE;
+ virtual syncer::ModelSafeGroup GetModelSafeGroup() OVERRIDE;
- // Upon receiving this idempotent call, the csync::ModelSafeWorker can
+ // Upon receiving this idempotent call, the syncer::ModelSafeWorker can
// assume no work will ever be scheduled again from now on. If it has any work
// that it has not yet completed, it must make sure to run it as soon as
// possible as the Syncer is trying to shut down. Called from the CoreThread.
diff --git a/chrome/browser/sync/glue/ui_model_worker_unittest.cc b/chrome/browser/sync/glue/ui_model_worker_unittest.cc
index 2c89dfe..e4de282 100644
--- a/chrome/browser/sync/glue/ui_model_worker_unittest.cc
+++ b/chrome/browser/sync/glue/ui_model_worker_unittest.cc
@@ -15,7 +15,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using browser_sync::UIModelWorker;
-using csync::SyncerError;
+using syncer::SyncerError;
using content::BrowserThread;
// Various boilerplate, primarily for the StopWithPendingWork test.
@@ -28,12 +28,12 @@ class UIModelWorkerVisitor {
was_run_(was_run) { }
virtual ~UIModelWorkerVisitor() { }
- virtual csync::SyncerError DoWork() {
+ virtual syncer::SyncerError DoWork() {
EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
was_run_->Signal();
if (quit_loop_when_run_)
MessageLoop::current()->Quit();
- return csync::SYNCER_OK;
+ return syncer::SYNCER_OK;
}
private:
@@ -50,7 +50,7 @@ class Syncer {
void SyncShare(UIModelWorkerVisitor* visitor) {
// We wait until the callback is executed. So it is safe to use Unretained.
- csync::WorkCallback c = base::Bind(&UIModelWorkerVisitor::DoWork,
+ syncer::WorkCallback c = base::Bind(&UIModelWorkerVisitor::DoWork,
base::Unretained(visitor));
worker_->DoWorkAndWaitUntilDone(c);
}
diff --git a/chrome/browser/sync/invalidations/invalidator_storage.cc b/chrome/browser/sync/invalidations/invalidator_storage.cc
index 533fb8f..971e5a2 100644
--- a/chrome/browser/sync/invalidations/invalidator_storage.cc
+++ b/chrome/browser/sync/invalidations/invalidator_storage.cc
@@ -13,7 +13,7 @@
#include "chrome/common/pref_names.h"
#include "sync/internal_api/public/syncable/model_type.h"
-using csync::InvalidationVersionMap;
+using syncer::InvalidationVersionMap;
namespace browser_sync {
@@ -203,7 +203,7 @@ void InvalidatorStorage::DeserializeMap(
continue;
}
invalidation::ObjectId id;
- if (!csync::RealModelTypeToObjectId(model_type, &id)) {
+ if (!syncer::RealModelTypeToObjectId(model_type, &id)) {
DLOG(WARNING) << "Invalid model type: " << model_type;
continue;
}
diff --git a/chrome/browser/sync/invalidations/invalidator_storage.h b/chrome/browser/sync/invalidations/invalidator_storage.h
index f11a38a..aa59314 100644
--- a/chrome/browser/sync/invalidations/invalidator_storage.h
+++ b/chrome/browser/sync/invalidations/invalidator_storage.h
@@ -30,7 +30,7 @@ namespace browser_sync {
// services. For now this is still tied to sync while we refactor, so minimize
// churn and keep it here.
class InvalidatorStorage : public base::SupportsWeakPtr<InvalidatorStorage>,
- public csync::InvalidationStateTracker {
+ public syncer::InvalidationStateTracker {
public:
// |pref_service| may be NULL (for unit tests), but in that case no setter
// methods should be called. Does not own |pref_service|.
@@ -41,7 +41,7 @@ class InvalidatorStorage : public base::SupportsWeakPtr<InvalidatorStorage>,
void Clear();
// InvalidationStateTracker implementation.
- virtual csync::InvalidationVersionMap GetAllMaxVersions() const
+ virtual syncer::InvalidationVersionMap GetAllMaxVersions() const
OVERRIDE;
virtual void SetMaxVersion(const invalidation::ObjectId& id,
int64 max_version) OVERRIDE;
@@ -72,16 +72,16 @@ class InvalidatorStorage : public base::SupportsWeakPtr<InvalidatorStorage>,
// Helpers to convert between InvalidationVersionMap <--> ListValue.
static void DeserializeFromList(
const base::ListValue& max_versions_list,
- csync::InvalidationVersionMap* max_versions_map);
+ syncer::InvalidationVersionMap* max_versions_map);
static void SerializeToList(
- const csync::InvalidationVersionMap& max_versions_map,
+ const syncer::InvalidationVersionMap& max_versions_map,
base::ListValue* max_versions_list);
// Code for migrating from old MaxInvalidationVersions pref, which was a map
// from sync types to max invalidation versions.
void MigrateMaxInvalidationVersionsPref();
static void DeserializeMap(const base::DictionaryValue* max_versions_dict,
- csync::InvalidationVersionMap* map);
+ syncer::InvalidationVersionMap* map);
// May be NULL.
PrefService* const pref_service_;
diff --git a/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc b/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc
index c40e887..d71930b 100644
--- a/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc
+++ b/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc
@@ -13,7 +13,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-using csync::InvalidationVersionMap;
+using syncer::InvalidationVersionMap;
namespace browser_sync {
diff --git a/chrome/browser/sync/profile_sync_components_factory.h b/chrome/browser/sync/profile_sync_components_factory.h
index 8abd964..bba73b0 100644
--- a/chrome/browser/sync/profile_sync_components_factory.h
+++ b/chrome/browser/sync/profile_sync_components_factory.h
@@ -27,7 +27,7 @@ class SyncBackendHost;
class DataTypeErrorHandler;
}
-namespace csync {
+namespace syncer {
class SyncableService;
}
@@ -45,7 +45,7 @@ class ProfileSyncComponentsFactory {
//
// Note: This interface is deprecated in favor of the SyncableService API.
// New datatypes that do not live on the UI thread should directly return a
- // weak pointer to a csync::SyncableService. All others continue to return
+ // weak pointer to a syncer::SyncableService. All others continue to return
// SyncComponents. It is safe to assume that the factory methods below are
// called on the same thread in which the datatype resides.
//
@@ -76,7 +76,7 @@ class ProfileSyncComponentsFactory {
virtual browser_sync::GenericChangeProcessor* CreateGenericChangeProcessor(
ProfileSyncService* profile_sync_service,
browser_sync::DataTypeErrorHandler* error_handler,
- const base::WeakPtr<csync::SyncableService>& local_service) = 0;
+ const base::WeakPtr<syncer::SyncableService>& local_service) = 0;
virtual browser_sync::SharedChangeProcessor*
CreateSharedChangeProcessor() = 0;
@@ -84,7 +84,7 @@ class ProfileSyncComponentsFactory {
// Returns a weak pointer to the syncable service specified by |type|.
// Weak pointer may be unset if service is already destroyed.
// Note: Should only be called on the same thread on which a datatype resides.
- virtual base::WeakPtr<csync::SyncableService> GetSyncableServiceForType(
+ virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
syncable::ModelType type) = 0;
// Legacy datatypes that need to be converted to the SyncableService API.
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index 930bf0d..7f10696 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -209,8 +209,8 @@ browser_sync::GenericChangeProcessor*
ProfileSyncComponentsFactoryImpl::CreateGenericChangeProcessor(
ProfileSyncService* profile_sync_service,
browser_sync::DataTypeErrorHandler* error_handler,
- const base::WeakPtr<csync::SyncableService>& local_service) {
- csync::UserShare* user_share = profile_sync_service->GetUserShare();
+ const base::WeakPtr<syncer::SyncableService>& local_service) {
+ syncer::UserShare* user_share = profile_sync_service->GetUserShare();
return new GenericChangeProcessor(error_handler,
local_service,
user_share);
@@ -221,10 +221,10 @@ browser_sync::SharedChangeProcessor* ProfileSyncComponentsFactoryImpl::
return new SharedChangeProcessor();
}
-base::WeakPtr<csync::SyncableService> ProfileSyncComponentsFactoryImpl::
+base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl::
GetSyncableServiceForType(syncable::ModelType type) {
if (!profile_) { // For tests.
- return base::WeakPtr<csync::SyncableService>();
+ return base::WeakPtr<syncer::SyncableService>();
}
switch (type) {
case syncable::PREFERENCES:
@@ -232,7 +232,7 @@ base::WeakPtr<csync::SyncableService> ProfileSyncComponentsFactoryImpl::
case syncable::AUTOFILL:
case syncable::AUTOFILL_PROFILE: {
if (!web_data_service_.get())
- return base::WeakPtr<csync::SyncableService>();
+ return base::WeakPtr<syncer::SyncableService>();
if (type == syncable::AUTOFILL) {
return web_data_service_->GetAutocompleteSyncableService()->AsWeakPtr();
} else {
@@ -254,14 +254,14 @@ base::WeakPtr<csync::SyncableService> ProfileSyncComponentsFactoryImpl::
app_notification_manager()->AsWeakPtr();
default:
// The following datatypes still need to be transitioned to the
- // csync::SyncableService API:
+ // syncer::SyncableService API:
// Bookmarks
// Passwords
// Sessions
// Themes
// Typed URLs
NOTREACHED();
- return base::WeakPtr<csync::SyncableService>();
+ return base::WeakPtr<syncer::SyncableService>();
}
}
@@ -271,7 +271,7 @@ ProfileSyncComponentsFactory::SyncComponents
DataTypeErrorHandler* error_handler) {
BookmarkModel* bookmark_model =
profile_sync_service->profile()->GetBookmarkModel();
- csync::UserShare* user_share = profile_sync_service->GetUserShare();
+ syncer::UserShare* user_share = profile_sync_service->GetUserShare();
// TODO(akalin): We may want to propagate this switch up eventually.
#if defined(OS_ANDROID)
const bool kExpectMobileBookmarksFolder = true;
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.h b/chrome/browser/sync/profile_sync_components_factory_impl.h
index bf8c256..841ad17 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.h
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.h
@@ -32,12 +32,12 @@ class ProfileSyncComponentsFactoryImpl : public ProfileSyncComponentsFactory {
virtual browser_sync::GenericChangeProcessor* CreateGenericChangeProcessor(
ProfileSyncService* profile_sync_service,
browser_sync::DataTypeErrorHandler* error_handler,
- const base::WeakPtr<csync::SyncableService>& local_service) OVERRIDE;
+ const base::WeakPtr<syncer::SyncableService>& local_service) OVERRIDE;
virtual browser_sync::SharedChangeProcessor*
CreateSharedChangeProcessor() OVERRIDE;
- virtual base::WeakPtr<csync::SyncableService> GetSyncableServiceForType(
+ virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
syncable::ModelType type) OVERRIDE;
// Legacy datatypes that need to be converted to the SyncableService API.
diff --git a/chrome/browser/sync/profile_sync_components_factory_mock.h b/chrome/browser/sync/profile_sync_components_factory_mock.h
index 37c660a..cbccdd8 100644
--- a/chrome/browser/sync/profile_sync_components_factory_mock.h
+++ b/chrome/browser/sync/profile_sync_components_factory_mock.h
@@ -35,11 +35,11 @@ class ProfileSyncComponentsFactoryMock : public ProfileSyncComponentsFactory {
browser_sync::GenericChangeProcessor*(
ProfileSyncService* profile_sync_service,
browser_sync::DataTypeErrorHandler* error_handler,
- const base::WeakPtr<csync::SyncableService>& local_service));
+ const base::WeakPtr<syncer::SyncableService>& local_service));
MOCK_METHOD0(CreateSharedChangeProcessor,
browser_sync::SharedChangeProcessor*());
MOCK_METHOD1(GetSyncableServiceForType,
- base::WeakPtr<csync::SyncableService>(syncable::ModelType));
+ base::WeakPtr<syncer::SyncableService>(syncable::ModelType));
MOCK_METHOD2(CreateBookmarkSyncComponents,
SyncComponents(ProfileSyncService* profile_sync_service,
browser_sync::DataTypeErrorHandler* error_handler));
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 37444ed..8580fc8 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -68,16 +68,16 @@ using browser_sync::ChangeProcessor;
using browser_sync::DataTypeController;
using browser_sync::DataTypeManager;
using browser_sync::SyncBackendHost;
-using csync::JsBackend;
-using csync::JsController;
-using csync::JsEventDetails;
-using csync::JsEventHandler;
-using csync::ModelSafeRoutingInfo;
-using csync::SyncCredentials;
-using csync::SyncProtocolError;
-using csync::WeakHandle;
using syncable::ModelType;
using syncable::ModelTypeSet;
+using syncer::JsBackend;
+using syncer::JsController;
+using syncer::JsEventDetails;
+using syncer::JsEventHandler;
+using syncer::ModelSafeRoutingInfo;
+using syncer::SyncCredentials;
+using syncer::SyncProtocolError;
+using syncer::WeakHandle;
typedef GoogleServiceAuthError AuthError;
@@ -108,9 +108,9 @@ static bool IsTokenServiceRelevant(const std::string& service) {
}
bool ShouldShowActionOnUI(
- const csync::SyncProtocolError& error) {
- return (error.action != csync::UNKNOWN_ACTION &&
- error.action != csync::DISABLE_SYNC_ON_CLIENT);
+ const syncer::SyncProtocolError& error) {
+ return (error.action != syncer::UNKNOWN_ACTION &&
+ error.action != syncer::DISABLE_SYNC_ON_CLIENT);
}
ProfileSyncService::ProfileSyncService(ProfileSyncComponentsFactory* factory,
@@ -118,7 +118,7 @@ ProfileSyncService::ProfileSyncService(ProfileSyncComponentsFactory* factory,
SigninManager* signin_manager,
StartBehavior start_behavior)
: last_auth_error_(AuthError::None()),
- passphrase_required_reason_(csync::REASON_PASSPHRASE_NOT_REQUIRED),
+ passphrase_required_reason_(syncer::REASON_PASSPHRASE_NOT_REQUIRED),
factory_(factory),
profile_(profile),
// |profile| may be NULL in unit tests.
@@ -131,7 +131,7 @@ ProfileSyncService::ProfileSyncService(ProfileSyncComponentsFactory* factory,
unrecoverable_error_reason_(ERROR_REASON_UNSET),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
expect_sync_configuration_aborted_(false),
- encrypted_types_(csync::Cryptographer::SensitiveTypes()),
+ encrypted_types_(syncer::Cryptographer::SensitiveTypes()),
encrypt_everything_(false),
encryption_pending_(false),
auto_start_enabled_(start_behavior == AUTO_START),
@@ -479,7 +479,7 @@ void ProfileSyncService::ShutdownImpl(bool sync_disabled) {
// Shutdown the migrator before the backend to ensure it doesn't pull a null
// snapshot.
migrator_.reset();
- sync_js_controller_.AttachJsBackend(WeakHandle<csync::JsBackend>());
+ sync_js_controller_.AttachJsBackend(WeakHandle<syncer::JsBackend>());
// Move aside the backend so nobody else tries to use it while we are
// shutting it down.
@@ -501,8 +501,8 @@ void ProfileSyncService::ShutdownImpl(bool sync_disabled) {
cached_passphrase_.clear();
encryption_pending_ = false;
encrypt_everything_ = false;
- encrypted_types_ = csync::Cryptographer::SensitiveTypes();
- passphrase_required_reason_ = csync::REASON_PASSPHRASE_NOT_REQUIRED;
+ encrypted_types_ = syncer::Cryptographer::SensitiveTypes();
+ passphrase_required_reason_ = syncer::REASON_PASSPHRASE_NOT_REQUIRED;
last_auth_error_ = GoogleServiceAuthError::None();
if (sync_global_error_.get()) {
@@ -586,7 +586,7 @@ void ProfileSyncService::RegisterNewDataType(syncable::ModelType data_type) {
void ProfileSyncService::OnUnrecoverableError(
const tracked_objects::Location& from_here,
const std::string& message) {
- // Unrecoverable errors that arrive via the csync::UnrecoverableErrorHandler
+ // Unrecoverable errors that arrive via the syncer::UnrecoverableErrorHandler
// interface are assumed to originate within the syncer.
unrecoverable_error_reason_ = ERROR_REASON_SYNCER;
OnUnrecoverableErrorImpl(from_here, message, true);
@@ -624,9 +624,9 @@ void ProfileSyncService::DisableBrokenDatatype(
// passed onto the change processor.
DeactivateDataType(type);
- csync::SyncError error(from_here, message, type);
+ syncer::SyncError error(from_here, message, type);
- std::list<csync::SyncError> errors;
+ std::list<syncer::SyncError> errors;
errors.push_back(error);
// Update this before posting a task. So if a configure happens before
@@ -640,7 +640,7 @@ void ProfileSyncService::DisableBrokenDatatype(
}
void ProfileSyncService::OnBackendInitialized(
- const csync::WeakHandle<csync::JsBackend>& js_backend, bool success) {
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) {
if (!HasSyncSetupCompleted()) {
UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeFirstTimeSuccess", success);
} else {
@@ -709,7 +709,7 @@ void ProfileSyncService::OnSyncCycleCompleted() {
}
void ProfileSyncService::OnExperimentsChanged(
- const csync::Experiments& experiments) {
+ const syncer::Experiments& experiments) {
if (current_experiments.Matches(experiments))
return;
@@ -793,16 +793,16 @@ void ProfileSyncService::UpdateAuthErrorState(
namespace {
GoogleServiceAuthError ConnectionStatusToAuthError(
- csync::ConnectionStatus status) {
+ syncer::ConnectionStatus status) {
switch (status) {
- case csync::CONNECTION_OK:
+ case syncer::CONNECTION_OK:
return GoogleServiceAuthError::None();
break;
- case csync::CONNECTION_AUTH_ERROR:
+ case syncer::CONNECTION_AUTH_ERROR:
return GoogleServiceAuthError(
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
break;
- case csync::CONNECTION_SERVER_ERROR:
+ case syncer::CONNECTION_SERVER_ERROR:
return GoogleServiceAuthError(GoogleServiceAuthError::CONNECTION_FAILED);
break;
default:
@@ -814,7 +814,7 @@ GoogleServiceAuthError ConnectionStatusToAuthError(
} // namespace
void ProfileSyncService::OnConnectionStatusChange(
- csync::ConnectionStatus status) {
+ syncer::ConnectionStatus status) {
UpdateAuthErrorState(ConnectionStatusToAuthError(status));
}
@@ -826,7 +826,7 @@ void ProfileSyncService::OnStopSyncingPermanently() {
}
void ProfileSyncService::OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) {
DCHECK(backend_.get());
DCHECK(backend_->IsNigoriEnabled());
@@ -839,7 +839,7 @@ void ProfileSyncService::OnPassphraseRequired(
}
DVLOG(1) << "Passphrase required with reason: "
- << csync::PassphraseRequiredReasonToString(reason);
+ << syncer::PassphraseRequiredReasonToString(reason);
passphrase_required_reason_ = reason;
// Notify observers that the passphrase status may have changed.
@@ -857,7 +857,7 @@ void ProfileSyncService::OnPassphraseAccepted() {
// passphrase. We do this here rather than down in ResolvePassphraseRequired()
// because that can be called by OnPassphraseRequired() if no encrypted data
// types are enabled, and we don't want to clobber the true passphrase error.
- passphrase_required_reason_ = csync::REASON_PASSPHRASE_NOT_REQUIRED;
+ passphrase_required_reason_ = syncer::REASON_PASSPHRASE_NOT_REQUIRED;
// Make sure the data types that depend on the passphrase are started at
// this time.
@@ -866,7 +866,7 @@ void ProfileSyncService::OnPassphraseAccepted() {
if (data_type_manager_.get()) {
// Unblock the data type manager if necessary.
data_type_manager_->Configure(types,
- csync::CONFIGURE_REASON_RECONFIGURATION);
+ syncer::CONFIGURE_REASON_RECONFIGURATION);
}
NotifyObservers();
@@ -907,12 +907,12 @@ void ProfileSyncService::OnMigrationNeededForTypes(
void ProfileSyncService::OnActionableError(const SyncProtocolError& error) {
last_actionable_error_ = error;
DCHECK_NE(last_actionable_error_.action,
- csync::UNKNOWN_ACTION);
+ syncer::UNKNOWN_ACTION);
switch (error.action) {
- case csync::UPGRADE_CLIENT:
- case csync::CLEAR_USER_DATA_AND_RESYNC:
- case csync::ENABLE_SYNC_ON_ACCOUNT:
- case csync::STOP_AND_RESTART_SYNC:
+ case syncer::UPGRADE_CLIENT:
+ case syncer::CLEAR_USER_DATA_AND_RESYNC:
+ case syncer::ENABLE_SYNC_ON_ACCOUNT:
+ case syncer::STOP_AND_RESTART_SYNC:
// TODO(lipalani) : if setup in progress we want to display these
// actions in the popup. The current experience might not be optimal for
// the user. We just dismiss the dialog.
@@ -926,7 +926,7 @@ void ProfileSyncService::OnActionableError(const SyncProtocolError& error) {
true,
ERROR_REASON_ACTIONABLE_ERROR);
break;
- case csync::DISABLE_SYNC_ON_CLIENT:
+ case syncer::DISABLE_SYNC_ON_CLIENT:
OnStopSyncingPermanently();
break;
default:
@@ -994,7 +994,7 @@ bool ProfileSyncService::HasUnrecoverableError() const {
bool ProfileSyncService::IsPassphraseRequired() const {
return passphrase_required_reason_ !=
- csync::REASON_PASSPHRASE_NOT_REQUIRED;
+ syncer::REASON_PASSPHRASE_NOT_REQUIRED;
}
// TODO(zea): Rename this IsPassphraseNeededFromUI and ensure it's used
@@ -1079,9 +1079,9 @@ void ProfileSyncService::UpdateSelectedTypesHistogram(
void ProfileSyncService::RefreshSpareBootstrapToken(
const std::string& passphrase) {
browser_sync::ChromeEncryptor encryptor;
- csync::Cryptographer temp_cryptographer(&encryptor);
+ syncer::Cryptographer temp_cryptographer(&encryptor);
// The first 2 params (hostname and username) doesn't have any effect here.
- csync::KeyParams key_params = {"localhost", "dummy", passphrase};
+ syncer::KeyParams key_params = {"localhost", "dummy", passphrase};
std::string bootstrap_token;
if (!temp_cryptographer.AddKey(key_params)) {
@@ -1148,7 +1148,7 @@ bool ProfileSyncService::IsUsingSecondaryPassphrase() const {
}
bool ProfileSyncService::IsCryptographerReady(
- const csync::BaseTransaction* trans) const {
+ const syncer::BaseTransaction* trans) const {
return backend_.get() && backend_->IsCryptographerReady(trans);
}
@@ -1193,22 +1193,22 @@ void ProfileSyncService::ConfigureDataTypeManager() {
NotifyObservers();
return;
}
- csync::ConfigureReason reason = csync::CONFIGURE_REASON_UNKNOWN;
+ syncer::ConfigureReason reason = syncer::CONFIGURE_REASON_UNKNOWN;
if (!HasSyncSetupCompleted()) {
- reason = csync::CONFIGURE_REASON_NEW_CLIENT;
+ reason = syncer::CONFIGURE_REASON_NEW_CLIENT;
} else if (restart == false ||
- csync::InitialSyncEndedForTypes(types, GetUserShare())) {
- reason = csync::CONFIGURE_REASON_RECONFIGURATION;
+ syncer::InitialSyncEndedForTypes(types, GetUserShare())) {
+ reason = syncer::CONFIGURE_REASON_RECONFIGURATION;
} else {
DCHECK(restart);
- reason = csync::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE;
+ reason = syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE;
}
- DCHECK(reason != csync::CONFIGURE_REASON_UNKNOWN);
+ DCHECK(reason != syncer::CONFIGURE_REASON_UNKNOWN);
data_type_manager_->Configure(types, reason);
}
-csync::UserShare* ProfileSyncService::GetUserShare() const {
+syncer::UserShare* ProfileSyncService::GetUserShare() const {
if (backend_.get() && backend_initialized_) {
return backend_->GetUserShare();
}
@@ -1216,13 +1216,13 @@ csync::UserShare* ProfileSyncService::GetUserShare() const {
return NULL;
}
-csync::sessions::SyncSessionSnapshot
+syncer::sessions::SyncSessionSnapshot
ProfileSyncService::GetLastSessionSnapshot() const {
if (backend_.get() && backend_initialized_) {
return backend_->GetLastSessionSnapshot();
}
NOTREACHED();
- return csync::sessions::SyncSessionSnapshot();
+ return syncer::sessions::SyncSessionSnapshot();
}
bool ProfileSyncService::HasUnsyncedItems() const {
@@ -1239,7 +1239,7 @@ browser_sync::BackendMigrator*
}
void ProfileSyncService::GetModelSafeRoutingInfo(
- csync::ModelSafeRoutingInfo* out) const {
+ syncer::ModelSafeRoutingInfo* out) const {
if (backend_.get() && backend_initialized_) {
backend_->GetModelSafeRoutingInfo(out);
} else {
@@ -1254,10 +1254,10 @@ Value* ProfileSyncService::GetTypeStatusMap() const {
return result;
}
- std::vector<csync::SyncError> errors =
+ std::vector<syncer::SyncError> errors =
failed_datatypes_handler_.GetAllErrors();
- std::map<ModelType, csync::SyncError> error_map;
- for (std::vector<csync::SyncError>::iterator it = errors.begin();
+ std::map<ModelType, syncer::SyncError> error_map;
+ for (std::vector<syncer::SyncError>::iterator it = errors.begin();
it != errors.end(); ++it) {
error_map[it->type()] = *it;
}
@@ -1268,7 +1268,7 @@ Value* ProfileSyncService::GetTypeStatusMap() const {
backend_->GetModelSafeRoutingInfo(&routing_info);
for (ModelSafeRoutingInfo::const_iterator it = routing_info.begin();
it != routing_info.end(); ++it) {
- if (it->second == csync::GROUP_PASSIVE) {
+ if (it->second == syncer::GROUP_PASSIVE) {
passive_types.Put(it->first);
} else {
active_types.Put(it->first);
@@ -1287,7 +1287,7 @@ Value* ProfileSyncService::GetTypeStatusMap() const {
type_status->SetString("name", ModelTypeToString(type));
if (error_map.find(type) != error_map.end()) {
- const csync::SyncError &error = error_map.find(type)->second;
+ const syncer::SyncError &error = error_map.find(type)->second;
DCHECK(error.IsSet());
std::string error_text = "Error: " + error.location().ToString() +
", " + error.message();
@@ -1315,7 +1315,7 @@ Value* ProfileSyncService::GetTypeStatusMap() const {
}
void ProfileSyncService::ActivateDataType(
- syncable::ModelType type, csync::ModelSafeGroup group,
+ syncable::ModelType type, syncer::ModelSafeGroup group,
ChangeProcessor* change_processor) {
if (!backend_.get()) {
NOTREACHED();
@@ -1343,7 +1343,7 @@ void ProfileSyncService::ConsumeCachedPassphraseIfPossible() {
cached_passphrase_.clear();
// If we need a passphrase to decrypt data, try the cached passphrase.
- if (passphrase_required_reason() == csync::REASON_DECRYPTION) {
+ if (passphrase_required_reason() == syncer::REASON_DECRYPTION) {
if (SetDecryptionPassphrase(passphrase)) {
DVLOG(1) << "Cached passphrase successfully decrypted pending keys";
return;
@@ -1371,13 +1371,13 @@ void ProfileSyncService::SetEncryptionPassphrase(const std::string& passphrase,
DVLOG(1) << "Setting " << (type == EXPLICIT ? "explicit" : "implicit")
<< " passphrase for encryption.";
- if (passphrase_required_reason_ == csync::REASON_ENCRYPTION) {
+ if (passphrase_required_reason_ == syncer::REASON_ENCRYPTION) {
// REASON_ENCRYPTION implies that the cryptographer does not have pending
// keys. Hence, as long as we're not trying to do an invalid passphrase
// change (e.g. explicit -> explicit or explicit -> implicit), we know this
// will succeed. If for some reason a new encryption key arrives via
// sync later, the SBH will trigger another OnPassphraseRequired().
- passphrase_required_reason_ = csync::REASON_PASSPHRASE_NOT_REQUIRED;
+ passphrase_required_reason_ = syncer::REASON_PASSPHRASE_NOT_REQUIRED;
NotifyObservers();
}
backend_->SetEncryptionPassphrase(passphrase, type == EXPLICIT);
@@ -1488,7 +1488,7 @@ void ProfileSyncService::Observe(int type,
// error representing it.
DCHECK_EQ(result->failed_data_types.size(),
static_cast<unsigned int>(1));
- csync::SyncError error = result->failed_data_types.front();
+ syncer::SyncError error = result->failed_data_types.front();
DCHECK(error.IsSet());
std::string message =
"Sync configuration failed with status " +
@@ -1624,7 +1624,7 @@ bool ProfileSyncService::HasObserver(Observer* observer) const {
return observers_.HasObserver(observer);
}
-base::WeakPtr<csync::JsController> ProfileSyncService::GetJsController() {
+base::WeakPtr<syncer::JsController> ProfileSyncService::GetJsController() {
return sync_js_controller_.AsWeakPtr();
}
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index b04fcd7..303d4eb 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -53,7 +53,7 @@ class SessionModelAssociator;
namespace sessions { class SyncSessionSnapshot; }
}
-namespace csync {
+namespace syncer {
class BaseTransaction;
struct SyncCredentials;
struct UserShare;
@@ -147,7 +147,7 @@ class EncryptedData;
//
class ProfileSyncService : public browser_sync::SyncFrontend,
public browser_sync::SyncPrefObserver,
- public csync::UnrecoverableErrorHandler,
+ public syncer::UnrecoverableErrorHandler,
public content::NotificationObserver,
public ProfileKeyedService {
public:
@@ -254,15 +254,15 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// SyncFrontend implementation.
virtual void OnBackendInitialized(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
bool success) OVERRIDE;
virtual void OnSyncCycleCompleted() OVERRIDE;
virtual void OnSyncConfigureRetry() OVERRIDE;
virtual void OnConnectionStatusChange(
- csync::ConnectionStatus status) OVERRIDE;
+ syncer::ConnectionStatus status) OVERRIDE;
virtual void OnStopSyncingPermanently() OVERRIDE;
virtual void OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) OVERRIDE;
virtual void OnPassphraseAccepted() OVERRIDE;
virtual void OnEncryptedTypesChanged(
@@ -272,9 +272,9 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
virtual void OnMigrationNeededForTypes(
syncable::ModelTypeSet types) OVERRIDE;
virtual void OnExperimentsChanged(
- const csync::Experiments& experiments) OVERRIDE;
+ const syncer::Experiments& experiments) OVERRIDE;
virtual void OnActionableError(
- const csync::SyncProtocolError& error) OVERRIDE;
+ const syncer::SyncProtocolError& error) OVERRIDE;
// Update the last auth error and notify observers of error state.
void UpdateAuthErrorState(const GoogleServiceAuthError& error);
@@ -333,7 +333,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// we have an encrypted data type enabled.
virtual bool IsPassphraseRequiredForDecryption() const;
- csync::PassphraseRequiredReason passphrase_required_reason() const {
+ syncer::PassphraseRequiredReason passphrase_required_reason() const {
return passphrase_required_reason_;
}
@@ -355,7 +355,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// Returns a weak pointer to the service's JsController.
// Overrideable for testing purposes.
- virtual base::WeakPtr<csync::JsController> GetJsController();
+ virtual base::WeakPtr<syncer::JsController> GetJsController();
// Record stats on various events.
static void SyncEvent(SyncEventCodes code);
@@ -369,7 +369,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// management. If so, the user is not allowed to configure sync.
bool IsManaged() const;
- // csync::UnrecoverableErrorHandler implementation.
+ // syncer::UnrecoverableErrorHandler implementation.
virtual void OnUnrecoverableError(
const tracked_objects::Location& from_here,
const std::string& message) OVERRIDE;
@@ -388,13 +388,13 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// tests. Figure out how to pass the handle to the ModelAssociators
// directly, figure out how to expose this to tests, and remove this
// function.
- virtual csync::UserShare* GetUserShare() const;
+ virtual syncer::UserShare* GetUserShare() const;
// TODO(akalin): These two functions are used only by
// ProfileSyncServiceHarness. Figure out a different way to expose
// this info to that class, and remove these functions.
- virtual csync::sessions::SyncSessionSnapshot
+ virtual syncer::sessions::SyncSessionSnapshot
GetLastSessionSnapshot() const;
// Returns whether or not the underlying sync engine has made any
@@ -406,7 +406,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
browser_sync::BackendMigrator* GetBackendMigratorForTest();
// TODO(sync): This is only used in tests. Can we remove it?
- void GetModelSafeRoutingInfo(csync::ModelSafeRoutingInfo* out) const;
+ void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out) const;
// Returns a ListValue indicating the status of all registered types.
//
@@ -424,7 +424,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// Overridden by tests.
// TODO(zea): Remove these and have the dtc's call directly into the SBH.
virtual void ActivateDataType(
- syncable::ModelType type, csync::ModelSafeGroup group,
+ syncable::ModelType type, syncer::ModelSafeGroup group,
browser_sync::ChangeProcessor* change_processor);
virtual void DeactivateDataType(syncable::ModelType type);
@@ -458,7 +458,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// for sensitive data types. Caller must be holding a
// syncapi::BaseTransaction to ensure thread safety.
virtual bool IsCryptographerReady(
- const csync::BaseTransaction* trans) const;
+ const syncer::BaseTransaction* trans) const;
// Returns true if a secondary passphrase is being used. It is not legal
// to call this method before the backend is initialized.
@@ -553,7 +553,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
void ShutdownImpl(bool sync_disabled);
// Return SyncCredentials from the TokenService.
- csync::SyncCredentials GetCredentials();
+ syncer::SyncCredentials GetCredentials();
// Test need to override this to create backends that allow setting up
// initial conditions, such as populating sync nodes.
@@ -590,7 +590,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// Was the last SYNC_PASSPHRASE_REQUIRED notification sent because it
// was required for encryption, decryption with a cached passphrase, or
// because a new passphrase is required?
- csync::PassphraseRequiredReason passphrase_required_reason_;
+ syncer::PassphraseRequiredReason passphrase_required_reason_;
private:
enum UnrecoverableErrorReason {
@@ -734,7 +734,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
ObserverList<Observer> observers_;
- csync::SyncJsController sync_js_controller_;
+ syncer::SyncJsController sync_js_controller_;
content::NotificationRegistrar registrar_;
@@ -752,7 +752,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
std::string cached_passphrase_;
// The current set of encrypted types. Always a superset of
- // csync::Cryptographer::SensitiveTypes().
+ // syncer::Cryptographer::SensitiveTypes().
syncable::ModelTypeSet encrypted_types_;
// Whether we want to encrypt everything.
@@ -773,7 +773,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// This is the last |SyncProtocolError| we received from the server that had
// an action set on it.
- csync::SyncProtocolError last_actionable_error_;
+ syncer::SyncProtocolError last_actionable_error_;
// This is used to show sync errors in the wrench menu.
scoped_ptr<SyncGlobalError> sync_global_error_;
@@ -791,13 +791,13 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
bool setup_in_progress_;
// The set of currently enabled sync experiments.
- csync::Experiments current_experiments;
+ syncer::Experiments current_experiments;
DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
};
bool ShouldShowActionOnUI(
- const csync::SyncProtocolError& error);
+ const syncer::SyncProtocolError& error);
#endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index 519e881..34bbc91 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -78,7 +78,7 @@ using syncable::SPECIFICS;
using syncable::UNITTEST;
using syncable::WriterTag;
using syncable::WriteTransaction;
-using csync::BaseNode;
+using syncer::BaseNode;
using testing::_;
using testing::DoAll;
using testing::ElementsAre;
@@ -251,12 +251,12 @@ class WebDataServiceFake : public WebDataService {
ACTION_P(MakeAutocompleteSyncComponents, wds) {
EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (!BrowserThread::CurrentlyOn(BrowserThread::DB))
- return base::WeakPtr<csync::SyncableService>();
+ return base::WeakPtr<syncer::SyncableService>();
return wds->GetAutocompleteSyncableService()->AsWeakPtr();
}
ACTION(MakeGenericChangeProcessor) {
- csync::UserShare* user_share = arg0->GetUserShare();
+ syncer::UserShare* user_share = arg0->GetUserShare();
return new GenericChangeProcessor(arg1, arg2, user_share);
}
@@ -267,7 +267,7 @@ ACTION(MakeSharedChangeProcessor) {
ACTION_P(MakeAutofillProfileSyncComponents, wds) {
EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (!BrowserThread::CurrentlyOn(BrowserThread::DB))
- return base::WeakPtr<csync::SyncableService>();;
+ return base::WeakPtr<syncer::SyncableService>();;
return wds->GetAutofillProfileSyncableService()->AsWeakPtr();
}
@@ -442,20 +442,20 @@ class ProfileSyncServiceAutofillTest : public AbstractProfileSyncServiceTest {
}
bool AddAutofillSyncNode(const AutofillEntry& entry) {
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode autofill_root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode autofill_root(&trans);
if (autofill_root.InitByTagLookup(
syncable::ModelTypeToRootTag(syncable::AUTOFILL)) !=
BaseNode::INIT_OK) {
return false;
}
- csync::WriteNode node(&trans);
+ syncer::WriteNode node(&trans);
std::string tag = AutocompleteSyncableService::KeyToTag(
UTF16ToUTF8(entry.key().name()), UTF16ToUTF8(entry.key().value()));
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::AUTOFILL, autofill_root, tag);
- if (result != csync::WriteNode::INIT_SUCCESS)
+ if (result != syncer::WriteNode::INIT_SUCCESS)
return false;
sync_pb::EntitySpecifics specifics;
@@ -467,18 +467,18 @@ class ProfileSyncServiceAutofillTest : public AbstractProfileSyncServiceTest {
}
bool AddAutofillSyncNode(const AutofillProfile& profile) {
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode autofill_root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode autofill_root(&trans);
if (autofill_root.InitByTagLookup(kAutofillProfileTag) !=
BaseNode::INIT_OK) {
return false;
}
- csync::WriteNode node(&trans);
+ syncer::WriteNode node(&trans);
std::string tag = profile.guid();
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::AUTOFILL_PROFILE,
autofill_root, tag);
- if (result != csync::WriteNode::INIT_SUCCESS)
+ if (result != syncer::WriteNode::INIT_SUCCESS)
return false;
sync_pb::EntitySpecifics specifics;
@@ -491,8 +491,8 @@ class ProfileSyncServiceAutofillTest : public AbstractProfileSyncServiceTest {
bool GetAutofillEntriesFromSyncDB(std::vector<AutofillEntry>* entries,
std::vector<AutofillProfile>* profiles) {
- csync::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode autofill_root(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode autofill_root(&trans);
if (autofill_root.InitByTagLookup(
syncable::ModelTypeToRootTag(syncable::AUTOFILL)) !=
BaseNode::INIT_OK) {
@@ -500,8 +500,8 @@ class ProfileSyncServiceAutofillTest : public AbstractProfileSyncServiceTest {
}
int64 child_id = autofill_root.GetFirstChildId();
- while (child_id != csync::kInvalidId) {
- csync::ReadNode child_node(&trans);
+ while (child_id != syncer::kInvalidId) {
+ syncer::ReadNode child_node(&trans);
if (child_node.InitByIdLookup(child_id) != BaseNode::INIT_OK)
return false;
@@ -531,16 +531,16 @@ class ProfileSyncServiceAutofillTest : public AbstractProfileSyncServiceTest {
bool GetAutofillProfilesFromSyncDBUnderProfileNode(
std::vector<AutofillProfile>* profiles) {
- csync::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode autofill_root(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode autofill_root(&trans);
if (autofill_root.InitByTagLookup(kAutofillProfileTag) !=
BaseNode::INIT_OK) {
return false;
}
int64 child_id = autofill_root.GetFirstChildId();
- while (child_id != csync::kInvalidId) {
- csync::ReadNode child_node(&trans);
+ while (child_id != syncer::kInvalidId) {
+ syncer::ReadNode child_node(&trans);
if (child_node.InitByIdLookup(child_id) != BaseNode::INIT_OK)
return false;
@@ -667,7 +667,7 @@ class FakeServerUpdater : public base::RefCountedThreadSafe<FakeServerUpdater> {
// This gets called in a modelsafeworker thread.
ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
- csync::UserShare* user_share = service_->GetUserShare();
+ syncer::UserShare* user_share = service_->GetUserShare();
syncable::Directory* directory = user_share->directory.get();
// Create autofill protobuf.
diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
index 28253c9..21ae983 100644
--- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
@@ -44,7 +44,7 @@
namespace browser_sync {
using content::BrowserThread;
-using csync::BaseNode;
+using syncer::BaseNode;
using testing::_;
using testing::InvokeWithoutArgs;
using testing::Mock;
@@ -54,7 +54,7 @@ class TestBookmarkModelAssociator : public BookmarkModelAssociator {
public:
TestBookmarkModelAssociator(
BookmarkModel* bookmark_model,
- csync::UserShare* user_share,
+ syncer::UserShare* user_share,
DataTypeErrorHandler* error_handler)
: BookmarkModelAssociator(bookmark_model, user_share,
error_handler,
@@ -69,11 +69,11 @@ class TestBookmarkModelAssociator : public BookmarkModelAssociator {
bool root_exists = false;
syncable::ModelType type = model_type();
{
- csync::WriteTransaction trans(FROM_HERE, user_share_);
- csync::ReadNode uber_root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, user_share_);
+ syncer::ReadNode uber_root(&trans);
uber_root.InitByRootLookup();
- csync::ReadNode root(&trans);
+ syncer::ReadNode root(&trans);
root_exists = root.InitByTagLookup(
ProfileSyncServiceTestHelper::GetTagForType(type)) ==
BaseNode::INIT_OK;
@@ -88,17 +88,17 @@ class TestBookmarkModelAssociator : public BookmarkModelAssociator {
return false;
}
- csync::WriteTransaction trans(FROM_HERE, user_share_);
- csync::ReadNode root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, user_share_);
+ syncer::ReadNode root(&trans);
EXPECT_EQ(BaseNode::INIT_OK, root.InitByTagLookup(
ProfileSyncServiceTestHelper::GetTagForType(type)));
// First, try to find a node with the title among the root's children.
// This will be the case if we are testing model persistence, and
// are reloading a sync repository created earlier in the test.
- int64 last_child_id = csync::kInvalidId;
- for (int64 id = root.GetFirstChildId(); id != csync::kInvalidId; /***/) {
- csync::ReadNode child(&trans);
+ int64 last_child_id = syncer::kInvalidId;
+ for (int64 id = root.GetFirstChildId(); id != syncer::kInvalidId; /***/) {
+ syncer::ReadNode child(&trans);
EXPECT_EQ(BaseNode::INIT_OK, child.InitByIdLookup(id));
last_child_id = id;
if (tag_str == child.GetTitle()) {
@@ -108,14 +108,14 @@ class TestBookmarkModelAssociator : public BookmarkModelAssociator {
id = child.GetSuccessorId();
}
- csync::ReadNode predecessor_node(&trans);
- csync::ReadNode* predecessor = NULL;
- if (last_child_id != csync::kInvalidId) {
+ syncer::ReadNode predecessor_node(&trans);
+ syncer::ReadNode* predecessor = NULL;
+ if (last_child_id != syncer::kInvalidId) {
EXPECT_EQ(BaseNode::INIT_OK,
predecessor_node.InitByIdLookup(last_child_id));
predecessor = &predecessor_node;
}
- csync::WriteNode node(&trans);
+ syncer::WriteNode node(&trans);
// Create new fake tagged nodes at the end of the ordering.
node.InitByCreation(type, root, predecessor);
node.SetIsFolder(true);
@@ -127,21 +127,21 @@ class TestBookmarkModelAssociator : public BookmarkModelAssociator {
}
private:
- csync::UserShare* user_share_;
- csync::TestIdFactory id_factory_;
+ syncer::UserShare* user_share_;
+ syncer::TestIdFactory id_factory_;
};
namespace {
-// FakeServerChange constructs a list of csync::ChangeRecords while modifying
+// FakeServerChange constructs a list of syncer::ChangeRecords while modifying
// the sync model, and can pass the ChangeRecord list to a
-// csync::SyncObserver (i.e., the ProfileSyncService) to test the client
+// syncer::SyncObserver (i.e., the ProfileSyncService) to test the client
// change-application behavior.
// Tests using FakeServerChange should be careful to avoid back-references,
// since FakeServerChange will send the edits in the order specified.
class FakeServerChange {
public:
- explicit FakeServerChange(csync::WriteTransaction* trans) : trans_(trans) {
+ explicit FakeServerChange(syncer::WriteTransaction* trans) : trans_(trans) {
}
// Pretend that the server told the syncer to add a bookmark object.
@@ -150,13 +150,13 @@ class FakeServerChange {
bool is_folder,
int64 parent_id,
int64 predecessor_id) {
- csync::ReadNode parent(trans_);
+ syncer::ReadNode parent(trans_);
EXPECT_EQ(BaseNode::INIT_OK, parent.InitByIdLookup(parent_id));
- csync::WriteNode node(trans_);
+ syncer::WriteNode node(trans_);
if (predecessor_id == 0) {
EXPECT_TRUE(node.InitByCreation(syncable::BOOKMARKS, parent, NULL));
} else {
- csync::ReadNode predecessor(trans_);
+ syncer::ReadNode predecessor(trans_);
EXPECT_EQ(BaseNode::INIT_OK, predecessor.InitByIdLookup(predecessor_id));
EXPECT_EQ(predecessor.GetParentId(), parent.GetId());
EXPECT_TRUE(node.InitByCreation(syncable::BOOKMARKS, parent,
@@ -168,8 +168,8 @@ class FakeServerChange {
node.SetTitle(title);
if (!is_folder)
node.SetURL(GURL(url));
- csync::ChangeRecord record;
- record.action = csync::ChangeRecord::ACTION_ADD;
+ syncer::ChangeRecord record;
+ record.action = syncer::ChangeRecord::ACTION_ADD;
record.id = node.GetId();
changes_.push_back(record);
return node.GetId();
@@ -194,19 +194,19 @@ class FakeServerChange {
void Delete(int64 id) {
{
// Delete the sync node.
- csync::WriteNode node(trans_);
+ syncer::WriteNode node(trans_);
EXPECT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(id));
EXPECT_FALSE(node.GetFirstChildId());
node.Remove();
}
{
// Verify the deletion.
- csync::ReadNode node(trans_);
+ syncer::ReadNode node(trans_);
EXPECT_EQ(BaseNode::INIT_FAILED_ENTRY_IS_DEL, node.InitByIdLookup(id));
}
- csync::ChangeRecord record;
- record.action = csync::ChangeRecord::ACTION_DELETE;
+ syncer::ChangeRecord record;
+ record.action = syncer::ChangeRecord::ACTION_DELETE;
record.id = id;
// Deletions are always first in the changelist, but we can't actually do
// WriteNode::Remove() on the node until its children are moved. So, as
@@ -218,7 +218,7 @@ class FakeServerChange {
// Set a new title value, and return the old value.
std::wstring ModifyTitle(int64 id, const std::wstring& new_title) {
- csync::WriteNode node(trans_);
+ syncer::WriteNode node(trans_);
EXPECT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(id));
std::string old_title = node.GetTitle();
node.SetTitle(new_title);
@@ -230,15 +230,15 @@ class FakeServerChange {
// We could return the old predecessor id, but it turns out not to be
// very useful for assertions.
int64 ModifyPosition(int64 id, int64 parent_id, int64 predecessor_id) {
- csync::ReadNode parent(trans_);
+ syncer::ReadNode parent(trans_);
EXPECT_EQ(BaseNode::INIT_OK, parent.InitByIdLookup(parent_id));
- csync::WriteNode node(trans_);
+ syncer::WriteNode node(trans_);
EXPECT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(id));
int64 old_parent_id = node.GetParentId();
if (predecessor_id == 0) {
EXPECT_TRUE(node.SetPosition(parent, NULL));
} else {
- csync::ReadNode predecessor(trans_);
+ syncer::ReadNode predecessor(trans_);
EXPECT_EQ(BaseNode::INIT_OK, predecessor.InitByIdLookup(predecessor_id));
EXPECT_EQ(predecessor.GetParentId(), parent.GetId());
EXPECT_TRUE(node.SetPosition(parent, &predecessor));
@@ -250,10 +250,10 @@ class FakeServerChange {
// Pass the fake change list to |service|.
void ApplyPendingChanges(ChangeProcessor* processor) {
processor->ApplyChangesFromSyncModel(
- trans_, csync::ImmutableChangeRecordList(&changes_));
+ trans_, syncer::ImmutableChangeRecordList(&changes_));
}
- const csync::ChangeRecordList& changes() {
+ const syncer::ChangeRecordList& changes() {
return changes_;
}
@@ -264,19 +264,19 @@ class FakeServerChange {
// Coalesce multi-property edits.
if (!changes_.empty() && changes_.back().id == id &&
changes_.back().action ==
- csync::ChangeRecord::ACTION_UPDATE)
+ syncer::ChangeRecord::ACTION_UPDATE)
return;
- csync::ChangeRecord record;
- record.action = csync::ChangeRecord::ACTION_UPDATE;
+ syncer::ChangeRecord record;
+ record.action = syncer::ChangeRecord::ACTION_UPDATE;
record.id = id;
changes_.push_back(record);
}
// The transaction on which everything happens.
- csync::WriteTransaction *trans_;
+ syncer::WriteTransaction *trans_;
// The change list we construct.
- csync::ChangeRecordList changes_;
+ syncer::ChangeRecordList changes_;
};
class ExtensiveChangesBookmarkModelObserver : public BaseBookmarkModelObserver {
@@ -364,7 +364,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
profile_.GetBookmarkModel(),
test_user_share_.user_share(),
&mock_error_handler_));
- csync::SyncError error = model_associator_->AssociateModels();
+ syncer::SyncError error = model_associator_->AssociateModels();
EXPECT_FALSE(error.IsSet());
MessageLoop::current()->RunAllPending();
@@ -378,7 +378,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
void StopSync() {
change_processor_->Stop();
change_processor_.reset();
- csync::SyncError error = model_associator_->DisassociateModels();
+ syncer::SyncError error = model_associator_->DisassociateModels();
EXPECT_FALSE(error.IsSet());
model_associator_.reset();
@@ -396,14 +396,14 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
}
bool InitSyncNodeFromChromeNode(const BookmarkNode* bnode,
- csync::BaseNode* sync_node) {
+ syncer::BaseNode* sync_node) {
return model_associator_->InitSyncNodeFromChromeId(bnode->id(),
sync_node);
}
- void ExpectSyncerNodeMatching(csync::BaseTransaction* trans,
+ void ExpectSyncerNodeMatching(syncer::BaseTransaction* trans,
const BookmarkNode* bnode) {
- csync::ReadNode gnode(trans);
+ syncer::ReadNode gnode(trans);
ASSERT_TRUE(InitSyncNodeFromChromeNode(bnode, &gnode));
// Non-root node titles and parents must match.
if (!model_->is_permanent_node(bnode)) {
@@ -423,7 +423,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
} else {
const BookmarkNode* bprev =
bnode->parent()->GetChild(browser_index - 1);
- csync::ReadNode gprev(trans);
+ syncer::ReadNode gprev(trans);
ASSERT_TRUE(InitSyncNodeFromChromeNode(bprev, &gprev));
EXPECT_EQ(gnode.GetPredecessorId(), gprev.GetId());
EXPECT_EQ(gnode.GetParentId(), gprev.GetParentId());
@@ -433,7 +433,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
} else {
const BookmarkNode* bnext =
bnode->parent()->GetChild(browser_index + 1);
- csync::ReadNode gnext(trans);
+ syncer::ReadNode gnext(trans);
ASSERT_TRUE(InitSyncNodeFromChromeNode(bnext, &gnext));
EXPECT_EQ(gnode.GetSuccessorId(), gnext.GetId());
EXPECT_EQ(gnode.GetParentId(), gnext.GetParentId());
@@ -443,11 +443,11 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
}
void ExpectSyncerNodeMatching(const BookmarkNode* bnode) {
- csync::ReadTransaction trans(FROM_HERE, test_user_share_.user_share());
+ syncer::ReadTransaction trans(FROM_HERE, test_user_share_.user_share());
ExpectSyncerNodeMatching(&trans, bnode);
}
- void ExpectBrowserNodeMatching(csync::BaseTransaction* trans,
+ void ExpectBrowserNodeMatching(syncer::BaseTransaction* trans,
int64 sync_id) {
EXPECT_TRUE(sync_id);
const BookmarkNode* bnode =
@@ -468,12 +468,12 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
void ExpectSyncerNodeKnown(const BookmarkNode* node) {
int64 sync_id = model_associator_->GetSyncIdFromChromeId(node->id());
- EXPECT_NE(sync_id, csync::kInvalidId);
+ EXPECT_NE(sync_id, syncer::kInvalidId);
}
void ExpectSyncerNodeUnknown(const BookmarkNode* node) {
int64 sync_id = model_associator_->GetSyncIdFromChromeId(node->id());
- EXPECT_EQ(sync_id, csync::kInvalidId);
+ EXPECT_EQ(sync_id, syncer::kInvalidId);
}
void ExpectBrowserNodeTitle(int64 sync_id, const std::wstring& title) {
@@ -500,7 +500,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
EXPECT_EQ(node->parent(), parent);
}
- void ExpectModelMatch(csync::BaseTransaction* trans) {
+ void ExpectModelMatch(syncer::BaseTransaction* trans) {
const BookmarkNode* root = model_->root_node();
EXPECT_EQ(root->GetIndexOf(model_->bookmark_bar_node()), 0);
EXPECT_EQ(root->GetIndexOf(model_->other_node()), 1);
@@ -515,7 +515,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
ExpectBrowserNodeMatching(trans, id);
- csync::ReadNode gnode(trans);
+ syncer::ReadNode gnode(trans);
ASSERT_EQ(BaseNode::INIT_OK, gnode.InitByIdLookup(id));
stack.push(gnode.GetFirstChildId());
stack.push(gnode.GetSuccessorId());
@@ -523,7 +523,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
}
void ExpectModelMatch() {
- csync::ReadTransaction trans(FROM_HERE, test_user_share_.user_share());
+ syncer::ReadTransaction trans(FROM_HERE, test_user_share_.user_share());
ExpectModelMatch(&trans);
}
@@ -554,7 +554,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
protected:
BookmarkModel* model_;
- csync::TestUserShare test_user_share_;
+ syncer::TestUserShare test_user_share_;
scoped_ptr<BookmarkChangeProcessor> change_processor_;
StrictMock<DataTypeErrorHandlerMock> mock_error_handler_;
};
@@ -632,7 +632,7 @@ TEST_F(ProfileSyncServiceBookmarkTest, ServerChangeProcessing) {
LoadBookmarkModel(DELETE_EXISTING_STORAGE, DONT_SAVE_TO_STORAGE);
StartSync();
- csync::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
+ syncer::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
FakeServerChange adds(&trans);
int64 f1 = adds.AddFolder(L"Server Folder B", bookmark_bar_id(), 0);
@@ -655,7 +655,7 @@ TEST_F(ProfileSyncServiceBookmarkTest, ServerChangeProcessing) {
int64 u6 = adds.AddURL(L"Sync1", "http://www.syncable.edu/",
mobile_bookmarks_id(), 0);
- csync::ChangeRecordList::const_iterator it;
+ syncer::ChangeRecordList::const_iterator it;
// The bookmark model shouldn't yet have seen any of the nodes of |adds|.
for (it = adds.changes().begin(); it != adds.changes().end(); ++it)
ExpectBrowserNodeUnknown(it->id);
@@ -729,7 +729,7 @@ TEST_F(ProfileSyncServiceBookmarkTest, ServerChangeRequiringFosterParent) {
LoadBookmarkModel(DELETE_EXISTING_STORAGE, DONT_SAVE_TO_STORAGE);
StartSync();
- csync::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
+ syncer::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
// Stress the immediate children of other_node because that's where
// ApplyModelChanges puts a temporary foster parent node.
@@ -744,7 +744,7 @@ TEST_F(ProfileSyncServiceBookmarkTest, ServerChangeRequiringFosterParent) {
int64 f6 = adds.AddFolder(L"f6", f1, u5); // + f6
int64 u7 = adds.AddURL( L"u7", url, f0, f1); // + u7 NOLINT
- csync::ChangeRecordList::const_iterator it;
+ syncer::ChangeRecordList::const_iterator it;
// The bookmark model shouldn't yet have seen any of the nodes of |adds|.
for (it = adds.changes().begin(); it != adds.changes().end(); ++it)
ExpectBrowserNodeUnknown(it->id);
@@ -778,7 +778,7 @@ TEST_F(ProfileSyncServiceBookmarkTest, ServerChangeWithNonCanonicalURL) {
StartSync();
{
- csync::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
+ syncer::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
FakeServerChange adds(&trans);
std::string url("http://dev.chromium.org");
@@ -809,7 +809,7 @@ TEST_F(ProfileSyncServiceBookmarkTest, DISABLED_ServerChangeWithInvalidURL) {
int child_count = 0;
{
- csync::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
+ syncer::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
FakeServerChange adds(&trans);
std::string url("x");
@@ -926,8 +926,8 @@ TEST_F(ProfileSyncServiceBookmarkTest, UnrecoverableErrorSuspendsService) {
// updating the ProfileSyncService state. This should introduce
// inconsistency between the two models.
{
- csync::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
- csync::WriteNode sync_node(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
+ syncer::WriteNode sync_node(&trans);
ASSERT_TRUE(InitSyncNodeFromChromeNode(node, &sync_node));
sync_node.Remove();
}
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index 50a4f327..1457a62 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -28,7 +28,7 @@
#include "chrome/common/chrome_switches.h"
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
-using csync::sessions::SyncSessionSnapshot;
+using syncer::sessions::SyncSessionSnapshot;
// TODO(rsimha): Remove the following lines once crbug.com/91863 is fixed.
// The amount of time for which we wait for a live sync operation to complete.
@@ -286,7 +286,7 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() {
break;
}
if (service()->passphrase_required_reason() ==
- csync::REASON_DECRYPTION) {
+ syncer::REASON_DECRYPTION) {
// A passphrase is required for decryption and we don't have it. Do not
// wait any more.
SignalStateCompleteWithNextState(SET_PASSPHRASE_FAILED);
@@ -399,7 +399,7 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() {
case WAITING_FOR_ACTIONABLE_ERROR: {
DVLOG(1) << GetClientInfoString("WAITING_FOR_ACTIONABLE_ERROR");
ProfileSyncService::Status status = GetStatus();
- if (status.sync_protocol_error.action != csync::UNKNOWN_ACTION &&
+ if (status.sync_protocol_error.action != syncer::UNKNOWN_ACTION &&
service_->HasUnrecoverableError() == true) {
// An actionable error has been detected.
SignalStateCompleteWithNextState(WAITING_FOR_NOTHING);
@@ -597,12 +597,12 @@ bool ProfileSyncServiceHarness::AwaitExponentialBackoffVerification() {
bool ProfileSyncServiceHarness::AwaitActionableError() {
ProfileSyncService::Status status = GetStatus();
- CHECK(status.sync_protocol_error.action == csync::UNKNOWN_ACTION);
+ CHECK(status.sync_protocol_error.action == syncer::UNKNOWN_ACTION);
wait_state_ = WAITING_FOR_ACTIONABLE_ERROR;
AwaitStatusChangeWithTimeout(kLiveSyncOperationTimeoutMs,
"Waiting for actionable error");
status = GetStatus();
- return (status.sync_protocol_error.action != csync::UNKNOWN_ACTION &&
+ return (status.sync_protocol_error.action != syncer::UNKNOWN_ACTION &&
service_->HasUnrecoverableError());
}
@@ -796,7 +796,7 @@ bool ProfileSyncServiceHarness::IsFullySynced() {
// good chance that we're now fully up to date.
bool is_fully_synced =
snap.model_neutral_state().num_successful_commits == 0
- && snap.model_neutral_state().commit_result == csync::SYNCER_OK
+ && snap.model_neutral_state().commit_result == syncer::SYNCER_OK
&& IsDataSyncedImpl(snap);
DVLOG(1) << GetClientInfoString(
@@ -1002,7 +1002,7 @@ std::string ProfileSyncServiceHarness::GetClientInfoString(
<< (service()->sync_initialized() ? service()->HasUnsyncedItems() : 0)
<< ", did_commit: "
<< (snap.model_neutral_state().num_successful_commits == 0 &&
- snap.model_neutral_state().commit_result == csync::SYNCER_OK)
+ snap.model_neutral_state().commit_result == syncer::SYNCER_OK)
<< ", encryption conflicts: "
<< snap.num_encryption_conflicts()
<< ", hierarchy conflicts: "
@@ -1014,7 +1014,7 @@ std::string ProfileSyncServiceHarness::GetClientInfoString(
<< ", num_updates_downloaded : "
<< snap.model_neutral_state().num_updates_downloaded_total
<< ", passphrase_required_reason: "
- << csync::PassphraseRequiredReasonToString(
+ << syncer::PassphraseRequiredReasonToString(
service()->passphrase_required_reason())
<< ", notifications_enabled: "
<< status.notifications_enabled
diff --git a/chrome/browser/sync/profile_sync_service_harness.h b/chrome/browser/sync/profile_sync_service_harness.h
index 88ebd06..1c3b05e 100644
--- a/chrome/browser/sync/profile_sync_service_harness.h
+++ b/chrome/browser/sync/profile_sync_service_harness.h
@@ -161,7 +161,7 @@ class ProfileSyncServiceHarness
bool DisableSyncForAllDatatypes();
// Returns a snapshot of the current sync session.
- csync::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const;
+ syncer::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const;
// Encrypt the datatype |type|. This method will block while the sync backend
// host performs the encryption or a timeout is reached.
@@ -290,7 +290,7 @@ class ProfileSyncServiceHarness
// A helper for implementing IsDataSynced() and IsFullySynced().
bool IsDataSyncedImpl(
- const csync::sessions::SyncSessionSnapshot& snapshot);
+ const syncer::sessions::SyncSessionSnapshot& snapshot);
// Returns true if the sync client has no unsynced items.
bool IsDataSynced();
diff --git a/chrome/browser/sync/profile_sync_service_mock.h b/chrome/browser/sync/profile_sync_service_mock.h
index dfacfed..a9b2cc9 100644
--- a/chrome/browser/sync/profile_sync_service_mock.h
+++ b/chrome/browser/sync/profile_sync_service_mock.h
@@ -36,7 +36,7 @@ class ProfileSyncServiceMock : public ProfileSyncService {
MOCK_METHOD0(DisableForUser, void());
MOCK_METHOD2(OnBackendInitialized,
- void(const csync::WeakHandle<csync::JsBackend>&,
+ void(const syncer::WeakHandle<syncer::JsBackend>&,
bool));
MOCK_METHOD0(OnSyncCycleCompleted, void());
MOCK_METHOD0(OnAuthError, void());
@@ -57,16 +57,16 @@ class ProfileSyncServiceMock : public ProfileSyncService {
MOCK_METHOD3(DisableBrokenDatatype, void(syncable::ModelType,
const tracked_objects::Location&,
std::string message));
- MOCK_CONST_METHOD0(GetUserShare, csync::UserShare*());
+ MOCK_CONST_METHOD0(GetUserShare, syncer::UserShare*());
MOCK_METHOD3(ActivateDataType,
- void(syncable::ModelType, csync::ModelSafeGroup,
+ void(syncable::ModelType, syncer::ModelSafeGroup,
browser_sync::ChangeProcessor*));
MOCK_METHOD1(DeactivateDataType, void(syncable::ModelType));
MOCK_METHOD0(InitializeBackend, void());
MOCK_METHOD1(AddObserver, void(Observer*));
MOCK_METHOD1(RemoveObserver, void(Observer*));
- MOCK_METHOD0(GetJsController, base::WeakPtr<csync::JsController>());
+ MOCK_METHOD0(GetJsController, base::WeakPtr<syncer::JsController>());
MOCK_CONST_METHOD0(HasSyncSetupCompleted, bool());
MOCK_CONST_METHOD0(EncryptEverythingEnabled, bool());
@@ -77,7 +77,7 @@ class ProfileSyncServiceMock : public ProfileSyncService {
MOCK_CONST_METHOD0(GetPreferredDataTypes, syncable::ModelTypeSet());
MOCK_CONST_METHOD0(GetRegisteredDataTypes, syncable::ModelTypeSet());
MOCK_CONST_METHOD0(GetLastSessionSnapshot,
- csync::sessions::SyncSessionSnapshot());
+ syncer::sessions::SyncSessionSnapshot());
MOCK_METHOD0(QueryDetailedSyncStatus,
browser_sync::SyncBackendHost::Status());
@@ -88,7 +88,7 @@ class ProfileSyncServiceMock : public ProfileSyncService {
MOCK_CONST_METHOD0(sync_initialized, bool());
MOCK_CONST_METHOD0(waiting_for_auth, bool());
MOCK_METHOD1(OnActionableError, void(
- const csync::SyncProtocolError&));
+ const syncer::SyncProtocolError&));
MOCK_METHOD0(IsSyncEnabledAndLoggedIn, bool());
MOCK_METHOD0(IsSyncTokenAvailable, bool());
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index 1664c59..b1d0547 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -71,7 +71,7 @@ ACTION_P3(MakePasswordSyncComponents, service, ps, dtc) {
ACTION_P(AcquireSyncTransaction, password_test_service) {
// Check to make sure we can aquire a transaction (will crash if a transaction
// is already held by this thread, deadlock if held by another thread).
- csync::WriteTransaction trans(
+ syncer::WriteTransaction trans(
FROM_HERE, password_test_service->GetUserShare());
DVLOG(1) << "Sync transaction acquired.";
}
@@ -112,21 +112,21 @@ class PasswordTestProfileSyncService : public TestProfileSyncService {
class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
public:
- csync::UserShare* GetUserShare() {
+ syncer::UserShare* GetUserShare() {
return service_->GetUserShare();
}
void AddPasswordSyncNode(const PasswordForm& entry) {
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode password_root(&trans);
- ASSERT_EQ(csync::BaseNode::INIT_OK,
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode password_root(&trans);
+ ASSERT_EQ(syncer::BaseNode::INIT_OK,
password_root.InitByTagLookup(browser_sync::kPasswordTag));
- csync::WriteNode node(&trans);
+ syncer::WriteNode node(&trans);
std::string tag = PasswordModelAssociator::MakeTag(entry);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::PASSWORDS, password_root, tag);
- ASSERT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ ASSERT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
PasswordModelAssociator::WriteToSyncNode(entry, &node);
}
@@ -222,15 +222,15 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
}
void GetPasswordEntriesFromSyncDB(std::vector<PasswordForm>* entries) {
- csync::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode password_root(&trans);
- ASSERT_EQ(csync::BaseNode::INIT_OK,
+ syncer::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode password_root(&trans);
+ ASSERT_EQ(syncer::BaseNode::INIT_OK,
password_root.InitByTagLookup(browser_sync::kPasswordTag));
int64 child_id = password_root.GetFirstChildId();
- while (child_id != csync::kInvalidId) {
- csync::ReadNode child_node(&trans);
- ASSERT_EQ(csync::BaseNode::INIT_OK,
+ while (child_id != syncer::kInvalidId) {
+ syncer::ReadNode child_node(&trans);
+ ASSERT_EQ(syncer::BaseNode::INIT_OK,
child_node.InitByIdLookup(child_id));
const sync_pb::PasswordSpecificsData& password =
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
index 885035b..72c029b 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -43,7 +43,7 @@ using base::JSONReader;
using browser_sync::GenericChangeProcessor;
using browser_sync::SharedChangeProcessor;
using browser_sync::UIDataTypeController;
-using csync::ChangeRecord;
+using syncer::ChangeRecord;
using testing::_;
using testing::Invoke;
using testing::Return;
@@ -51,7 +51,7 @@ using testing::Return;
typedef std::map<const std::string, const Value*> PreferenceValues;
ACTION_P(CreateAndSaveChangeProcessor, change_processor) {
- csync::UserShare* user_share = arg0->GetUserShare();
+ syncer::UserShare* user_share = arg0->GetUserShare();
*change_processor = new GenericChangeProcessor(arg1, arg2, user_share);
return *change_processor;
}
@@ -61,27 +61,27 @@ class ProfileSyncServicePreferenceTest
: public AbstractProfileSyncServiceTest {
public:
int64 SetSyncedValue(const std::string& name, const Value& value) {
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode root(&trans);
if (root.InitByTagLookup(syncable::ModelTypeToRootTag(
- syncable::PREFERENCES)) != csync::BaseNode::INIT_OK) {
- return csync::kInvalidId;
+ syncable::PREFERENCES)) != syncer::BaseNode::INIT_OK) {
+ return syncer::kInvalidId;
}
- csync::WriteNode tag_node(&trans);
- csync::WriteNode node(&trans);
+ syncer::WriteNode tag_node(&trans);
+ syncer::WriteNode node(&trans);
if (tag_node.InitByClientTagLookup(syncable::PREFERENCES, name) ==
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return WriteSyncedValue(name, value, &tag_node);
}
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::PREFERENCES, root, name);
- if (result == csync::WriteNode::INIT_SUCCESS)
+ if (result == syncer::WriteNode::INIT_SUCCESS)
return WriteSyncedValue(name, value, &node);
- return csync::kInvalidId;
+ return syncer::kInvalidId;
}
protected:
@@ -160,11 +160,11 @@ class ProfileSyncServicePreferenceTest
// Caller gets ownership of the returned value.
const Value* GetSyncedValue(const std::string& name) {
- csync::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode node(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode node(&trans);
if (node.InitByClientTagLookup(syncable::PREFERENCES, name) !=
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
return NULL;
}
@@ -176,12 +176,12 @@ class ProfileSyncServicePreferenceTest
int64 WriteSyncedValue(const std::string& name,
const Value& value,
- csync::WriteNode* node) {
- csync::SyncData sync_data;
+ syncer::WriteNode* node) {
+ syncer::SyncData sync_data;
if (!PrefModelAssociator::CreatePrefSyncData(name,
value,
&sync_data)) {
- return csync::kInvalidId;
+ return syncer::kInvalidId;
}
node->SetEntitySpecifics(sync_data.GetSpecifics());
return node->GetId();
@@ -235,7 +235,7 @@ class AddPreferenceEntriesHelper {
for (PreferenceValues::const_iterator i = entries.begin();
i != entries.end(); ++i) {
- if (test->SetSyncedValue(i->first, *i->second) == csync::kInvalidId)
+ if (test->SetSyncedValue(i->first, *i->second) == syncer::kInvalidId)
return;
}
success_ = true;
@@ -253,7 +253,7 @@ TEST_F(ProfileSyncServicePreferenceTest, CreatePrefSyncData) {
const PrefService::Preference* pref =
prefs_->FindPreference(prefs::kHomePage);
- csync::SyncData sync_data;
+ syncer::SyncData sync_data;
EXPECT_TRUE(PrefModelAssociator::CreatePrefSyncData(pref->name(),
*pref->GetValue(), &sync_data));
EXPECT_EQ(std::string(prefs::kHomePage), sync_data.GetTag());
@@ -393,9 +393,9 @@ TEST_F(ProfileSyncServicePreferenceTest, UpdatedSyncNodeActionUpdate) {
scoped_ptr<Value> expected(Value::CreateStringValue(example_url1_));
int64 node_id = SetSyncedValue(prefs::kHomePage, *expected);
- ASSERT_NE(node_id, csync::kInvalidId);
+ ASSERT_NE(node_id, syncer::kInvalidId);
{
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
@@ -414,9 +414,9 @@ TEST_F(ProfileSyncServicePreferenceTest, UpdatedSyncNodeActionAdd) {
scoped_ptr<Value> expected(Value::CreateStringValue(example_url0_));
int64 node_id = SetSyncedValue(prefs::kHomePage, *expected);
- ASSERT_NE(node_id, csync::kInvalidId);
+ ASSERT_NE(node_id, syncer::kInvalidId);
{
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
@@ -437,9 +437,9 @@ TEST_F(ProfileSyncServicePreferenceTest, UpdatedSyncNodeUnknownPreference) {
scoped_ptr<Value> expected(Value::CreateStringValue(example_url0_));
int64 node_id = SetSyncedValue("unknown preference", *expected);
- ASSERT_NE(node_id, csync::kInvalidId);
+ ASSERT_NE(node_id, syncer::kInvalidId);
{
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
@@ -472,9 +472,9 @@ TEST_F(ProfileSyncServicePreferenceTest, ManagedPreferences) {
scoped_ptr<Value> sync_value(
Value::CreateStringValue("http://crbug.com"));
int64 node_id = SetSyncedValue(prefs::kHomePage, *sync_value);
- ASSERT_NE(node_id, csync::kInvalidId);
+ ASSERT_NE(node_id, syncer::kInvalidId);
{
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
@@ -535,9 +535,9 @@ TEST_F(ProfileSyncServicePreferenceTest,
scoped_ptr<Value> sync_value(
Value::CreateStringValue("http://example.com/sync"));
int64 node_id = SetSyncedValue(prefs::kHomePage, *sync_value);
- ASSERT_NE(node_id, csync::kInvalidId);
+ ASSERT_NE(node_id, syncer::kInvalidId);
{
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc
index b92b0d4..37fd7e5 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -55,10 +55,10 @@ using browser_sync::SessionDataTypeController;
using browser_sync::SessionModelAssociator;
using browser_sync::SyncBackendHost;
using content::BrowserThread;
-using csync::ChangeRecord;
+using syncer::ChangeRecord;
using testing::_;
using testing::Return;
-using csync::TestIdFactory;
+using syncer::TestIdFactory;
namespace browser_sync {
@@ -307,12 +307,12 @@ TEST_F(ProfileSyncServiceSessionTest, WriteSessionToNode) {
ASSERT_TRUE(has_nodes);
std::string machine_tag = model_associator_->GetCurrentMachineTag();
int64 sync_id = model_associator_->GetSyncIdFromSessionTag(machine_tag);
- ASSERT_NE(csync::kInvalidId, sync_id);
+ ASSERT_NE(syncer::kInvalidId, sync_id);
// Check that we can get the correct session specifics back from the node.
- csync::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode node(&trans);
- ASSERT_EQ(csync::BaseNode::INIT_OK,
+ syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode node(&trans);
+ ASSERT_EQ(syncer::BaseNode::INIT_OK,
node.InitByClientTagLookup(syncable::SESSIONS, machine_tag));
const sync_pb::SessionSpecifics& specifics(node.GetSessionSpecifics());
ASSERT_EQ(machine_tag, specifics.session_tag());
@@ -344,7 +344,7 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_WriteFilledSessionToNode) {
ASSERT_TRUE(has_nodes);
std::string machine_tag = model_associator_->GetCurrentMachineTag();
int64 sync_id = model_associator_->GetSyncIdFromSessionTag(machine_tag);
- ASSERT_NE(csync::kInvalidId, sync_id);
+ ASSERT_NE(syncer::kInvalidId, sync_id);
// Check that this machine's data is not included in the foreign windows.
std::vector<const SyncedSession*> foreign_sessions;
@@ -648,7 +648,7 @@ TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionUpdate) {
model_associator_->GetCurrentMachineTag());
ASSERT_FALSE(notified_of_update_);
{
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
@@ -667,7 +667,7 @@ TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionAdd) {
model_associator_->GetCurrentMachineTag());
ASSERT_FALSE(notified_of_update_);
{
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
@@ -688,7 +688,7 @@ TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionDelete) {
deleted_specifics.mutable_session()->set_session_tag("tag");
ASSERT_FALSE(notified_of_update_);
{
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(
&trans,
ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList(
@@ -978,7 +978,7 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_ExistingTabs) {
std::string machine_tag = model_associator_->GetCurrentMachineTag();
int64 sync_id = model_associator_->GetSyncIdFromSessionTag(machine_tag);
- ASSERT_NE(csync::kInvalidId, sync_id);
+ ASSERT_NE(syncer::kInvalidId, sync_id);
// Check that this machine's data is not included in the foreign windows.
std::vector<const SyncedSession*> foreign_sessions;
@@ -1013,20 +1013,20 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_MissingHeaderAndTab) {
NavigateAndCommitActiveTab(GURL("http://bar2"));
CreateRootHelper create_root(this);
ASSERT_TRUE(StartSyncService(create_root.callback(), false));
- csync::SyncError error;
+ syncer::SyncError error;
std::string local_tag = model_associator_->GetCurrentMachineTag();
error = model_associator_->DisassociateModels();
ASSERT_FALSE(error.IsSet());
{
// Create a sync node with the local tag but neither header nor tab field.
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
root.InitByTagLookup(syncable::ModelTypeToRootTag(syncable::SESSIONS));
- csync::WriteNode extra_header(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode extra_header(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
extra_header.InitUniqueByCreation(syncable::SESSIONS, root, "new_tag");
- ASSERT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ ASSERT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
sync_pb::SessionSpecifics specifics;
specifics.set_session_tag(local_tag);
extra_header.SetSessionSpecifics(specifics);
@@ -1044,21 +1044,21 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_MultipleHeaders) {
NavigateAndCommitActiveTab(GURL("http://bar2"));
CreateRootHelper create_root(this);
ASSERT_TRUE(StartSyncService(create_root.callback(), false));
- csync::SyncError error;
+ syncer::SyncError error;
std::string local_tag = model_associator_->GetCurrentMachineTag();
error = model_associator_->DisassociateModels();
ASSERT_FALSE(error.IsSet());
{
// Create another sync node with a header field and the local tag.
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
root.InitByTagLookup(syncable::ModelTypeToRootTag(syncable::SESSIONS));
- csync::WriteNode extra_header(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode extra_header(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
extra_header.InitUniqueByCreation(syncable::SESSIONS,
root, local_tag + "_");
- ASSERT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ ASSERT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
sync_pb::SessionSpecifics specifics;
specifics.set_session_tag(local_tag);
specifics.mutable_header();
@@ -1076,7 +1076,7 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_CorruptedForeign) {
NavigateAndCommitActiveTab(GURL("http://bar2"));
CreateRootHelper create_root(this);
ASSERT_TRUE(StartSyncService(create_root.callback(), false));
- csync::SyncError error;
+ syncer::SyncError error;
error = model_associator_->DisassociateModels();
ASSERT_FALSE(error.IsSet());
@@ -1084,14 +1084,14 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_CorruptedForeign) {
// Create another sync node with neither header nor tab field and a foreign
// tag.
std::string foreign_tag = "foreign_tag";
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
root.InitByTagLookup(syncable::ModelTypeToRootTag(syncable::SESSIONS));
- csync::WriteNode extra_header(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode extra_header(&trans);
+ syncer::WriteNode::InitUniqueByCreationResult result =
extra_header.InitUniqueByCreation(syncable::SESSIONS,
root, foreign_tag);
- ASSERT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ ASSERT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
sync_pb::SessionSpecifics specifics;
specifics.set_session_tag(foreign_tag);
extra_header.SetSessionSpecifics(specifics);
@@ -1109,7 +1109,7 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_MissingLocalTabNode) {
CreateRootHelper create_root(this);
ASSERT_TRUE(StartSyncService(create_root.callback(), false));
std::string local_tag = model_associator_->GetCurrentMachineTag();
- csync::SyncError error;
+ syncer::SyncError error;
error = model_associator_->DisassociateModels();
ASSERT_FALSE(error.IsSet());
@@ -1117,10 +1117,10 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_MissingLocalTabNode) {
// Delete the first sync tab node.
std::string tab_tag = SessionModelAssociator::TabIdToTag(local_tag, 0);
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::ReadNode root(&trans);
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::ReadNode root(&trans);
root.InitByTagLookup(syncable::ModelTypeToRootTag(syncable::SESSIONS));
- csync::WriteNode tab_node(&trans);
+ syncer::WriteNode tab_node(&trans);
ASSERT_TRUE(tab_node.InitByClientTagLookup(syncable::SESSIONS, tab_tag));
tab_node.Remove();
}
@@ -1182,15 +1182,15 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_CorruptedLocalHeader) {
CreateRootHelper create_root(this);
ASSERT_TRUE(StartSyncService(create_root.callback(), false));
std::string local_tag = model_associator_->GetCurrentMachineTag();
- csync::SyncError error;
+ syncer::SyncError error;
error = model_associator_->DisassociateModels();
ASSERT_FALSE(error.IsSet());
{
// Load the header node and clear it.
- csync::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
- csync::WriteNode header(&trans);
- ASSERT_EQ(csync::BaseNode::INIT_OK,
+ syncer::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
+ syncer::WriteNode header(&trans);
+ ASSERT_EQ(syncer::BaseNode::INIT_OK,
header.InitByClientTagLookup(syncable::SESSIONS, local_tag));
sync_pb::SessionSpecifics specifics;
header.SetSessionSpecifics(specifics);
diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
index 2bdd6f2..9126b2b 100644
--- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
@@ -298,8 +298,9 @@ TEST_F(ProfileSyncServiceStartupTest, SwitchManaged) {
TEST_F(ProfileSyncServiceStartupTest, StartFailure) {
DataTypeManagerMock* data_type_manager = SetUpDataTypeManager();
DataTypeManager::ConfigureStatus status = DataTypeManager::ABORTED;
- csync::SyncError error(FROM_HERE, "Association failed.", syncable::BOOKMARKS);
- std::list<csync::SyncError> errors;
+ syncer::SyncError error(
+ FROM_HERE, "Association failed.", syncable::BOOKMARKS);
+ std::list<syncer::SyncError> errors;
errors.push_back(error);
browser_sync::DataTypeManager::ConfigureResult result(
status,
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index 705faec..336a566 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -144,16 +144,16 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
public:
void AddTypedUrlSyncNode(const history::URLRow& url,
const history::VisitVector& visits) {
- csync::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode typed_url_root(&trans);
- ASSERT_EQ(csync::BaseNode::INIT_OK,
+ syncer::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode typed_url_root(&trans);
+ ASSERT_EQ(syncer::BaseNode::INIT_OK,
typed_url_root.InitByTagLookup(browser_sync::kTypedUrlTag));
- csync::WriteNode node(&trans);
+ syncer::WriteNode node(&trans);
std::string tag = url.url().spec();
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::TYPED_URLS, typed_url_root, tag);
- ASSERT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ ASSERT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
TypedUrlModelAssociator::WriteToSyncNode(url, visits, &node);
}
@@ -233,16 +233,16 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
void GetTypedUrlsFromSyncDB(history::URLRows* urls) {
urls->clear();
- csync::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
- csync::ReadNode typed_url_root(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, service_->GetUserShare());
+ syncer::ReadNode typed_url_root(&trans);
if (typed_url_root.InitByTagLookup(browser_sync::kTypedUrlTag) !=
- csync::BaseNode::INIT_OK)
+ syncer::BaseNode::INIT_OK)
return;
int64 child_id = typed_url_root.GetFirstChildId();
- while (child_id != csync::kInvalidId) {
- csync::ReadNode child_node(&trans);
- if (child_node.InitByIdLookup(child_id) != csync::BaseNode::INIT_OK)
+ while (child_id != syncer::kInvalidId) {
+ syncer::ReadNode child_node(&trans);
+ if (child_node.InitByIdLookup(child_id) != syncer::BaseNode::INIT_OK)
return;
const sync_pb::TypedUrlSpecifics& typed_url(
@@ -929,7 +929,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, FailToGetTypedURLs) {
sync_entries.push_back(sync_entry);
EXPECT_CALL(error_handler_, CreateAndUploadError(_, _, _)).
- WillOnce(Return(csync::SyncError(FROM_HERE,
+ WillOnce(Return(syncer::SyncError(FROM_HERE,
"Unit test",
syncable::TYPED_URLS)));
StartSyncService(base::Bind(&AddTypedUrlEntries, this, sync_entries));
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index cf3bb78..a6f692f 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -245,8 +245,8 @@ TEST_F(ProfileSyncServiceTest, JsControllerHandlersBasic) {
EXPECT_TRUE(service_->sync_initialized());
EXPECT_TRUE(service_->GetBackendForTest() != NULL);
- csync::JsController* js_controller = service_->GetJsController();
- StrictMock<csync::MockJsEventHandler> event_handler;
+ syncer::JsController* js_controller = service_->GetJsController();
+ StrictMock<syncer::MockJsEventHandler> event_handler;
js_controller->AddJsEventHandler(&event_handler);
js_controller->RemoveJsEventHandler(&event_handler);
}
@@ -255,13 +255,13 @@ TEST_F(ProfileSyncServiceTest,
JsControllerHandlersDelayedBackendInitialization) {
StartSyncServiceAndSetInitialSyncEnded(true, false, false, true, true, false);
- StrictMock<csync::MockJsEventHandler> event_handler;
+ StrictMock<syncer::MockJsEventHandler> event_handler;
EXPECT_CALL(event_handler, HandleJsEvent(_, _)).Times(AtLeast(1));
EXPECT_EQ(NULL, service_->GetBackendForTest());
EXPECT_FALSE(service_->sync_initialized());
- csync::JsController* js_controller = service_->GetJsController();
+ syncer::JsController* js_controller = service_->GetJsController();
js_controller->AddJsEventHandler(&event_handler);
// Since we're doing synchronous initialization, backend should be
// initialized by this call.
@@ -273,16 +273,16 @@ TEST_F(ProfileSyncServiceTest,
TEST_F(ProfileSyncServiceTest, JsControllerProcessJsMessageBasic) {
StartSyncService();
- StrictMock<csync::MockJsReplyHandler> reply_handler;
+ StrictMock<syncer::MockJsReplyHandler> reply_handler;
ListValue arg_list1;
arg_list1.Append(Value::CreateBooleanValue(false));
- csync::JsArgList args1(&arg_list1);
+ syncer::JsArgList args1(&arg_list1);
EXPECT_CALL(reply_handler,
HandleJsReply("getNotificationState", HasArgs(args1)));
{
- csync::JsController* js_controller = service_->GetJsController();
+ syncer::JsController* js_controller = service_->GetJsController();
js_controller->ProcessJsMessage("getNotificationState", args1,
reply_handler.AsWeakHandle());
}
@@ -296,16 +296,16 @@ TEST_F(ProfileSyncServiceTest,
JsControllerProcessJsMessageBasicDelayedBackendInitialization) {
StartSyncServiceAndSetInitialSyncEnded(true, false, false, true, true, false);
- StrictMock<csync::MockJsReplyHandler> reply_handler;
+ StrictMock<syncer::MockJsReplyHandler> reply_handler;
ListValue arg_list1;
arg_list1.Append(Value::CreateBooleanValue(false));
- csync::JsArgList args1(&arg_list1);
+ syncer::JsArgList args1(&arg_list1);
EXPECT_CALL(reply_handler,
HandleJsReply("getNotificationState", HasArgs(args1)));
{
- csync::JsController* js_controller = service_->GetJsController();
+ syncer::JsController* js_controller = service_->GetJsController();
js_controller->ProcessJsMessage("getNotificationState",
args1, reply_handler.AsWeakHandle());
}
diff --git a/chrome/browser/sync/retry_verifier.cc b/chrome/browser/sync/retry_verifier.cc
index fa4a8d9..9d2fd6a 100644
--- a/chrome/browser/sync/retry_verifier.cc
+++ b/chrome/browser/sync/retry_verifier.cc
@@ -17,18 +17,18 @@ namespace {
// the next retry.
DelayInfo CalculateDelay(int64 current_delay) {
int64 backoff_s = std::max(static_cast<int64>(1), current_delay *
- csync::kBackoffRandomizationFactor);
+ syncer::kBackoffRandomizationFactor);
DelayInfo delay_info;
delay_info.min_delay = backoff_s + (-1 * current_delay/
- csync::kBackoffRandomizationFactor);
+ syncer::kBackoffRandomizationFactor);
delay_info.max_delay = backoff_s + current_delay/2;
delay_info.min_delay = std::max(static_cast<int64>(1),
- std::min(delay_info.min_delay, csync::kMaxBackoffSeconds));
+ std::min(delay_info.min_delay, syncer::kMaxBackoffSeconds));
delay_info.max_delay = std::max(static_cast<int64>(1),
- std::min(delay_info.max_delay, csync::kMaxBackoffSeconds));
+ std::min(delay_info.max_delay, syncer::kMaxBackoffSeconds));
return delay_info;
}
@@ -79,7 +79,7 @@ RetryVerifier::~RetryVerifier() {
// Initializes the state for verification.
void RetryVerifier::Initialize(
- const csync::sessions::SyncSessionSnapshot& snap) {
+ const syncer::sessions::SyncSessionSnapshot& snap) {
retry_count_ = 0;
last_sync_time_ = snap.sync_start_time();
FillDelayTable(delay_table_, kMaxRetry);
@@ -88,7 +88,7 @@ void RetryVerifier::Initialize(
}
void RetryVerifier::VerifyRetryInterval(
- const csync::sessions::SyncSessionSnapshot& snap) {
+ const syncer::sessions::SyncSessionSnapshot& snap) {
DCHECK(retry_count_ < kMaxRetry);
if (retry_count_ == 0) {
if (snap.sync_start_time() != last_sync_time_) {
diff --git a/chrome/browser/sync/retry_verifier.h b/chrome/browser/sync/retry_verifier.h
index ebd1897..2b15bac 100644
--- a/chrome/browser/sync/retry_verifier.h
+++ b/chrome/browser/sync/retry_verifier.h
@@ -8,11 +8,11 @@
#include "base/time.h"
-namespace csync {
+namespace syncer {
namespace sessions {
class SyncSessionSnapshot;
} // namespace sessions
-} // namespace csync
+} // namespace syncer
namespace browser_sync {
@@ -34,9 +34,9 @@ class RetryVerifier {
// Initialize with the current sync session snapshot. Using the snapshot
// we will figure out when the first retry sync happened.
- void Initialize(const csync::sessions::SyncSessionSnapshot& snap);
+ void Initialize(const syncer::sessions::SyncSessionSnapshot& snap);
void VerifyRetryInterval(
- const csync::sessions::SyncSessionSnapshot& snap);
+ const syncer::sessions::SyncSessionSnapshot& snap);
bool done() const { return done_; }
bool Succeeded() const { return done() && success_; }
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 66b5ebd..f597154 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -166,24 +166,24 @@ string16 GetSyncedStateStatusLabel(ProfileSyncService* service,
}
void GetStatusForActionableError(
- const csync::SyncProtocolError& error,
+ const syncer::SyncProtocolError& error,
string16* status_label) {
DCHECK(status_label);
switch (error.action) {
- case csync::STOP_AND_RESTART_SYNC:
+ case syncer::STOP_AND_RESTART_SYNC:
status_label->assign(
l10n_util::GetStringUTF16(IDS_SYNC_STOP_AND_RESTART_SYNC));
break;
- case csync::UPGRADE_CLIENT:
+ case syncer::UPGRADE_CLIENT:
status_label->assign(
l10n_util::GetStringFUTF16(IDS_SYNC_UPGRADE_CLIENT,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
break;
- case csync::ENABLE_SYNC_ON_ACCOUNT:
+ case syncer::ENABLE_SYNC_ON_ACCOUNT:
status_label->assign(
l10n_util::GetStringUTF16(IDS_SYNC_ENABLE_SYNC_ON_ACCOUNT));
break;
- case csync::CLEAR_USER_DATA_AND_RESYNC:
+ case syncer::CLEAR_USER_DATA_AND_RESYNC:
status_label->assign(
l10n_util::GetStringUTF16(IDS_SYNC_CLEAR_USER_DATA));
break;
@@ -324,7 +324,7 @@ MessageType GetStatusInfoForNewTabPage(ProfileSyncService* service,
if (service->HasSyncSetupCompleted() &&
service->IsPassphraseRequired()) {
- if (service->passphrase_required_reason() == csync::REASON_ENCRYPTION) {
+ if (service->passphrase_required_reason() == syncer::REASON_ENCRYPTION) {
// First machine migrating to passwords. Show as a promotion.
if (status_label && link_label) {
status_label->assign(
@@ -519,7 +519,7 @@ void ConstructAboutInformation(ProfileSyncService* service,
// with the last snapshot emitted by the syncer. Keep in mind, though, that
// not all events that update these values will ping the UI thread, so you
// might not see all intermediate values.
- csync::SyncStatus full_status(service->QueryDetailedSyncStatus());
+ syncer::SyncStatus full_status(service->QueryDetailedSyncStatus());
// This is a cache of the last snapshot of type SYNC_CYCLE_ENDED where
// !snapshot.has_more_to_sync(). In other words, it's the last in this
@@ -532,10 +532,10 @@ void ConstructAboutInformation(ProfileSyncService* service,
// the values from a single sync cycle.
//
// |snapshot| could be NULL if sync is not yet initialized.
- const csync::sessions::SyncSessionSnapshot& snapshot =
+ const syncer::sessions::SyncSessionSnapshot& snapshot =
service->sync_initialized() ?
service->GetLastSessionSnapshot() :
- csync::sessions::SyncSessionSnapshot();
+ syncer::sessions::SyncSessionSnapshot();
sync_ui_util::AddStringSyncDetails(sync_summary, "Summary",
service->QuerySyncStatusSummary());
@@ -611,7 +611,7 @@ void ConstructAboutInformation(ProfileSyncService* service,
details, "Status from Last Completed Session");
sync_ui_util::AddStringSyncDetails(
cycles, "Sync Source",
- csync::GetUpdatesSourceString(
+ syncer::GetUpdatesSourceString(
snapshot.source().updates_source));
sync_ui_util::AddStringSyncDetails(
cycles, "Download Step Result",
@@ -716,18 +716,18 @@ void ConstructAboutInformation(ProfileSyncService* service,
// Now set the actionable errors.
if ((full_status.sync_protocol_error.error_type !=
- csync::UNKNOWN_ERROR) &&
+ syncer::UNKNOWN_ERROR) &&
(full_status.sync_protocol_error.error_type !=
- csync::SYNC_SUCCESS)) {
+ syncer::SYNC_SUCCESS)) {
strings->Set("actionable_error_detected",
base::Value::CreateBooleanValue(true));
ListValue* actionable_error = new ListValue();
strings->Set("actionable_error", actionable_error);
sync_ui_util::AddStringSyncDetails(actionable_error, "Error Type",
- csync::GetSyncErrorTypeString(
+ syncer::GetSyncErrorTypeString(
full_status.sync_protocol_error.error_type));
sync_ui_util::AddStringSyncDetails(actionable_error, "Action",
- csync::GetClientActionString(
+ syncer::GetClientActionString(
full_status.sync_protocol_error.action));
sync_ui_util::AddStringSyncDetails(actionable_error, "url",
full_status.sync_protocol_error.url);
diff --git a/chrome/browser/sync/sync_ui_util_unittest.cc b/chrome/browser/sync/sync_ui_util_unittest.cc
index 10a3976..2f8ea41 100644
--- a/chrome/browser/sync/sync_ui_util_unittest.cc
+++ b/chrome/browser/sync/sync_ui_util_unittest.cc
@@ -257,8 +257,8 @@ void GetDistinctCase(ProfileSyncServiceMock& service,
case STATUS_CASE_PROTOCOL_ERROR: {
EXPECT_CALL(service, HasSyncSetupCompleted())
.WillOnce(Return(true));
- csync::SyncProtocolError protocolError;
- protocolError.action = csync::STOP_AND_RESTART_SYNC;
+ syncer::SyncProtocolError protocolError;
+ protocolError.action = syncer::STOP_AND_RESTART_SYNC;
browser_sync::SyncBackendHost::Status status;
status.sync_protocol_error = protocolError;
EXPECT_CALL(service, QueryDetailedSyncStatus())
diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc
index 4ec3672..e712272 100644
--- a/chrome/browser/sync/test/integration/enable_disable_test.cc
+++ b/chrome/browser/sync/test/integration/enable_disable_test.cc
@@ -30,12 +30,12 @@ class EnableDisableSingleClientTest : public EnableDisableTest {
DISALLOW_COPY_AND_ASSIGN(EnableDisableSingleClientTest);
};
-bool DoesTopLevelNodeExist(csync::UserShare* user_share,
+bool DoesTopLevelNodeExist(syncer::UserShare* user_share,
syncable::ModelType type) {
- csync::ReadTransaction trans(FROM_HERE, user_share);
- csync::ReadNode node(&trans);
+ syncer::ReadTransaction trans(FROM_HERE, user_share);
+ syncer::ReadNode node(&trans);
return node.InitByTagLookup(syncable::ModelTypeToRootTag(type)) ==
- csync::BaseNode::INIT_OK;
+ syncer::BaseNode::INIT_OK;
}
IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, EnableOneAtATime) {
@@ -51,7 +51,7 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, EnableOneAtATime) {
const syncable::ModelTypeSet registered_types =
GetClient(0)->service()->GetRegisteredDataTypes();
- csync::UserShare* user_share = GetClient(0)->service()->GetUserShare();
+ syncer::UserShare* user_share = GetClient(0)->service()->GetUserShare();
for (syncable::ModelTypeSet::Iterator it = registered_types.First();
it.Good(); it.Inc()) {
ASSERT_TRUE(GetClient(0)->EnableSyncForDatatype(it.Get()));
@@ -88,7 +88,7 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, DisableOneAtATime) {
const syncable::ModelTypeSet registered_types =
GetClient(0)->service()->GetRegisteredDataTypes();
- csync::UserShare* user_share = GetClient(0)->service()->GetUserShare();
+ syncer::UserShare* user_share = GetClient(0)->service()->GetUserShare();
// Make sure all top-level nodes exist first.
for (syncable::ModelTypeSet::Iterator it = registered_types.First();
@@ -105,7 +105,7 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, DisableOneAtATime) {
continue;
}
- csync::UserShare* user_share =
+ syncer::UserShare* user_share =
GetClient(0)->service()->GetUserShare();
ASSERT_FALSE(DoesTopLevelNodeExist(user_share, it.Get()))
diff --git a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
index 8eef468..af0466d 100644
--- a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
@@ -23,10 +23,10 @@ static const int kNumUrls = 163;
// This compile assert basically asserts that kNumUrls is right in the
// middle between two multiples of kDefaultMaxCommitBatchSize.
COMPILE_ASSERT(
- ((kNumUrls % csync::kDefaultMaxCommitBatchSize) >=
- (csync::kDefaultMaxCommitBatchSize / 2)) &&
- ((kNumUrls % csync::kDefaultMaxCommitBatchSize) <=
- ((csync::kDefaultMaxCommitBatchSize + 1) / 2)),
+ ((kNumUrls % syncer::kDefaultMaxCommitBatchSize) >=
+ (syncer::kDefaultMaxCommitBatchSize / 2)) &&
+ ((kNumUrls % syncer::kDefaultMaxCommitBatchSize) <=
+ ((syncer::kDefaultMaxCommitBatchSize + 1) / 2)),
kNumUrlsShouldBeBetweenTwoMultiplesOfkDefaultMaxCommitBatchSize);
class TypedUrlsSyncPerfTest : public SyncTest {
diff --git a/chrome/browser/sync/test/integration/sync_errors_test.cc b/chrome/browser/sync/test/integration/sync_errors_test.cc
index e40f1d1..d8fd3e0 100644
--- a/chrome/browser/sync/test/integration/sync_errors_test.cc
+++ b/chrome/browser/sync/test/integration/sync_errors_test.cc
@@ -61,9 +61,9 @@ IN_PROC_BROWSER_TEST_F(SyncErrorTest, ActionableErrorTest) {
SetTitle(0, node1, L"new_title1");
ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Sync."));
- csync::SyncProtocolError protocol_error;
- protocol_error.error_type = csync::TRANSIENT_ERROR;
- protocol_error.action = csync::UPGRADE_CLIENT;
+ syncer::SyncProtocolError protocol_error;
+ protocol_error.error_type = syncer::TRANSIENT_ERROR;
+ protocol_error.action = syncer::UPGRADE_CLIENT;
protocol_error.error_description = "Not My Fault";
protocol_error.url = "www.google.com";
TriggerSyncError(protocol_error, SyncTest::ERROR_FREQUENCY_ALWAYS);
@@ -84,8 +84,8 @@ IN_PROC_BROWSER_TEST_F(SyncErrorTest, ActionableErrorTest) {
IN_PROC_BROWSER_TEST_F(SyncErrorTest, ErrorWhileSettingUp) {
ASSERT_TRUE(SetupClients());
- csync::SyncProtocolError protocol_error;
- protocol_error.error_type = csync::TRANSIENT_ERROR;
+ syncer::SyncProtocolError protocol_error;
+ protocol_error.error_type = syncer::TRANSIENT_ERROR;
protocol_error.error_description = "Not My Fault";
protocol_error.url = "www.google.com";
@@ -120,9 +120,9 @@ IN_PROC_BROWSER_TEST_F(SyncErrorTest,
SetTitle(0, node1, L"new_title1");
ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Sync."));
- csync::SyncProtocolError protocol_error;
- protocol_error.error_type = csync::NOT_MY_BIRTHDAY;
- protocol_error.action = csync::DISABLE_SYNC_ON_CLIENT;
+ syncer::SyncProtocolError protocol_error;
+ protocol_error.error_type = syncer::NOT_MY_BIRTHDAY;
+ protocol_error.action = syncer::DISABLE_SYNC_ON_CLIENT;
protocol_error.error_description = "Not My Fault";
protocol_error.url = "www.google.com";
TriggerSyncError(protocol_error, SyncTest::ERROR_FREQUENCY_ALWAYS);
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index 594cd20..cab7ecf 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -642,12 +642,12 @@ void SyncTest::TriggerNotification(
syncable::ModelTypeSet changed_types) {
ASSERT_TRUE(ServerSupportsNotificationControl());
const std::string& data =
- csync::P2PNotificationData("from_server",
- csync::NOTIFY_ALL,
+ syncer::P2PNotificationData("from_server",
+ syncer::NOTIFY_ALL,
changed_types).ToString();
const std::string& path =
std::string("chromiumsync/sendnotification?channel=") +
- csync::kSyncP2PNotificationChannel + "&data=" + data;
+ syncer::kSyncP2PNotificationChannel + "&data=" + data;
ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
ASSERT_EQ("Notification sent",
UTF16ToASCII(browser()->GetActiveWebContents()->GetTitle()));
@@ -704,21 +704,21 @@ namespace {
sync_pb::SyncEnums::ErrorType
GetClientToServerResponseErrorType(
- csync::SyncProtocolErrorType error) {
+ syncer::SyncProtocolErrorType error) {
switch (error) {
- case csync::SYNC_SUCCESS:
+ case syncer::SYNC_SUCCESS:
return sync_pb::SyncEnums::SUCCESS;
- case csync::NOT_MY_BIRTHDAY:
+ case syncer::NOT_MY_BIRTHDAY:
return sync_pb::SyncEnums::NOT_MY_BIRTHDAY;
- case csync::THROTTLED:
+ case syncer::THROTTLED:
return sync_pb::SyncEnums::THROTTLED;
- case csync::CLEAR_PENDING:
+ case syncer::CLEAR_PENDING:
return sync_pb::SyncEnums::CLEAR_PENDING;
- case csync::TRANSIENT_ERROR:
+ case syncer::TRANSIENT_ERROR:
return sync_pb::SyncEnums::TRANSIENT_ERROR;
- case csync::MIGRATION_DONE:
+ case syncer::MIGRATION_DONE:
return sync_pb::SyncEnums::MIGRATION_DONE;
- case csync::UNKNOWN_ERROR:
+ case syncer::UNKNOWN_ERROR:
return sync_pb::SyncEnums::UNKNOWN;
default:
NOTREACHED();
@@ -727,19 +727,19 @@ sync_pb::SyncEnums::ErrorType
}
sync_pb::SyncEnums::Action GetClientToServerResponseAction(
- const csync::ClientAction& action) {
+ const syncer::ClientAction& action) {
switch (action) {
- case csync::UPGRADE_CLIENT:
+ case syncer::UPGRADE_CLIENT:
return sync_pb::SyncEnums::UPGRADE_CLIENT;
- case csync::CLEAR_USER_DATA_AND_RESYNC:
+ case syncer::CLEAR_USER_DATA_AND_RESYNC:
return sync_pb::SyncEnums::CLEAR_USER_DATA_AND_RESYNC;
- case csync::ENABLE_SYNC_ON_ACCOUNT:
+ case syncer::ENABLE_SYNC_ON_ACCOUNT:
return sync_pb::SyncEnums::ENABLE_SYNC_ON_ACCOUNT;
- case csync::STOP_AND_RESTART_SYNC:
+ case syncer::STOP_AND_RESTART_SYNC:
return sync_pb::SyncEnums::STOP_AND_RESTART_SYNC;
- case csync::DISABLE_SYNC_ON_CLIENT:
+ case syncer::DISABLE_SYNC_ON_CLIENT:
return sync_pb::SyncEnums::DISABLE_SYNC_ON_CLIENT;
- case csync::UNKNOWN_ACTION:
+ case syncer::UNKNOWN_ACTION:
return sync_pb::SyncEnums::UNKNOWN_ACTION;
default:
NOTREACHED();
@@ -749,7 +749,7 @@ sync_pb::SyncEnums::Action GetClientToServerResponseAction(
} // namespace
-void SyncTest::TriggerSyncError(const csync::SyncProtocolError& error,
+void SyncTest::TriggerSyncError(const syncer::SyncProtocolError& error,
SyncErrorFrequency frequency) {
ASSERT_TRUE(ServerSupportsErrorTriggering());
std::string path = "chromiumsync/error";
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h
index be961bb..df10681 100644
--- a/chrome/browser/sync/test/integration/sync_test.h
+++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -198,7 +198,7 @@ class SyncTest : public InProcessBrowserTest {
// Triggers a sync error on the server.
// error: The error the server is expected to return.
// frequency: Frequency with which the error is returned.
- void TriggerSyncError(const csync::SyncProtocolError& error,
+ void TriggerSyncError(const syncer::SyncProtocolError& error,
SyncErrorFrequency frequency);
// Triggers the creation the Synced Bookmarks folder on the server.
diff --git a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
index f454a1f..63dd0fe 100644
--- a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
@@ -245,12 +245,12 @@ IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
ASSERT_TRUE(GetClient(1)->AwaitFullSyncCompletion("Initial sync."));
// Following ensures types are enabled and active (see bug 87572).
- csync::ModelSafeRoutingInfo routes;
+ syncer::ModelSafeRoutingInfo routes;
GetClient(0)->service()->GetModelSafeRoutingInfo(&routes);
- ASSERT_EQ(csync::GROUP_PASSWORD, routes[syncable::PASSWORDS]);
+ ASSERT_EQ(syncer::GROUP_PASSWORD, routes[syncable::PASSWORDS]);
routes.clear();
GetClient(1)->service()->GetModelSafeRoutingInfo(&routes);
- ASSERT_EQ(csync::GROUP_PASSWORD, routes[syncable::PASSWORDS]);
+ ASSERT_EQ(syncer::GROUP_PASSWORD, routes[syncable::PASSWORDS]);
}
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
diff --git a/chrome/browser/sync/test/test_http_bridge_factory.cc b/chrome/browser/sync/test/test_http_bridge_factory.cc
index e9aa0de..5c15add 100644
--- a/chrome/browser/sync/test/test_http_bridge_factory.cc
+++ b/chrome/browser/sync/test/test_http_bridge_factory.cc
@@ -31,11 +31,11 @@ TestHttpBridgeFactory::TestHttpBridgeFactory() {}
TestHttpBridgeFactory::~TestHttpBridgeFactory() {}
-csync::HttpPostProviderInterface* TestHttpBridgeFactory::Create() {
+syncer::HttpPostProviderInterface* TestHttpBridgeFactory::Create() {
return new TestHttpBridge();
}
-void TestHttpBridgeFactory::Destroy(csync::HttpPostProviderInterface* http) {
+void TestHttpBridgeFactory::Destroy(syncer::HttpPostProviderInterface* http) {
delete static_cast<TestHttpBridge*>(http);
}
diff --git a/chrome/browser/sync/test/test_http_bridge_factory.h b/chrome/browser/sync/test/test_http_bridge_factory.h
index 4c91127..7663677 100644
--- a/chrome/browser/sync/test/test_http_bridge_factory.h
+++ b/chrome/browser/sync/test/test_http_bridge_factory.h
@@ -12,9 +12,9 @@
namespace browser_sync {
-class TestHttpBridge : public csync::HttpPostProviderInterface {
+class TestHttpBridge : public syncer::HttpPostProviderInterface {
public:
- // Begin csync::HttpPostProviderInterface implementation:
+ // Begin syncer::HttpPostProviderInterface implementation:
virtual void SetExtraRequestHeaders(const char * headers) OVERRIDE {}
virtual void SetURL(const char* url, int port) OVERRIDE {}
@@ -34,17 +34,17 @@ class TestHttpBridge : public csync::HttpPostProviderInterface {
const std::string&) const OVERRIDE;
virtual void Abort() OVERRIDE;
- // End csync::HttpPostProviderInterface implementation.
+ // End syncer::HttpPostProviderInterface implementation.
};
-class TestHttpBridgeFactory : public csync::HttpPostProviderFactory {
+class TestHttpBridgeFactory : public syncer::HttpPostProviderFactory {
public:
TestHttpBridgeFactory();
virtual ~TestHttpBridgeFactory();
- // csync::HttpPostProviderFactory:
- virtual csync::HttpPostProviderInterface* Create() OVERRIDE;
- virtual void Destroy(csync::HttpPostProviderInterface* http) OVERRIDE;
+ // syncer::HttpPostProviderFactory:
+ virtual syncer::HttpPostProviderInterface* Create() OVERRIDE;
+ virtual void Destroy(syncer::HttpPostProviderInterface* http) OVERRIDE;
};
} // namespace browser_sync
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 001531c..2725140 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -17,11 +17,11 @@
#include "sync/protocol/encryption.pb.h"
#include "sync/syncable/directory.h"
-using csync::ModelSafeRoutingInfo;
-using csync::sessions::ModelNeutralState;
-using csync::sessions::SyncSessionSnapshot;
-using csync::sessions::SyncSourceInfo;
-using csync::UserShare;
+using syncer::ModelSafeRoutingInfo;
+using syncer::sessions::ModelNeutralState;
+using syncer::sessions::SyncSessionSnapshot;
+using syncer::sessions::SyncSourceInfo;
+using syncer::UserShare;
using syncable::Directory;
namespace browser_sync {
@@ -58,7 +58,7 @@ void SyncBackendHostForProfileSyncTest::
namespace {
-csync::HttpPostProviderFactory* MakeTestHttpBridgeFactory() {
+syncer::HttpPostProviderFactory* MakeTestHttpBridgeFactory() {
return new browser_sync::TestHttpBridgeFactory();
}
@@ -73,8 +73,8 @@ void SyncBackendHostForProfileSyncTest::InitCore(
test_options.credentials.sync_token = "token";
test_options.restored_key_for_bootstrapping = "";
test_options.testing_mode =
- use_real_database_ ? csync::SyncManager::TEST_ON_DISK
- : csync::SyncManager::TEST_IN_MEMORY;
+ use_real_database_ ? syncer::SyncManager::TEST_ON_DISK
+ : syncer::SyncManager::TEST_IN_MEMORY;
SyncBackendHost::InitCore(test_options);
// TODO(akalin): Figure out a better way to do this.
if (synchronous_init_) {
@@ -109,7 +109,7 @@ void SyncBackendHostForProfileSyncTest::SetHistoryServiceExpectations(
} // namespace browser_sync
-csync::TestIdFactory* TestProfileSyncService::id_factory() {
+syncer::TestIdFactory* TestProfileSyncService::id_factory() {
return &id_factory_;
}
@@ -155,7 +155,7 @@ void TestProfileSyncService::SetInitialSyncEndedForAllTypes() {
}
void TestProfileSyncService::OnBackendInitialized(
- const csync::WeakHandle<csync::JsBackend>& backend,
+ const syncer::WeakHandle<syncer::JsBackend>& backend,
bool success) {
bool send_passphrase_required = false;
if (success) {
@@ -190,7 +190,7 @@ void TestProfileSyncService::OnBackendInitialized(
ProfileSyncService::OnBackendInitialized(backend, success);
if (success && send_passphrase_required)
- OnPassphraseRequired(csync::REASON_DECRYPTION, sync_pb::EncryptedData());
+ OnPassphraseRequired(syncer::REASON_DECRYPTION, sync_pb::EncryptedData());
// TODO(akalin): Figure out a better way to do this.
if (synchronous_backend_initialization_) {
diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h
index ed406b0..5039849 100644
--- a/chrome/browser/sync/test_profile_sync_service.h
+++ b/chrome/browser/sync/test_profile_sync_service.h
@@ -82,7 +82,7 @@ class TestProfileSyncService : public ProfileSyncService {
void SetInitialSyncEndedForAllTypes();
virtual void OnBackendInitialized(
- const csync::WeakHandle<csync::JsBackend>& backend,
+ const syncer::WeakHandle<syncer::JsBackend>& backend,
bool success) OVERRIDE;
virtual void Observe(int type,
@@ -97,7 +97,7 @@ class TestProfileSyncService : public ProfileSyncService {
void fail_initial_download();
void set_use_real_database();
- csync::TestIdFactory* id_factory();
+ syncer::TestIdFactory* id_factory();
// Override of ProfileSyncService::GetBackendForTest() with a more
// specific return type (since C++ supports covariant return types)
@@ -109,7 +109,7 @@ class TestProfileSyncService : public ProfileSyncService {
virtual void CreateBackend() OVERRIDE;
private:
- csync::TestIdFactory id_factory_;
+ syncer::TestIdFactory id_factory_;
bool synchronous_backend_initialization_;
diff --git a/chrome/browser/ui/webui/sync_internals_ui.cc b/chrome/browser/ui/webui/sync_internals_ui.cc
index d1b2404..286fbff 100644
--- a/chrome/browser/ui/webui/sync_internals_ui.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui.cc
@@ -29,10 +29,10 @@
#include "sync/js/js_event_details.h"
#include "ui/base/resource/resource_bundle.h"
-using csync::JsArgList;
-using csync::JsEventDetails;
-using csync::JsReplyHandler;
-using csync::WeakHandle;
+using syncer::JsArgList;
+using syncer::JsEventDetails;
+using syncer::JsReplyHandler;
+using syncer::WeakHandle;
using content::WebContents;
namespace {
diff --git a/chrome/browser/ui/webui/sync_internals_ui.h b/chrome/browser/ui/webui/sync_internals_ui.h
index 24f22f3..714375d 100644
--- a/chrome/browser/ui/webui/sync_internals_ui.h
+++ b/chrome/browser/ui/webui/sync_internals_ui.h
@@ -15,14 +15,14 @@
#include "sync/js/js_event_handler.h"
#include "sync/js/js_reply_handler.h"
-namespace csync {
+namespace syncer {
class JsController;
-} // namespace csync
+} // namespace syncer
// The implementation for the chrome://sync-internals page.
class SyncInternalsUI : public content::WebUIController,
- public csync::JsEventHandler,
- public csync::JsReplyHandler {
+ public syncer::JsEventHandler,
+ public syncer::JsReplyHandler {
public:
explicit SyncInternalsUI(content::WebUI* web_ui);
virtual ~SyncInternalsUI();
@@ -44,19 +44,19 @@ class SyncInternalsUI : public content::WebUIController,
const std::string& name,
const base::ListValue& args) OVERRIDE;
- // csync::JsEventHandler implementation.
+ // syncer::JsEventHandler implementation.
virtual void HandleJsEvent(
const std::string& name,
- const csync::JsEventDetails& details) OVERRIDE;
+ const syncer::JsEventDetails& details) OVERRIDE;
- // csync::JsReplyHandler implementation.
+ // syncer::JsReplyHandler implementation.
virtual void HandleJsReply(
const std::string& name,
- const csync::JsArgList& args) OVERRIDE;
+ const syncer::JsArgList& args) OVERRIDE;
private:
base::WeakPtrFactory<SyncInternalsUI> weak_ptr_factory_;
- base::WeakPtr<csync::JsController> js_controller_;
+ base::WeakPtr<syncer::JsController> js_controller_;
DISALLOW_COPY_AND_ASSIGN(SyncInternalsUI);
};
diff --git a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
index cc0010e..7882775 100644
--- a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
@@ -31,8 +31,8 @@
namespace {
using browser_sync::HasArgsAsList;
-using csync::JsArgList;
-using csync::JsEventDetails;
+using syncer::JsArgList;
+using syncer::JsEventDetails;
using content::BrowserThread;
using content::WebContents;
using testing::_;
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.cc b/chrome/browser/webdata/autocomplete_syncable_service.cc
index c53af85..3bb91b2 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.cc
+++ b/chrome/browser/webdata/autocomplete_syncable_service.cc
@@ -107,11 +107,11 @@ AutocompleteSyncableService::AutocompleteSyncableService()
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
}
-csync::SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
+syncer::SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> error_handler) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> error_handler) {
DCHECK(CalledOnValidThread());
DCHECK(!sync_processor_.get());
DCHECK(sync_processor.get());
@@ -130,7 +130,7 @@ csync::SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
for (std::vector<AutofillEntry>::iterator it = entries.begin();
it != entries.end(); ++it) {
new_db_entries[it->key()] =
- std::make_pair(csync::SyncChange::ACTION_ADD, it);
+ std::make_pair(syncer::SyncChange::ACTION_ADD, it);
}
sync_processor_ = sync_processor.Pass();
@@ -139,7 +139,7 @@ csync::SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
// Go through and check for all the entries that sync already knows about.
// CreateOrUpdateEntry() will remove entries that are same with the synced
// ones from |new_db_entries|.
- for (csync::SyncDataList::const_iterator sync_iter =
+ for (syncer::SyncDataList::const_iterator sync_iter =
initial_sync_data.begin();
sync_iter != initial_sync_data.end(); ++sync_iter) {
CreateOrUpdateEntry(*sync_iter, &new_db_entries, &new_synced_entries);
@@ -153,11 +153,11 @@ csync::SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
WebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
- csync::SyncChangeList new_changes;
+ syncer::SyncChangeList new_changes;
for (AutocompleteEntryMap::iterator i = new_db_entries.begin();
i != new_db_entries.end(); ++i) {
new_changes.push_back(
- csync::SyncChange(
+ syncer::SyncChange(
i->second.first, CreateSyncData(*(i->second.second))));
}
@@ -167,7 +167,7 @@ csync::SyncError AutocompleteSyncableService::MergeDataAndStartSyncing(
web_data_service_->RemoveExpiredFormElements();
}
- csync::SyncError error =
+ syncer::SyncError error =
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
return error;
@@ -181,13 +181,13 @@ void AutocompleteSyncableService::StopSyncing(syncable::ModelType type) {
error_handler_.reset();
}
-csync::SyncDataList AutocompleteSyncableService::GetAllSyncData(
+syncer::SyncDataList AutocompleteSyncableService::GetAllSyncData(
syncable::ModelType type) const {
DCHECK(CalledOnValidThread());
DCHECK(sync_processor_.get());
DCHECK_EQ(type, syncable::AUTOFILL);
- csync::SyncDataList current_data;
+ syncer::SyncDataList current_data;
std::vector<AutofillEntry> entries;
if (!LoadAutofillData(&entries))
@@ -201,14 +201,14 @@ csync::SyncDataList AutocompleteSyncableService::GetAllSyncData(
return current_data;
}
-csync::SyncError AutocompleteSyncableService::ProcessSyncChanges(
+syncer::SyncError AutocompleteSyncableService::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
DCHECK(CalledOnValidThread());
DCHECK(sync_processor_.get());
if (!sync_processor_.get()) {
- csync::SyncError error(FROM_HERE, "Models not yet associated.",
+ syncer::SyncError error(FROM_HERE, "Models not yet associated.",
syncable::AUTOFILL);
return error;
}
@@ -218,14 +218,14 @@ csync::SyncError AutocompleteSyncableService::ProcessSyncChanges(
scoped_ptr<AutocompleteEntryMap> db_entries;
std::vector<AutofillEntry> new_entries;
- csync::SyncError list_processing_error;
+ syncer::SyncError list_processing_error;
- for (csync::SyncChangeList::const_iterator i = change_list.begin();
+ for (syncer::SyncChangeList::const_iterator i = change_list.begin();
i != change_list.end() && !list_processing_error.IsSet(); ++i) {
DCHECK(i->IsValid());
switch (i->change_type()) {
- case csync::SyncChange::ACTION_ADD:
- case csync::SyncChange::ACTION_UPDATE:
+ case syncer::SyncChange::ACTION_ADD:
+ case syncer::SyncChange::ACTION_UPDATE:
if (!db_entries.get()) {
if (!LoadAutofillData(&entries)) {
return error_handler_->CreateAndUploadError(
@@ -236,12 +236,12 @@ csync::SyncError AutocompleteSyncableService::ProcessSyncChanges(
for (std::vector<AutofillEntry>::iterator it = entries.begin();
it != entries.end(); ++it) {
(*db_entries)[it->key()] =
- std::make_pair(csync::SyncChange::ACTION_ADD, it);
+ std::make_pair(syncer::SyncChange::ACTION_ADD, it);
}
}
CreateOrUpdateEntry(i->sync_data(), db_entries.get(), &new_entries);
break;
- case csync::SyncChange::ACTION_DELETE: {
+ case syncer::SyncChange::ACTION_DELETE: {
DCHECK(i->sync_data().GetSpecifics().has_autofill())
<< "Autofill specifics data not present on delete!";
const sync_pb::AutofillSpecifics& autofill =
@@ -258,7 +258,7 @@ csync::SyncError AutocompleteSyncableService::ProcessSyncChanges(
return error_handler_->CreateAndUploadError(
FROM_HERE,
"ProcessSyncChanges failed on ChangeType " +
- csync::SyncChange::ChangeTypeToString(i->change_type()));
+ syncer::SyncChange::ChangeTypeToString(i->change_type()));
}
}
@@ -319,7 +319,7 @@ bool AutocompleteSyncableService::SaveChangesToWebData(
// Creates or updates an autocomplete entry based on |data|.
void AutocompleteSyncableService::CreateOrUpdateEntry(
- const csync::SyncData& data,
+ const syncer::SyncData& data,
AutocompleteEntryMap* loaded_data,
std::vector<AutofillEntry>* new_entries) {
const sync_pb::EntitySpecifics& specifics = data.GetSpecifics();
@@ -360,7 +360,7 @@ void AutocompleteSyncableService::CreateOrUpdateEntry(
new_entries->push_back(new_entry);
// Update the sync db if the list of timestamps have changed.
*(it->second.second) = new_entry;
- it->second.first = csync::SyncChange::ACTION_UPDATE;
+ it->second.first = syncer::SyncChange::ACTION_UPDATE;
} else {
loaded_data->erase(it);
}
@@ -381,7 +381,7 @@ void AutocompleteSyncableService::WriteAutofillEntry(
}
}
-csync::SyncError AutocompleteSyncableService::AutofillEntryDelete(
+syncer::SyncError AutocompleteSyncableService::AutofillEntryDelete(
const sync_pb::AutofillSpecifics& autofill) {
if (!web_data_service_->GetDatabase()->GetAutofillTable()->RemoveFormElement(
UTF8ToUTF16(autofill.name()), UTF8ToUTF16(autofill.value()))) {
@@ -389,13 +389,13 @@ csync::SyncError AutocompleteSyncableService::AutofillEntryDelete(
FROM_HERE,
"Could not remove autocomplete entry from WebDatabase.");
}
- return csync::SyncError();
+ return syncer::SyncError();
}
void AutocompleteSyncableService::ActOnChanges(
const AutofillChangeList& changes) {
DCHECK(sync_processor_.get());
- csync::SyncChangeList new_changes;
+ syncer::SyncChangeList new_changes;
for (AutofillChangeList::const_iterator change = changes.begin();
change != changes.end(); ++change) {
switch (change->type()) {
@@ -411,10 +411,11 @@ void AutocompleteSyncableService::ActOnChanges(
return;
}
AutofillEntry entry(change->key(), timestamps);
- csync::SyncChange::SyncChangeType change_type =
+ syncer::SyncChange::SyncChangeType change_type =
(change->type() == AutofillChange::ADD) ?
- csync::SyncChange::ACTION_ADD : csync::SyncChange::ACTION_UPDATE;
- new_changes.push_back(csync::SyncChange(change_type,
+ syncer::SyncChange::ACTION_ADD :
+ syncer::SyncChange::ACTION_UPDATE;
+ new_changes.push_back(syncer::SyncChange(change_type,
CreateSyncData(entry)));
break;
}
@@ -422,7 +423,7 @@ void AutocompleteSyncableService::ActOnChanges(
std::vector<base::Time> timestamps;
AutofillEntry entry(change->key(), timestamps);
new_changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE,
CreateSyncData(entry)));
break;
}
@@ -431,7 +432,7 @@ void AutocompleteSyncableService::ActOnChanges(
break;
}
}
- csync::SyncError error =
+ syncer::SyncError error =
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
if (error.IsSet()) {
DLOG(WARNING) << "[AUTOCOMPLETE SYNC]"
@@ -440,13 +441,13 @@ void AutocompleteSyncableService::ActOnChanges(
}
}
-csync::SyncData AutocompleteSyncableService::CreateSyncData(
+syncer::SyncData AutocompleteSyncableService::CreateSyncData(
const AutofillEntry& entry) const {
sync_pb::EntitySpecifics autofill_specifics;
WriteAutofillEntry(entry, &autofill_specifics);
std::string tag(KeyToTag(UTF16ToUTF8(entry.key().name()),
UTF16ToUTF8(entry.key().value())));
- return csync::SyncData::CreateLocalData(tag, tag, autofill_specifics);
+ return syncer::SyncData::CreateLocalData(tag, tag, autofill_specifics);
}
// static
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.h b/chrome/browser/webdata/autocomplete_syncable_service.h
index 3421630..5ab0b64 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.h
+++ b/chrome/browser/webdata/autocomplete_syncable_service.h
@@ -26,7 +26,7 @@
class ProfileSyncServiceAutofillTest;
-namespace csync {
+namespace syncer {
class SyncErrorFactory;
}
@@ -41,7 +41,7 @@ class AutofillSpecifics;
// TODO(georgey) : remove reliance on the notifications and make it to be called
// from web_data_service directly.
class AutocompleteSyncableService
- : public csync::SyncableService,
+ : public syncer::SyncableService,
public content::NotificationObserver,
public base::NonThreadSafe {
public:
@@ -50,18 +50,18 @@ class AutocompleteSyncableService
static syncable::ModelType model_type() { return syncable::AUTOFILL; }
- // csync::SyncableService implementation.
- virtual csync::SyncError MergeDataAndStartSyncing(
+ // syncer::SyncableService implementation.
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> error_handler) OVERRIDE;
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
- virtual csync::SyncDataList GetAllSyncData(
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
// NotificationObserver implementation.
virtual void Observe(int type,
@@ -94,7 +94,7 @@ class AutocompleteSyncableService
// of the iterator is longer than the map object. The bool in the pair is used
// to indicate if the item needs to be added (true) or updated (false).
typedef std::map<AutofillKey,
- std::pair<csync::SyncChange::SyncChangeType,
+ std::pair<syncer::SyncChange::SyncChangeType,
std::vector<AutofillEntry>::iterator> >
AutocompleteEntryMap;
@@ -104,7 +104,7 @@ class AutocompleteSyncableService
// |new_entries| - entries that came from the sync.
// |ignored_entries| - entries that came from the sync, but too old to be
// stored and immediately discarded.
- void CreateOrUpdateEntry(const csync::SyncData& data,
+ void CreateOrUpdateEntry(const syncer::SyncData& data,
AutocompleteEntryMap* loaded_data,
std::vector<AutofillEntry>* new_entries);
@@ -113,10 +113,10 @@ class AutocompleteSyncableService
sync_pb::EntitySpecifics* autofill_specifics);
// Deletes the database entry corresponding to the |autofill| specifics.
- csync::SyncError AutofillEntryDelete(
+ syncer::SyncError AutofillEntryDelete(
const sync_pb::AutofillSpecifics& autofill);
- csync::SyncData CreateSyncData(const AutofillEntry& entry) const;
+ syncer::SyncData CreateSyncData(const AutofillEntry& entry) const;
// Syncs |changes| to the cloud.
void ActOnChanges(const AutofillChangeList& changes);
@@ -126,7 +126,7 @@ class AutocompleteSyncableService
// For unit-tests.
AutocompleteSyncableService();
- void set_sync_processor(csync::SyncChangeProcessor* sync_processor) {
+ void set_sync_processor(syncer::SyncChangeProcessor* sync_processor) {
sync_processor_.reset(sync_processor);
}
@@ -138,11 +138,11 @@ class AutocompleteSyncableService
// We receive ownership of |sync_processor_| in MergeDataAndStartSyncing() and
// destroy it in StopSyncing().
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
// We receive ownership of |error_handler_| in MergeDataAndStartSyncing() and
// destroy it in StopSyncing().
- scoped_ptr<csync::SyncErrorFactory> error_handler_;
+ scoped_ptr<syncer::SyncErrorFactory> error_handler_;
DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService);
};
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.cc b/chrome/browser/webdata/autofill_profile_syncable_service.cc
index 2b0ce40..16ee53d 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.cc
@@ -57,11 +57,11 @@ AutofillProfileSyncableService::AutofillProfileSyncableService()
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
}
-csync::SyncError AutofillProfileSyncableService::MergeDataAndStartSyncing(
+syncer::SyncError AutofillProfileSyncableService::MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) {
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
DCHECK(CalledOnValidThread());
DCHECK(!sync_processor_.get());
DCHECK(sync_processor.get());
@@ -95,7 +95,7 @@ csync::SyncError AutofillProfileSyncableService::MergeDataAndStartSyncing(
DataBundle bundle;
// Go through and check for all the profiles that sync already knows about.
- for (csync::SyncDataList::const_iterator sync_iter =
+ for (syncer::SyncDataList::const_iterator sync_iter =
initial_sync_data.begin();
sync_iter != initial_sync_data.end();
++sync_iter) {
@@ -136,22 +136,22 @@ csync::SyncError AutofillProfileSyncableService::MergeDataAndStartSyncing(
"Failed to update webdata.");
}
- csync::SyncChangeList new_changes;
+ syncer::SyncChangeList new_changes;
for (GUIDToProfileMap::iterator i = remaining_profiles.begin();
i != remaining_profiles.end(); ++i) {
new_changes.push_back(
- csync::SyncChange(
- csync::SyncChange::ACTION_ADD, CreateData(*(i->second))));
+ syncer::SyncChange(
+ syncer::SyncChange::ACTION_ADD, CreateData(*(i->second))));
profiles_map_[i->first] = i->second;
}
for (size_t i = 0; i < bundle.profiles_to_sync_back.size(); ++i) {
new_changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateData(*(bundle.profiles_to_sync_back[i]))));
}
- csync::SyncError error;
+ syncer::SyncError error;
if (!new_changes.empty())
error = sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
@@ -170,13 +170,13 @@ void AutofillProfileSyncableService::StopSyncing(syncable::ModelType type) {
profiles_map_.clear();
}
-csync::SyncDataList AutofillProfileSyncableService::GetAllSyncData(
+syncer::SyncDataList AutofillProfileSyncableService::GetAllSyncData(
syncable::ModelType type) const {
DCHECK(CalledOnValidThread());
DCHECK(sync_processor_.get());
DCHECK_EQ(type, syncable::AUTOFILL_PROFILE);
- csync::SyncDataList current_data;
+ syncer::SyncDataList current_data;
for (GUIDToProfileMap::const_iterator i = profiles_map_.begin();
i != profiles_map_.end(); ++i) {
@@ -185,27 +185,27 @@ csync::SyncDataList AutofillProfileSyncableService::GetAllSyncData(
return current_data;
}
-csync::SyncError AutofillProfileSyncableService::ProcessSyncChanges(
+syncer::SyncError AutofillProfileSyncableService::ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) {
+ const syncer::SyncChangeList& change_list) {
DCHECK(CalledOnValidThread());
if (!sync_processor_.get()) {
- csync::SyncError error(FROM_HERE, "Models not yet associated.",
+ syncer::SyncError error(FROM_HERE, "Models not yet associated.",
syncable::AUTOFILL_PROFILE);
return error;
}
DataBundle bundle;
- for (csync::SyncChangeList::const_iterator i = change_list.begin();
+ for (syncer::SyncChangeList::const_iterator i = change_list.begin();
i != change_list.end(); ++i) {
DCHECK(i->IsValid());
switch (i->change_type()) {
- case csync::SyncChange::ACTION_ADD:
- case csync::SyncChange::ACTION_UPDATE:
+ case syncer::SyncChange::ACTION_ADD:
+ case syncer::SyncChange::ACTION_UPDATE:
CreateOrUpdateProfile(i->sync_data(), &profiles_map_, &bundle);
break;
- case csync::SyncChange::ACTION_DELETE: {
+ case syncer::SyncChange::ACTION_DELETE: {
std::string guid = i->sync_data().GetSpecifics().
autofill_profile().guid();
bundle.profiles_to_delete.push_back(guid);
@@ -216,7 +216,7 @@ csync::SyncError AutofillProfileSyncableService::ProcessSyncChanges(
return sync_error_factory_->CreateAndUploadError(
FROM_HERE,
"ProcessSyncChanges failed on ChangeType " +
- csync::SyncChange::ChangeTypeToString(i->change_type()));
+ syncer::SyncChange::ChangeTypeToString(i->change_type()));
}
}
@@ -228,7 +228,7 @@ csync::SyncError AutofillProfileSyncableService::ProcessSyncChanges(
WebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
- return csync::SyncError();
+ return syncer::SyncError();
}
void AutofillProfileSyncableService::Observe(int type,
@@ -370,7 +370,7 @@ void AutofillProfileSyncableService::CreateGUIDToProfileMap(
AutofillProfileSyncableService::GUIDToProfileMap::iterator
AutofillProfileSyncableService::CreateOrUpdateProfile(
- const csync::SyncData& data,
+ const syncer::SyncData& data,
GUIDToProfileMap* profile_map,
DataBundle* bundle) {
DCHECK(profile_map);
@@ -429,13 +429,13 @@ void AutofillProfileSyncableService::ActOnChange(
!change.profile()) ||
(change.type() != AutofillProfileChange::REMOVE && change.profile()));
DCHECK(sync_processor_.get());
- csync::SyncChangeList new_changes;
+ syncer::SyncChangeList new_changes;
DataBundle bundle;
switch (change.type()) {
case AutofillProfileChange::ADD:
new_changes.push_back(
- csync::SyncChange(
- csync::SyncChange::ACTION_ADD, CreateData(*(change.profile()))));
+ syncer::SyncChange(
+ syncer::SyncChange::ACTION_ADD, CreateData(*(change.profile()))));
DCHECK(profiles_map_.find(change.profile()->guid()) ==
profiles_map_.end());
profiles_.push_back(new AutofillProfile(*(change.profile())));
@@ -447,21 +447,22 @@ void AutofillProfileSyncableService::ActOnChange(
DCHECK(it != profiles_map_.end());
*(it->second) = *(change.profile());
new_changes.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_UPDATE,
+ syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE,
CreateData(*(change.profile()))));
break;
}
case AutofillProfileChange::REMOVE: {
AutofillProfile empty_profile(change.key());
- new_changes.push_back(csync::SyncChange(csync::SyncChange::ACTION_DELETE,
- CreateData(empty_profile)));
+ new_changes.push_back(
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE,
+ CreateData(empty_profile)));
profiles_map_.erase(change.key());
break;
}
default:
NOTREACHED();
}
- csync::SyncError error =
+ syncer::SyncError error =
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
if (error.IsSet()) {
// TODO(isherman): Investigating http://crbug.com/121592
@@ -472,12 +473,12 @@ void AutofillProfileSyncableService::ActOnChange(
}
}
-csync::SyncData AutofillProfileSyncableService::CreateData(
+syncer::SyncData AutofillProfileSyncableService::CreateData(
const AutofillProfile& profile) {
sync_pb::EntitySpecifics specifics;
WriteAutofillProfile(profile, &specifics);
return
- csync::SyncData::CreateLocalData(
+ syncer::SyncData::CreateLocalData(
profile.guid(), profile.guid(), specifics);
}
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.h b/chrome/browser/webdata/autofill_profile_syncable_service.h
index 81f4f83..7f33189 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.h
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.h
@@ -38,7 +38,7 @@ extern const char kAutofillProfileTag[];
// local->cloud syncs. Then for each cloud change we receive
// ProcessSyncChanges() and for each local change Observe() is called.
class AutofillProfileSyncableService
- : public csync::SyncableService,
+ : public syncer::SyncableService,
public content::NotificationObserver,
public base::NonThreadSafe {
public:
@@ -47,18 +47,18 @@ class AutofillProfileSyncableService
static syncable::ModelType model_type() { return syncable::AUTOFILL_PROFILE; }
- // csync::SyncableService implementation.
- virtual csync::SyncError MergeDataAndStartSyncing(
+ // syncer::SyncableService implementation.
+ virtual syncer::SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
- const csync::SyncDataList& initial_sync_data,
- scoped_ptr<csync::SyncChangeProcessor> sync_processor,
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
+ const syncer::SyncDataList& initial_sync_data,
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
- virtual csync::SyncDataList GetAllSyncData(
+ virtual syncer::SyncDataList GetAllSyncData(
syncable::ModelType type) const OVERRIDE;
- virtual csync::SyncError ProcessSyncChanges(
+ virtual syncer::SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const csync::SyncChangeList& change_list) OVERRIDE;
+ const syncer::SyncChangeList& change_list) OVERRIDE;
// content::NotificationObserver implementation.
virtual void Observe(int type,
@@ -123,15 +123,15 @@ class AutofillProfileSyncableService
// found substitutes it for the new one, otherwise adds a new profile. Returns
// iterator pointing to added/updated profile.
GUIDToProfileMap::iterator CreateOrUpdateProfile(
- const csync::SyncData& data,
+ const syncer::SyncData& data,
GUIDToProfileMap* profile_map,
DataBundle* bundle);
// Syncs |change| to the cloud.
void ActOnChange(const AutofillProfileChange& change);
- // Creates csync::SyncData based on supplied |profile|.
- static csync::SyncData CreateData(const AutofillProfile& profile);
+ // Creates syncer::SyncData based on supplied |profile|.
+ static syncer::SyncData CreateData(const AutofillProfile& profile);
AutofillTable* GetAutofillTable() const;
@@ -154,7 +154,7 @@ class AutofillProfileSyncableService
// For unit-tests.
AutofillProfileSyncableService();
- void set_sync_processor(csync::SyncChangeProcessor* sync_processor) {
+ void set_sync_processor(syncer::SyncChangeProcessor* sync_processor) {
sync_processor_.reset(sync_processor);
}
@@ -166,9 +166,9 @@ class AutofillProfileSyncableService
ScopedVector<AutofillProfile> profiles_;
GUIDToProfileMap profiles_map_;
- scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
+ scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
- scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
+ scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncableService);
};
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
index d227683..e6652e8 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
@@ -49,7 +49,7 @@ ACTION_P(CopyData, data) {
MATCHER_P(CheckSyncChanges, n_sync_changes_list, "") {
if (arg.size() != n_sync_changes_list.size())
return false;
- csync::SyncChangeList::const_iterator passed, expected;
+ syncer::SyncChangeList::const_iterator passed, expected;
for (passed = arg.begin(), expected = n_sync_changes_list.begin();
passed != arg.end() && expected != n_sync_changes_list.end();
++passed, ++expected) {
@@ -87,14 +87,14 @@ MATCHER_P(DataBundleCheck, n_bundle, "") {
return true;
}
-class MockSyncChangeProcessor : public csync::SyncChangeProcessor {
+class MockSyncChangeProcessor : public syncer::SyncChangeProcessor {
public:
MockSyncChangeProcessor() {}
virtual ~MockSyncChangeProcessor() {}
MOCK_METHOD2(ProcessSyncChanges,
- csync::SyncError(const tracked_objects::Location&,
- const csync::SyncChangeList&));
+ syncer::SyncError(const tracked_objects::Location&,
+ const syncer::SyncChangeList&));
};
class AutofillProfileSyncableServiceTest : public testing::Test {
@@ -131,7 +131,7 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) {
profiles_from_web_db.back()->SetInfo(ADDRESS_HOME_LINE1,
UTF8ToUTF16("2 2nd st"));
- csync::SyncDataList data_list;
+ syncer::SyncDataList data_list;
AutofillProfile profile1(guid_synced1);
profile1.SetInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
data_list.push_back(autofill_syncable_service_.CreateData(profile1));
@@ -143,9 +143,9 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) {
profile3.SetInfo(NAME_FIRST, UTF8ToUTF16("Tom Doe"));
data_list.push_back(autofill_syncable_service_.CreateData(profile3));
- csync::SyncChangeList expected_change_list;
+ syncer::SyncChangeList expected_change_list;
expected_change_list.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange(syncer::SyncChange::ACTION_ADD,
AutofillProfileSyncableService::CreateData(
(*profiles_from_web_db.front()))));
@@ -162,17 +162,17 @@ TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) {
.Times(1)
.WillOnce(Return(true));
ON_CALL(*sync_processor_, ProcessSyncChanges(_, _))
- .WillByDefault(Return(csync::SyncError()));
+ .WillByDefault(Return(syncer::SyncError()));
EXPECT_CALL(*sync_processor_,
ProcessSyncChanges(_, CheckSyncChanges(expected_change_list)))
.Times(1)
- .WillOnce(Return(csync::SyncError()));
+ .WillOnce(Return(syncer::SyncError()));
// Takes ownership of sync_processor_.
autofill_syncable_service_.MergeDataAndStartSyncing(
syncable::AUTOFILL_PROFILE, data_list,
- sync_processor_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
autofill_syncable_service_.StopSyncing(syncable::AUTOFILL_PROFILE);
}
@@ -193,22 +193,22 @@ TEST_F(AutofillProfileSyncableServiceTest, GetAllSyncData) {
.Times(1)
.WillOnce(Return(true));
ON_CALL(*sync_processor_, ProcessSyncChanges(_, _))
- .WillByDefault(Return(csync::SyncError()));
+ .WillByDefault(Return(syncer::SyncError()));
EXPECT_CALL(*sync_processor_,
ProcessSyncChanges(
_,
- Property(&csync::SyncChangeList::size, Eq(2U))))
+ Property(&syncer::SyncChangeList::size, Eq(2U))))
.Times(1)
- .WillOnce(Return(csync::SyncError()));
+ .WillOnce(Return(syncer::SyncError()));
- csync::SyncDataList data_list;
+ syncer::SyncDataList data_list;
// Takes ownership of sync_processor_.
autofill_syncable_service_.MergeDataAndStartSyncing(
syncable::AUTOFILL_PROFILE, data_list,
- sync_processor_.PassAs<csync::SyncChangeProcessor>(),
- scoped_ptr<csync::SyncErrorFactory>(new csync::SyncErrorFactoryMock()));
+ sync_processor_.PassAs<syncer::SyncChangeProcessor>(),
+ scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
- csync::SyncDataList data =
+ syncer::SyncDataList data =
autofill_syncable_service_.GetAllSyncData(syncable::AUTOFILL_PROFILE);
EXPECT_EQ(2U, data.size());
@@ -223,15 +223,15 @@ TEST_F(AutofillProfileSyncableServiceTest, ProcessSyncChanges) {
std::string guid_present = kGuid1;
std::string guid_synced = kGuid2;
- csync::SyncChangeList change_list;
+ syncer::SyncChangeList change_list;
AutofillProfile profile(guid_synced);
profile.SetInfo(NAME_FIRST, UTF8ToUTF16("Jane"));
change_list.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_ADD,
+ syncer::SyncChange(syncer::SyncChange::ACTION_ADD,
AutofillProfileSyncableService::CreateData(profile)));
AutofillProfile empty_profile(guid_present);
change_list.push_back(
- csync::SyncChange(csync::SyncChange::ACTION_DELETE,
+ syncer::SyncChange(syncer::SyncChange::ACTION_DELETE,
AutofillProfileSyncableService::CreateData(empty_profile)));
AutofillProfileSyncableService::DataBundle expected_bundle;
@@ -244,7 +244,7 @@ TEST_F(AutofillProfileSyncableServiceTest, ProcessSyncChanges) {
.WillOnce(Return(true));
autofill_syncable_service_.set_sync_processor(sync_processor_.release());
- csync::SyncError error = autofill_syncable_service_.ProcessSyncChanges(
+ syncer::SyncError error = autofill_syncable_service_.ProcessSyncChanges(
FROM_HERE, change_list);
EXPECT_FALSE(error.IsSet());
@@ -256,8 +256,9 @@ TEST_F(AutofillProfileSyncableServiceTest, ActOnChange) {
AutofillProfileChange change1(AutofillProfileChange::ADD, kGuid1, &profile);
AutofillProfileChange change2(AutofillProfileChange::REMOVE, kGuid2, NULL);
ON_CALL(*sync_processor_, ProcessSyncChanges(_, _))
- .WillByDefault(Return(csync::SyncError(FROM_HERE, std::string("an error"),
- syncable::AUTOFILL_PROFILE)));
+ .WillByDefault(
+ Return(syncer::SyncError(FROM_HERE, std::string("an error"),
+ syncable::AUTOFILL_PROFILE)));
EXPECT_CALL(*sync_processor_, ProcessSyncChanges(_, _)).Times(2);
autofill_syncable_service_.set_sync_processor(sync_processor_.release());
diff --git a/sync/api/fake_syncable_service.cc b/sync/api/fake_syncable_service.cc
index 912a646..b0ec323 100644
--- a/sync/api/fake_syncable_service.cc
+++ b/sync/api/fake_syncable_service.cc
@@ -7,7 +7,7 @@
#include "base/location.h"
#include "sync/api/sync_error_factory.h"
-namespace csync {
+namespace syncer {
FakeSyncableService::FakeSyncableService()
: syncing_(false),
@@ -59,4 +59,4 @@ SyncError FakeSyncableService::ProcessSyncChanges(
return process_sync_changes_error_;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/fake_syncable_service.h b/sync/api/fake_syncable_service.h
index aa8c462..b89cf1f 100644
--- a/sync/api/fake_syncable_service.h
+++ b/sync/api/fake_syncable_service.h
@@ -8,7 +8,7 @@
#include "sync/api/syncable_service.h"
-namespace csync {
+namespace syncer {
class SyncErrorFactory;
@@ -47,6 +47,6 @@ class FakeSyncableService : public SyncableService {
syncable::ModelType type_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_FAKE_SYNCABLE_SERVICE_H_
diff --git a/sync/api/sync_change.cc b/sync/api/sync_change.cc
index ef9063b..49a387b 100644
--- a/sync/api/sync_change.cc
+++ b/sync/api/sync_change.cc
@@ -6,7 +6,7 @@
#include <ostream>
-namespace csync {
+namespace syncer {
SyncChange::SyncChange() : change_type_(ACTION_INVALID) {
}
@@ -74,4 +74,4 @@ void PrintTo(const SyncChange& sync_change, std::ostream* os) {
*os << sync_change.ToString();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/sync_change.h b/sync/api/sync_change.h
index 11dea71..63a03d9 100644
--- a/sync/api/sync_change.h
+++ b/sync/api/sync_change.h
@@ -12,7 +12,7 @@
#include "sync/api/sync_data.h"
-namespace csync {
+namespace syncer {
// 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
@@ -66,6 +66,6 @@ class SyncChange {
// gmock printer helper.
void PrintTo(const SyncChange& sync_change, std::ostream* os);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_SYNC_CHANGE_H_
diff --git a/sync/api/sync_change_processor.cc b/sync/api/sync_change_processor.cc
index 6a46be5..4a0607e 100644
--- a/sync/api/sync_change_processor.cc
+++ b/sync/api/sync_change_processor.cc
@@ -4,10 +4,10 @@
#include "sync/api/sync_change_processor.h"
-namespace csync {
+namespace syncer {
SyncChangeProcessor::SyncChangeProcessor() {}
SyncChangeProcessor::~SyncChangeProcessor() {}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/sync_change_processor.h b/sync/api/sync_change_processor.h
index 31788e2..85a5e0b 100644
--- a/sync/api/sync_change_processor.h
+++ b/sync/api/sync_change_processor.h
@@ -14,7 +14,7 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
class SyncChange;
@@ -38,6 +38,6 @@ class SyncChangeProcessor {
const SyncChangeList& change_list) = 0;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_SYNC_CHANGE_PROCESSOR_H_
diff --git a/sync/api/sync_change_unittest.cc b/sync/api/sync_change_unittest.cc
index a371e08..3faa587 100644
--- a/sync/api/sync_change_unittest.cc
+++ b/sync/api/sync_change_unittest.cc
@@ -13,7 +13,7 @@
#include "sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
// Ordered list of SyncChange's.
typedef std::vector<SyncChange> SyncChangeList;
@@ -129,4 +129,4 @@ TEST_F(SyncChangeTest, SyncerChanges) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc
index 43e44eb..078d6e6 100644
--- a/sync/api/sync_data.cc
+++ b/sync/api/sync_data.cc
@@ -15,7 +15,7 @@
#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
-namespace csync {
+namespace syncer {
void SyncData::ImmutableSyncEntityTraits::InitializeWrapper(
Wrapper* wrapper) {
@@ -44,7 +44,7 @@ void SyncData::ImmutableSyncEntityTraits::Swap(sync_pb::SyncEntity* t1,
SyncData::SyncData()
: is_valid_(false),
- id_(csync::kInvalidId) {}
+ id_(syncer::kInvalidId) {}
SyncData::SyncData(int64 id, sync_pb::SyncEntity* entity)
: is_valid_(true),
@@ -71,13 +71,13 @@ SyncData SyncData::CreateLocalData(
entity.set_client_defined_unique_tag(sync_tag);
entity.set_non_unique_name(non_unique_title);
entity.mutable_specifics()->CopyFrom(specifics);
- return SyncData(csync::kInvalidId, &entity);
+ return SyncData(syncer::kInvalidId, &entity);
}
// Static.
SyncData SyncData::CreateRemoteData(
int64 id, const sync_pb::EntitySpecifics& specifics) {
- DCHECK_NE(id, csync::kInvalidId);
+ DCHECK_NE(id, syncer::kInvalidId);
sync_pb::SyncEntity entity;
entity.mutable_specifics()->CopyFrom(specifics);
return SyncData(id, &entity);
@@ -112,7 +112,7 @@ int64 SyncData::GetRemoteId() const {
}
bool SyncData::IsLocal() const {
- return id_ == csync::kInvalidId;
+ return id_ == syncer::kInvalidId;
}
std::string SyncData::ToString() const {
@@ -122,7 +122,7 @@ std::string SyncData::ToString() const {
std::string type = syncable::ModelTypeToString(GetDataType());
std::string specifics;
scoped_ptr<DictionaryValue> value(
- csync::EntitySpecificsToValue(GetSpecifics()));
+ syncer::EntitySpecificsToValue(GetSpecifics()));
base::JSONWriter::WriteWithOptions(value.get(),
base::JSONWriter::OPTIONS_PRETTY_PRINT,
&specifics);
@@ -141,4 +141,4 @@ void PrintTo(const SyncData& sync_data, std::ostream* os) {
*os << sync_data.ToString();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h
index 59d4e4e..ffe5825 100644
--- a/sync/api/sync_data.h
+++ b/sync/api/sync_data.h
@@ -19,7 +19,7 @@ class EntitySpecifics;
class SyncEntity;
} // namespace sync_pb
-namespace csync {
+namespace syncer {
typedef syncable::ModelType SyncDataType;
@@ -100,7 +100,7 @@ class SyncData {
static void Swap(sync_pb::SyncEntity* t1, sync_pb::SyncEntity* t2);
};
- typedef csync::Immutable<
+ typedef syncer::Immutable<
sync_pb::SyncEntity, ImmutableSyncEntityTraits>
ImmutableSyncEntity;
@@ -110,7 +110,7 @@ class SyncData {
// Whether this SyncData holds valid data.
bool is_valid_;
- // Equal to csync::kInvalidId iff this is local.
+ // Equal to syncer::kInvalidId iff this is local.
int64 id_;
// The actual shared sync entity being held.
@@ -120,6 +120,6 @@ class SyncData {
// gmock printer helper.
void PrintTo(const SyncData& sync_data, std::ostream* os);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_SYNC_DATA_H_
diff --git a/sync/api/sync_error.cc b/sync/api/sync_error.cc
index 41d20e9..aef1ede 100644
--- a/sync/api/sync_error.cc
+++ b/sync/api/sync_error.cc
@@ -10,7 +10,7 @@
#include "base/logging.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
SyncError::SyncError() {
Clear();
@@ -109,4 +109,4 @@ void PrintTo(const SyncError& sync_error, std::ostream* os) {
*os << sync_error.ToString();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/sync_error.h b/sync/api/sync_error.h
index 6cd808a..7e24676 100644
--- a/sync/api/sync_error.h
+++ b/sync/api/sync_error.h
@@ -16,7 +16,7 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
// Sync errors are used for debug purposes and handled internally and/or
// exposed through Chrome's "about:sync" internal page. They are considered
@@ -84,6 +84,6 @@ class SyncError {
// gmock printer helper.
void PrintTo(const SyncError& sync_error, std::ostream* os);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_SYNC_ERROR_H_
diff --git a/sync/api/sync_error_factory.cc b/sync/api/sync_error_factory.cc
index 5f08b09..11888ff 100644
--- a/sync/api/sync_error_factory.cc
+++ b/sync/api/sync_error_factory.cc
@@ -4,7 +4,7 @@
#include "sync/api/sync_error_factory.h"
-namespace csync {
+namespace syncer {
SyncErrorFactory::SyncErrorFactory() {
}
@@ -12,4 +12,4 @@ SyncErrorFactory::SyncErrorFactory() {
SyncErrorFactory::~SyncErrorFactory() {
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/sync_error_factory.h b/sync/api/sync_error_factory.h
index ec9f2df..2634506 100644
--- a/sync/api/sync_error_factory.h
+++ b/sync/api/sync_error_factory.h
@@ -11,7 +11,7 @@
#include "base/location.h"
#include "sync/api/sync_error.h"
-namespace csync {
+namespace syncer {
class SyncErrorFactory {
public:
@@ -24,6 +24,6 @@ class SyncErrorFactory {
const std::string& message) = 0;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_SYNC_ERROR_FACTORY_H_
diff --git a/sync/api/sync_error_factory_mock.cc b/sync/api/sync_error_factory_mock.cc
index 9cbd882..5326bd9 100644
--- a/sync/api/sync_error_factory_mock.cc
+++ b/sync/api/sync_error_factory_mock.cc
@@ -4,7 +4,7 @@
#include "sync/api/sync_error_factory_mock.h"
-namespace csync {
+namespace syncer {
SyncErrorFactoryMock::SyncErrorFactoryMock() {
}
@@ -12,4 +12,4 @@ SyncErrorFactoryMock::SyncErrorFactoryMock() {
SyncErrorFactoryMock::~SyncErrorFactoryMock() {
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/sync_error_factory_mock.h b/sync/api/sync_error_factory_mock.h
index 3808b88..ea96806 100644
--- a/sync/api/sync_error_factory_mock.h
+++ b/sync/api/sync_error_factory_mock.h
@@ -10,7 +10,7 @@
#include "testing/gmock/include/gmock/gmock.h"
-namespace csync {
+namespace syncer {
class SyncErrorFactoryMock : public SyncErrorFactory {
public:
@@ -22,6 +22,6 @@ class SyncErrorFactoryMock : public SyncErrorFactory {
const std::string& message));
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_SYNC_ERROR_FACTORY_MOCK_H_
diff --git a/sync/api/sync_error_unittest.cc b/sync/api/sync_error_unittest.cc
index 28fe2b6..593eb0f 100644
--- a/sync/api/sync_error_unittest.cc
+++ b/sync/api/sync_error_unittest.cc
@@ -9,7 +9,7 @@
#include "base/location.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
using std::string;
using syncable::ModelType;
@@ -133,4 +133,4 @@ TEST_F(SyncErrorTest, ToString) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/syncable_service.cc b/sync/api/syncable_service.cc
index 93af355..66b1e27 100644
--- a/sync/api/syncable_service.cc
+++ b/sync/api/syncable_service.cc
@@ -4,8 +4,8 @@
#include "sync/api/syncable_service.h"
-namespace csync {
+namespace syncer {
SyncableService::~SyncableService() {}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h
index 5c828de..53e2cd5 100644
--- a/sync/api/syncable_service.h
+++ b/sync/api/syncable_service.h
@@ -16,7 +16,7 @@
#include "sync/api/sync_error.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
class SyncErrorFactory;
@@ -64,6 +64,6 @@ class SyncableService : public SyncChangeProcessor,
virtual ~SyncableService();
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_API_SYNCABLE_SERVICE_H_
diff --git a/sync/engine/all_status.cc b/sync/engine/all_status.cc
index e9e1a20..b5a0025 100644
--- a/sync/engine/all_status.cc
+++ b/sync/engine/all_status.cc
@@ -12,7 +12,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/sessions/session_state.h"
-namespace csync {
+namespace syncer {
AllStatus::AllStatus() {
status_.initial_sync_ended = true;
@@ -24,11 +24,11 @@ AllStatus::AllStatus() {
AllStatus::~AllStatus() {
}
-csync::SyncStatus AllStatus::CreateBlankStatus() const {
+syncer::SyncStatus AllStatus::CreateBlankStatus() const {
// Status is initialized with the previous status value. Variables
// whose values accumulate (e.g. lifetime counters like updates_received)
// are not to be cleared here.
- csync::SyncStatus status = status_;
+ syncer::SyncStatus status = status_;
status.encryption_conflicts = 0;
status.hierarchy_conflicts = 0;
status.simple_conflicts = 0;
@@ -39,9 +39,9 @@ csync::SyncStatus AllStatus::CreateBlankStatus() const {
return status;
}
-csync::SyncStatus AllStatus::CalcSyncing(
+syncer::SyncStatus AllStatus::CalcSyncing(
const SyncEngineEvent &event) const {
- csync::SyncStatus status = CreateBlankStatus();
+ syncer::SyncStatus status = CreateBlankStatus();
const sessions::SyncSessionSnapshot& snapshot = event.snapshot;
status.encryption_conflicts = snapshot.num_encryption_conflicts();
status.hierarchy_conflicts = snapshot.num_hierarchy_conflicts();
@@ -120,7 +120,7 @@ void AllStatus::OnSyncEngineEvent(const SyncEngineEvent& event) {
}
}
-csync::SyncStatus AllStatus::status() const {
+syncer::SyncStatus AllStatus::status() const {
base::AutoLock lock(mutex_);
return status_;
}
@@ -169,4 +169,4 @@ ScopedStatusLock::~ScopedStatusLock() {
allstatus_->mutex_.Release();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/all_status.h b/sync/engine/all_status.h
index 4e19ef6..bb4a943 100644
--- a/sync/engine/all_status.h
+++ b/sync/engine/all_status.h
@@ -19,7 +19,7 @@
#include "sync/internal_api/public/engine/sync_status.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
class ScopedStatusLock;
struct ServerConnectionEvent;
@@ -41,7 +41,7 @@ class AllStatus : public SyncEngineEventListener {
virtual void OnSyncEngineEvent(const SyncEngineEvent& event) OVERRIDE;
- csync::SyncStatus status() const;
+ syncer::SyncStatus status() const;
void SetNotificationsEnabled(bool notifications_enabled);
@@ -60,10 +60,10 @@ class AllStatus : public SyncEngineEventListener {
protected:
// Examines syncer to calculate syncing and the unsynced count,
// and returns a Status with new values.
- csync::SyncStatus CalcSyncing(const SyncEngineEvent& event) const;
- csync::SyncStatus CreateBlankStatus() const;
+ syncer::SyncStatus CalcSyncing(const SyncEngineEvent& event) const;
+ syncer::SyncStatus CreateBlankStatus() const;
- csync::SyncStatus status_;
+ syncer::SyncStatus status_;
mutable base::Lock mutex_; // Protects all data members.
DISALLOW_COPY_AND_ASSIGN(AllStatus);
@@ -77,6 +77,6 @@ class ScopedStatusLock {
AllStatus* allstatus_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_ALL_STATUS_H_
diff --git a/sync/engine/apply_updates_command.cc b/sync/engine/apply_updates_command.cc
index fd18ff2..c23241c 100644
--- a/sync/engine/apply_updates_command.cc
+++ b/sync/engine/apply_updates_command.cc
@@ -11,7 +11,7 @@
#include "sync/syncable/read_transaction.h"
#include "sync/syncable/write_transaction.h"
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
@@ -85,4 +85,4 @@ SyncerError ApplyUpdatesCommand::ModelChangingExecuteImpl(
return SYNCER_OK;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/apply_updates_command.h b/sync/engine/apply_updates_command.h
index b6885c3..bea1a7f 100644
--- a/sync/engine/apply_updates_command.h
+++ b/sync/engine/apply_updates_command.h
@@ -9,7 +9,7 @@
#include "base/compiler_specific.h"
#include "sync/engine/model_changing_syncer_command.h"
-namespace csync {
+namespace syncer {
class ApplyUpdatesCommand : public ModelChangingSyncerCommand {
public:
@@ -27,6 +27,6 @@ class ApplyUpdatesCommand : public ModelChangingSyncerCommand {
DISALLOW_COPY_AND_ASSIGN(ApplyUpdatesCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_
diff --git a/sync/engine/apply_updates_command_unittest.cc b/sync/engine/apply_updates_command_unittest.cc
index 5e43d0a..7f9e475 100644
--- a/sync/engine/apply_updates_command_unittest.cc
+++ b/sync/engine/apply_updates_command_unittest.cc
@@ -27,7 +27,7 @@
#include "sync/util/cryptographer.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
using std::string;
@@ -380,7 +380,7 @@ TEST_F(ApplyUpdatesCommandTest, DecryptablePassword) {
cryptographer = directory()->GetCryptographer(&trans);
}
- csync::KeyParams params = {"localhost", "dummy", "foobar"};
+ syncer::KeyParams params = {"localhost", "dummy", "foobar"};
cryptographer->AddKey(params);
sync_pb::EntitySpecifics specifics;
@@ -856,4 +856,4 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) {
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/build_commit_command.cc b/sync/engine/build_commit_command.cc
index c83bd69..f3c0a9f 100644
--- a/sync/engine/build_commit_command.cc
+++ b/sync/engine/build_commit_command.cc
@@ -33,7 +33,7 @@ using syncable::MutableEntry;
using syncable::SPECIFICS;
using syncable::UNSPECIFIED;
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
@@ -261,4 +261,4 @@ int64 BuildCommitCommand::InterpolatePosition(const int64 lo,
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/build_commit_command.h b/sync/engine/build_commit_command.h
index 53bafd7..d72765b 100644
--- a/sync/engine/build_commit_command.h
+++ b/sync/engine/build_commit_command.h
@@ -17,7 +17,7 @@ namespace syncable {
class Entry;
}
-namespace csync {
+namespace syncer {
namespace sessions {
class OrderedCommitSet;
@@ -74,6 +74,6 @@ class BuildCommitCommand : public SyncerCommand {
ClientToServerMessage* commit_message_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
diff --git a/sync/engine/build_commit_command_unittest.cc b/sync/engine/build_commit_command_unittest.cc
index f92bcd0..59e98ea 100644
--- a/sync/engine/build_commit_command_unittest.cc
+++ b/sync/engine/build_commit_command_unittest.cc
@@ -5,7 +5,7 @@
#include "sync/engine/build_commit_command.h"
#include "sync/test/engine/syncer_command_test.h"
-namespace csync {
+namespace syncer {
// A test fixture for tests exercising ClearDataCommandTest.
class BuildCommitCommandTest : public SyncerCommandTest {
@@ -102,6 +102,6 @@ TEST_F(BuildCommitCommandTest, InterpolatePosition) {
command_.InterpolatePosition(0, BuildCommitCommand::GetGap()*2 + 1));
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/cleanup_disabled_types_command.cc b/sync/engine/cleanup_disabled_types_command.cc
index 953dc6c..233f11c 100644
--- a/sync/engine/cleanup_disabled_types_command.cc
+++ b/sync/engine/cleanup_disabled_types_command.cc
@@ -11,7 +11,7 @@
#include "sync/sessions/sync_session_context.h"
#include "sync/syncable/directory.h"
-namespace csync {
+namespace syncer {
CleanupDisabledTypesCommand::CleanupDisabledTypesCommand() {}
CleanupDisabledTypesCommand::~CleanupDisabledTypesCommand() {}
@@ -66,5 +66,5 @@ SyncerError CleanupDisabledTypesCommand::ExecuteImpl(
return SYNCER_OK;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/cleanup_disabled_types_command.h b/sync/engine/cleanup_disabled_types_command.h
index 45ec01d..5d2ec38 100644
--- a/sync/engine/cleanup_disabled_types_command.h
+++ b/sync/engine/cleanup_disabled_types_command.h
@@ -9,7 +9,7 @@
#include "base/compiler_specific.h"
#include "sync/engine/syncer_command.h"
-namespace csync {
+namespace syncer {
// A syncer command that purges (from memory and disk) entries belonging to
// a ModelType or ServerModelType that the user has not elected to sync.
@@ -40,7 +40,7 @@ class CleanupDisabledTypesCommand : public SyncerCommand {
DISALLOW_COPY_AND_ASSIGN(CleanupDisabledTypesCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
diff --git a/sync/engine/cleanup_disabled_types_command_unittest.cc b/sync/engine/cleanup_disabled_types_command_unittest.cc
index d386136..d16d0b9 100644
--- a/sync/engine/cleanup_disabled_types_command_unittest.cc
+++ b/sync/engine/cleanup_disabled_types_command_unittest.cc
@@ -12,7 +12,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -74,4 +74,4 @@ TEST_F(CleanupDisabledTypesCommandTest, TypeDisabled) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/commit.cc b/sync/engine/commit.cc
index 4da658d..734cd6c 100644
--- a/sync/engine/commit.cc
+++ b/sync/engine/commit.cc
@@ -16,7 +16,7 @@
using syncable::SYNCER;
using syncable::WriteTransaction;
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
using sessions::StatusController;
@@ -156,4 +156,4 @@ SyncerError BuildAndPostCommits(Syncer* syncer,
return result;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/commit.h b/sync/engine/commit.h
index 5e8e0fa..2169adf 100644
--- a/sync/engine/commit.h
+++ b/sync/engine/commit.h
@@ -8,7 +8,7 @@
#include "sync/internal_api/public/util/syncer_error.h"
-namespace csync {
+namespace syncer {
namespace sessions {
class SyncSession;
@@ -32,6 +32,6 @@ SyncerError BuildAndPostCommits(
Syncer* syncer,
sessions::SyncSession* session);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_COMMIT_H_
diff --git a/sync/engine/conflict_resolver.cc b/sync/engine/conflict_resolver.cc
index 156bc90..e708f45 100644
--- a/sync/engine/conflict_resolver.cc
+++ b/sync/engine/conflict_resolver.cc
@@ -32,7 +32,7 @@ using syncable::IsRealDataType;
using syncable::MutableEntry;
using syncable::WriteTransaction;
-namespace csync {
+namespace syncer {
using sessions::ConflictProgress;
using sessions::StatusController;
@@ -417,4 +417,4 @@ bool ConflictResolver::ResolveConflicts(syncable::WriteTransaction* trans,
return forward_progress;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/conflict_resolver.h b/sync/engine/conflict_resolver.h
index fedaa45..733348c 100644
--- a/sync/engine/conflict_resolver.h
+++ b/sync/engine/conflict_resolver.h
@@ -24,7 +24,7 @@ class MutableEntry;
class WriteTransaction;
} // namespace syncable
-namespace csync {
+namespace syncer {
class Cryptographer;
@@ -84,6 +84,6 @@ class ConflictResolver {
DISALLOW_COPY_AND_ASSIGN(ConflictResolver);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_
diff --git a/sync/engine/download_updates_command.cc b/sync/engine/download_updates_command.cc
index fb74f3d..f73c350 100644
--- a/sync/engine/download_updates_command.cc
+++ b/sync/engine/download_updates_command.cc
@@ -15,7 +15,7 @@
using sync_pb::DebugInfo;
-namespace csync {
+namespace syncer {
using sessions::StatusController;
using sessions::SyncSession;
using std::string;
@@ -127,4 +127,4 @@ void DownloadUpdatesCommand::AppendClientDebugInfoIfNeeded(
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/download_updates_command.h b/sync/engine/download_updates_command.h
index 527844e..56b73c8 100644
--- a/sync/engine/download_updates_command.h
+++ b/sync/engine/download_updates_command.h
@@ -18,7 +18,7 @@ namespace sync_pb {
class EntitySpecifics;
}
-namespace csync {
+namespace syncer {
// Determine the enabled datatypes, download a batch of updates for them
// from the server, place the result in the SyncSession for further processing.
@@ -59,7 +59,7 @@ class DownloadUpdatesCommand : public SyncerCommand {
DISALLOW_COPY_AND_ASSIGN(DownloadUpdatesCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_
diff --git a/sync/engine/download_updates_command_unittest.cc b/sync/engine/download_updates_command_unittest.cc
index 9a9739f..ed0d6bb 100644
--- a/sync/engine/download_updates_command_unittest.cc
+++ b/sync/engine/download_updates_command_unittest.cc
@@ -11,7 +11,7 @@
#include "sync/test/engine/syncer_command_test.h"
using ::testing::_;
-namespace csync {
+namespace syncer {
using syncable::FIRST_REAL_MODEL_TYPE;
using syncable::MODEL_TYPE_COUNT;
@@ -71,4 +71,4 @@ TEST_F(DownloadUpdatesCommandTest, VerifyAppendDebugInfo) {
command_.AppendClientDebugInfoIfNeeded(session(), &debug_info);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/get_commit_ids_command.cc b/sync/engine/get_commit_ids_command.cc
index d3264f2..4b70d88 100644
--- a/sync/engine/get_commit_ids_command.cc
+++ b/sync/engine/get_commit_ids_command.cc
@@ -19,7 +19,7 @@
using std::set;
using std::vector;
-namespace csync {
+namespace syncer {
using sessions::OrderedCommitSet;
using sessions::SyncSession;
@@ -432,4 +432,4 @@ void GetCommitIdsCommand::BuildCommitIds(
AddDeletes(write_transaction, ready_unsynced_set);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/get_commit_ids_command.h b/sync/engine/get_commit_ids_command.h
index 5d9117f..f6b8a66 100644
--- a/sync/engine/get_commit_ids_command.h
+++ b/sync/engine/get_commit_ids_command.h
@@ -19,7 +19,7 @@
using std::pair;
using std::vector;
-namespace csync {
+namespace syncer {
// A class that contains the code used to search the syncable::Directory for
// locally modified items that are ready to be committed to the server.
@@ -135,6 +135,6 @@ class GetCommitIdsCommand : public SyncerCommand {
DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
diff --git a/sync/engine/model_changing_syncer_command.cc b/sync/engine/model_changing_syncer_command.cc
index 08340a4..3fe6b2d 100644
--- a/sync/engine/model_changing_syncer_command.cc
+++ b/sync/engine/model_changing_syncer_command.cc
@@ -10,7 +10,7 @@
#include "sync/sessions/status_controller.h"
#include "sync/sessions/sync_session.h"
-namespace csync {
+namespace syncer {
SyncerError ModelChangingSyncerCommand::ExecuteImpl(
sessions::SyncSession* session) {
@@ -48,4 +48,4 @@ SyncerError ModelChangingSyncerCommand::ExecuteImpl(
return result;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/model_changing_syncer_command.h b/sync/engine/model_changing_syncer_command.h
index 44f045a..ad6dc63 100644
--- a/sync/engine/model_changing_syncer_command.h
+++ b/sync/engine/model_changing_syncer_command.h
@@ -10,7 +10,7 @@
#include "sync/engine/syncer_command.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
-namespace csync {
+namespace syncer {
namespace sessions {
class SyncSession;
}
@@ -31,7 +31,7 @@ class ModelChangingSyncerCommand : public SyncerCommand {
virtual ~ModelChangingSyncerCommand() { }
// SyncerCommand implementation. Sets work_session to session.
- virtual csync::SyncerError ExecuteImpl(
+ virtual syncer::SyncerError ExecuteImpl(
sessions::SyncSession* session) OVERRIDE;
// Wrapper so implementations don't worry about storing work_session.
@@ -72,6 +72,6 @@ class ModelChangingSyncerCommand : public SyncerCommand {
DISALLOW_COPY_AND_ASSIGN(ModelChangingSyncerCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_
diff --git a/sync/engine/model_changing_syncer_command_unittest.cc b/sync/engine/model_changing_syncer_command_unittest.cc
index 16e8dab..ac898c5 100644
--- a/sync/engine/model_changing_syncer_command_unittest.cc
+++ b/sync/engine/model_changing_syncer_command_unittest.cc
@@ -12,7 +12,7 @@
#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -74,4 +74,4 @@ TEST_F(ModelChangingSyncerCommandTest, Basic) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/net/server_connection_manager.cc b/sync/engine/net/server_connection_manager.cc
index 152223a..ff85d10 100644
--- a/sync/engine/net/server_connection_manager.cc
+++ b/sync/engine/net/server_connection_manager.cc
@@ -20,7 +20,7 @@
#include "sync/protocol/sync.pb.h"
#include "sync/syncable/directory.h"
-namespace csync {
+namespace syncer {
using std::ostream;
using std::string;
@@ -330,4 +330,4 @@ std::ostream& operator << (std::ostream& s, const struct HttpResponse& hr) {
return s;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/net/server_connection_manager.h b/sync/engine/net/server_connection_manager.h
index c61352e..a94582b 100644
--- a/sync/engine/net/server_connection_manager.h
+++ b/sync/engine/net/server_connection_manager.h
@@ -26,7 +26,7 @@ namespace sync_pb {
class ClientToServerMessage;
}
-namespace csync {
+namespace syncer {
static const int32 kUnsetResponseCode = -1;
static const int32 kUnsetContentLength = -1;
@@ -348,6 +348,6 @@ bool FillMessageWithShareDetails(sync_pb::ClientToServerMessage* csm,
std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
diff --git a/sync/engine/net/url_translator.cc b/sync/engine/net/url_translator.cc
index 3c18794..e9cae5a 100644
--- a/sync/engine/net/url_translator.cc
+++ b/sync/engine/net/url_translator.cc
@@ -13,7 +13,7 @@
using std::string;
-namespace csync {
+namespace syncer {
namespace {
// Parameters that the server understands. (here, a-Z)
@@ -54,4 +54,4 @@ string MakeSyncQueryString(const string& client_id) {
return query;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/net/url_translator.h b/sync/engine/net/url_translator.h
index 1842380..043a2fe 100644
--- a/sync/engine/net/url_translator.h
+++ b/sync/engine/net/url_translator.h
@@ -11,7 +11,7 @@
#include <string>
-namespace csync {
+namespace syncer {
// Convenience wrappers around CgiEscapePath(), used by gaia_auth.
std::string CgiEscapeString(const char* src);
@@ -23,6 +23,6 @@ std::string MakeSyncServerPath(const std::string& path,
std::string MakeSyncQueryString(const std::string& client_id);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_NET_URL_TRANSLATOR_H_
diff --git a/sync/engine/nigori_util.cc b/sync/engine/nigori_util.cc
index 765cf0a..e7d4e5c 100644
--- a/sync/engine/nigori_util.cc
+++ b/sync/engine/nigori_util.cc
@@ -20,7 +20,7 @@ namespace syncable {
bool ProcessUnsyncedChangesForEncryption(
WriteTransaction* const trans,
- csync::Cryptographer* cryptographer) {
+ syncer::Cryptographer* cryptographer) {
DCHECK(cryptographer->is_ready());
// Get list of all datatypes with unsynced changes. It's possible that our
// local changes need to be encrypted if encryption for that datatype was
@@ -29,7 +29,7 @@ bool ProcessUnsyncedChangesForEncryption(
// changes in this code path are likely due to consistency issues (we have
// to be updated to a key we already have, e.g. an old key).
std::vector<int64> handles;
- csync::SyncerUtil::GetUnsyncedEntries(trans, &handles);
+ syncer::SyncerUtil::GetUnsyncedEntries(trans, &handles);
for (size_t i = 0; i < handles.size(); ++i) {
MutableEntry entry(trans, GET_BY_HANDLE, handles[i]);
const sync_pb::EntitySpecifics& specifics = entry.Get(SPECIFICS);
@@ -51,7 +51,7 @@ bool VerifyUnsyncedChangesAreEncrypted(
BaseTransaction* const trans,
ModelTypeSet encrypted_types) {
std::vector<int64> handles;
- csync::SyncerUtil::GetUnsyncedEntries(trans, &handles);
+ syncer::SyncerUtil::GetUnsyncedEntries(trans, &handles);
for (size_t i = 0; i < handles.size(); ++i) {
Entry entry(trans, GET_BY_HANDLE, handles[i]);
if (!entry.good()) {
@@ -92,7 +92,7 @@ bool SpecificsNeedsEncryption(ModelTypeSet encrypted_types,
// Mainly for testing.
bool VerifyDataTypeEncryptionForTest(
BaseTransaction* const trans,
- csync::Cryptographer* cryptographer,
+ syncer::Cryptographer* cryptographer,
ModelType type,
bool is_encrypted) {
if (type == PASSWORDS || type == NIGORI) {
@@ -156,7 +156,7 @@ bool VerifyDataTypeEncryptionForTest(
}
bool UpdateEntryWithEncryption(
- csync::Cryptographer* cryptographer,
+ syncer::Cryptographer* cryptographer,
const sync_pb::EntitySpecifics& new_specifics,
syncable::MutableEntry* entry) {
syncable::ModelType type = syncable::GetModelTypeFromSpecifics(new_specifics);
diff --git a/sync/engine/nigori_util.h b/sync/engine/nigori_util.h
index 5e5c20a..9d3e2de 100644
--- a/sync/engine/nigori_util.h
+++ b/sync/engine/nigori_util.h
@@ -12,7 +12,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/nigori_specifics.pb.h"
-namespace csync {
+namespace syncer {
class Cryptographer;
}
@@ -43,7 +43,7 @@ bool VerifyUnsyncedChangesAreEncrypted(
// or unencrypted, based on |encrypted_types|.
bool ProcessUnsyncedChangesForEncryption(
WriteTransaction* const trans,
- csync::Cryptographer* cryptographer);
+ syncer::Cryptographer* cryptographer);
// Returns true if the entry requires encryption but is not encrypted, false
// otherwise. Note: this does not check that already encrypted entries are
@@ -58,7 +58,7 @@ bool SpecificsNeedsEncryption(ModelTypeSet encrypted_types,
// Verifies all data of type |type| is encrypted appropriately.
bool VerifyDataTypeEncryptionForTest(
BaseTransaction* const trans,
- csync::Cryptographer* cryptographer,
+ syncer::Cryptographer* cryptographer,
ModelType type,
bool is_encrypted) WARN_UNUSED_RESULT;
@@ -66,7 +66,7 @@ bool VerifyDataTypeEncryptionForTest(
// Returns false if an error encrypting occurred (does not modify |entry|).
// Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS).
bool UpdateEntryWithEncryption(
- csync::Cryptographer* cryptographer,
+ syncer::Cryptographer* cryptographer,
const sync_pb::EntitySpecifics& new_specifics,
MutableEntry* entry);
diff --git a/sync/engine/nudge_source.cc b/sync/engine/nudge_source.cc
index 1020fbf..cd01dda 100644
--- a/sync/engine/nudge_source.cc
+++ b/sync/engine/nudge_source.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
-namespace csync {
+namespace syncer {
#define ENUM_CASE(x) case x: return #x; break
@@ -24,4 +24,4 @@ const char* GetNudgeSourceString(NudgeSource nudge_source) {
#undef ENUM_CASE
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/nudge_source.h b/sync/engine/nudge_source.h
index a842915..b665203 100644
--- a/sync/engine/nudge_source.h
+++ b/sync/engine/nudge_source.h
@@ -6,7 +6,7 @@
#define SYNC_ENGINE_NUDGE_SOURCE_H_
#pragma once
-namespace csync {
+namespace syncer {
enum NudgeSource {
NUDGE_SOURCE_UNKNOWN = 0,
@@ -22,6 +22,6 @@ enum NudgeSource {
const char* GetNudgeSourceString(NudgeSource nudge_source);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_NUDGE_SOURCE_H_
diff --git a/sync/engine/process_commit_response_command.cc b/sync/engine/process_commit_response_command.cc
index b315062..51e1697 100644
--- a/sync/engine/process_commit_response_command.cc
+++ b/sync/engine/process_commit_response_command.cc
@@ -45,7 +45,7 @@ using syncable::SERVER_VERSION;
using syncable::SYNCER;
using syncable::SYNCING;
-namespace csync {
+namespace syncer {
using sessions::OrderedCommitSet;
using sessions::StatusController;
@@ -477,4 +477,4 @@ void ProcessCommitResponseCommand::ProcessSuccessfulCommitResponse(
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/process_commit_response_command.h b/sync/engine/process_commit_response_command.h
index 98de2f2..80c5753 100644
--- a/sync/engine/process_commit_response_command.h
+++ b/sync/engine/process_commit_response_command.h
@@ -21,7 +21,7 @@ class MutableEntry;
class Directory;
}
-namespace csync {
+namespace syncer {
namespace sessions {
class OrderedCommitSet;
@@ -131,6 +131,6 @@ class ProcessCommitResponseCommand : public ModelChangingSyncerCommand {
DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
diff --git a/sync/engine/process_commit_response_command_unittest.cc b/sync/engine/process_commit_response_command_unittest.cc
index c18d571..a387bd2 100644
--- a/sync/engine/process_commit_response_command_unittest.cc
+++ b/sync/engine/process_commit_response_command_unittest.cc
@@ -21,7 +21,7 @@
#include "sync/test/engine/test_id_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
using std::string;
@@ -118,8 +118,8 @@ class ProcessCommitResponseCommandTest : public SyncerCommandTest {
const string& name,
syncable::ModelType model_type,
sessions::OrderedCommitSet *commit_set,
- csync::ClientToServerMessage *commit,
- csync::ClientToServerResponse *response) {
+ syncer::ClientToServerMessage *commit,
+ syncer::ClientToServerResponse *response) {
bool is_folder = true;
int64 metahandle = 0;
CreateUnsyncedItem(item_id, parent_id, name, is_folder, model_type,
@@ -190,8 +190,8 @@ class ProcessCommitResponseCommandTest : public SyncerCommandTest {
TEST_F(ProcessCommitResponseCommandTest, MultipleCommitIdProjections) {
sessions::OrderedCommitSet commit_set(session()->routing_info());
- csync::ClientToServerMessage request;
- csync::ClientToServerResponse response;
+ syncer::ClientToServerMessage request;
+ syncer::ClientToServerResponse response;
Id bookmark_folder_id = id_factory_.NewLocalId();
Id bookmark_id1 = id_factory_.NewLocalId();
@@ -274,8 +274,8 @@ TEST_F(ProcessCommitResponseCommandTest, MultipleCommitIdProjections) {
// of the children.
TEST_F(ProcessCommitResponseCommandTest, NewFolderCommitKeepsChildOrder) {
sessions::OrderedCommitSet commit_set(session()->routing_info());
- csync::ClientToServerMessage request;
- csync::ClientToServerResponse response;
+ syncer::ClientToServerMessage request;
+ syncer::ClientToServerResponse response;
// Create the parent folder, a new item whose ID will change on commit.
Id folder_id = id_factory_.NewLocalId();
@@ -402,8 +402,8 @@ INSTANTIATE_TEST_CASE_P(ProcessCommitResponse,
// depending on the test parameter.
TEST_P(MixedResult, ExtensionActivity) {
sessions::OrderedCommitSet commit_set(session()->routing_info());
- csync::ClientToServerMessage request;
- csync::ClientToServerResponse response;
+ syncer::ClientToServerMessage request;
+ syncer::ClientToServerResponse response;
EXPECT_NE(routing_info().find(syncable::BOOKMARKS)->second,
routing_info().find(syncable::AUTOFILL)->second)
@@ -451,4 +451,4 @@ TEST_P(MixedResult, ExtensionActivity) {
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/process_updates_command.cc b/sync/engine/process_updates_command.cc
index 003c59f..8c2ec75 100644
--- a/sync/engine/process_updates_command.cc
+++ b/sync/engine/process_updates_command.cc
@@ -21,7 +21,7 @@
using std::vector;
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
using sessions::StatusController;
@@ -182,4 +182,4 @@ ServerUpdateProcessingResult ProcessUpdatesCommand::ProcessUpdate(
return SUCCESS_PROCESSED;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/process_updates_command.h b/sync/engine/process_updates_command.h
index 262d5b7..6aeb181 100644
--- a/sync/engine/process_updates_command.h
+++ b/sync/engine/process_updates_command.h
@@ -18,7 +18,7 @@ namespace sync_pb {
class SyncEntity;
}
-namespace csync {
+namespace syncer {
class Cryptographer;
@@ -50,6 +50,6 @@ class ProcessUpdatesCommand : public ModelChangingSyncerCommand {
DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
diff --git a/sync/engine/process_updates_command_unittest.cc b/sync/engine/process_updates_command_unittest.cc
index a8e8ca3..656091f 100644
--- a/sync/engine/process_updates_command_unittest.cc
+++ b/sync/engine/process_updates_command_unittest.cc
@@ -13,7 +13,7 @@
#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -49,4 +49,4 @@ TEST_F(ProcessUpdatesCommandTest, GetGroupsToChange) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/resolve_conflicts_command.cc b/sync/engine/resolve_conflicts_command.cc
index edef3ff..a1ffbde 100644
--- a/sync/engine/resolve_conflicts_command.cc
+++ b/sync/engine/resolve_conflicts_command.cc
@@ -10,7 +10,7 @@
#include "sync/syncable/directory.h"
#include "sync/syncable/write_transaction.h"
-namespace csync {
+namespace syncer {
ResolveConflictsCommand::ResolveConflictsCommand() {}
ResolveConflictsCommand::~ResolveConflictsCommand() {}
@@ -38,4 +38,4 @@ SyncerError ResolveConflictsCommand::ModelChangingExecuteImpl(
return SYNCER_OK;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/resolve_conflicts_command.h b/sync/engine/resolve_conflicts_command.h
index 217ddb2..22a9302 100644
--- a/sync/engine/resolve_conflicts_command.h
+++ b/sync/engine/resolve_conflicts_command.h
@@ -10,7 +10,7 @@
#include "base/compiler_specific.h"
#include "sync/engine/model_changing_syncer_command.h"
-namespace csync {
+namespace syncer {
class ResolveConflictsCommand : public ModelChangingSyncerCommand {
public:
@@ -28,6 +28,6 @@ class ResolveConflictsCommand : public ModelChangingSyncerCommand {
DISALLOW_COPY_AND_ASSIGN(ResolveConflictsCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_
diff --git a/sync/engine/resolve_conflicts_command_unittest.cc b/sync/engine/resolve_conflicts_command_unittest.cc
index ac3e84f..e5f3c44 100644
--- a/sync/engine/resolve_conflicts_command_unittest.cc
+++ b/sync/engine/resolve_conflicts_command_unittest.cc
@@ -12,7 +12,7 @@
#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -48,4 +48,4 @@ TEST_F(ResolveConflictsCommandTest, GetGroupsToChange) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/store_timestamps_command.cc b/sync/engine/store_timestamps_command.cc
index cfbabe6..89a3088 100644
--- a/sync/engine/store_timestamps_command.cc
+++ b/sync/engine/store_timestamps_command.cc
@@ -9,7 +9,7 @@
#include "sync/sessions/sync_session.h"
#include "sync/syncable/directory.h"
-namespace csync {
+namespace syncer {
StoreTimestampsCommand::StoreTimestampsCommand() {}
StoreTimestampsCommand::~StoreTimestampsCommand() {}
@@ -56,4 +56,4 @@ SyncerError StoreTimestampsCommand::ExecuteImpl(
return SYNCER_OK;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/store_timestamps_command.h b/sync/engine/store_timestamps_command.h
index cd4c054..382752b 100644
--- a/sync/engine/store_timestamps_command.h
+++ b/sync/engine/store_timestamps_command.h
@@ -10,7 +10,7 @@
#include "sync/engine/syncer_command.h"
#include "sync/engine/syncer_types.h"
-namespace csync {
+namespace syncer {
// A syncer command that extracts the changelog timestamp information from
// a GetUpdatesResponse (fetched in DownloadUpdatesCommand) and stores
@@ -36,6 +36,6 @@ class StoreTimestampsCommand : public SyncerCommand {
DISALLOW_COPY_AND_ASSIGN(StoreTimestampsCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_
diff --git a/sync/engine/sync_engine_event.cc b/sync/engine/sync_engine_event.cc
index d362448..2df3d62 100644
--- a/sync/engine/sync_engine_event.cc
+++ b/sync/engine/sync_engine_event.cc
@@ -4,11 +4,11 @@
#include "sync/engine/sync_engine_event.h"
-namespace csync {
+namespace syncer {
SyncEngineEvent::SyncEngineEvent(EventCause cause) : what_happened(cause) {
}
SyncEngineEvent::~SyncEngineEvent() {}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/sync_engine_event.h b/sync/engine/sync_engine_event.h
index e0d011c..6545461e 100644
--- a/sync/engine/sync_engine_event.h
+++ b/sync/engine/sync_engine_event.h
@@ -15,7 +15,7 @@ namespace syncable {
class Id;
}
-namespace csync {
+namespace syncer {
struct SyncEngineEvent {
enum EventCause {
@@ -67,6 +67,6 @@ class SyncEngineEventListener {
virtual ~SyncEngineEventListener() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_H_
diff --git a/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc
index 1d1ddad..23ad567 100644
--- a/sync/engine/sync_scheduler.cc
+++ b/sync/engine/sync_scheduler.cc
@@ -23,7 +23,7 @@
using base::TimeDelta;
using base::TimeTicks;
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
using sessions::SyncSessionSnapshot;
@@ -35,22 +35,22 @@ using sync_pb::GetUpdatesCallerInfo;
namespace {
bool ShouldRequestEarlyExit(
- const csync::SyncProtocolError& error) {
+ const syncer::SyncProtocolError& error) {
switch (error.error_type) {
- case csync::SYNC_SUCCESS:
- case csync::MIGRATION_DONE:
- case csync::THROTTLED:
- case csync::TRANSIENT_ERROR:
+ case syncer::SYNC_SUCCESS:
+ case syncer::MIGRATION_DONE:
+ case syncer::THROTTLED:
+ case syncer::TRANSIENT_ERROR:
return false;
- case csync::NOT_MY_BIRTHDAY:
- case csync::CLEAR_PENDING:
+ case syncer::NOT_MY_BIRTHDAY:
+ case syncer::CLEAR_PENDING:
// If we send terminate sync early then |sync_cycle_ended| notification
// would not be sent. If there were no actions then |ACTIONABLE_ERROR|
// notification wouldnt be sent either. Then the UI layer would be left
// waiting forever. So assert we would send something.
- DCHECK(error.action != csync::UNKNOWN_ACTION);
+ DCHECK(error.action != syncer::UNKNOWN_ACTION);
return true;
- case csync::INVALID_CREDENTIAL:
+ case syncer::INVALID_CREDENTIAL:
// The notification for this is handled by PostAndProcessHeaders|.
// Server does no have to send any action for this.
return true;
@@ -63,8 +63,8 @@ bool ShouldRequestEarlyExit(
}
bool IsActionableError(
- const csync::SyncProtocolError& error) {
- return (error.action != csync::UNKNOWN_ACTION);
+ const syncer::SyncProtocolError& error) {
+ return (error.action != syncer::UNKNOWN_ACTION);
}
} // namespace
@@ -1141,4 +1141,4 @@ base::TimeDelta SyncScheduler::sessions_commit_delay() const {
#undef ENUM_CASE
-} // csync
+} // namespace syncer
diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h
index 51f5792..d8ea732 100644
--- a/sync/engine/sync_scheduler.h
+++ b/sync/engine/sync_scheduler.h
@@ -33,7 +33,7 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
struct ServerConnectionEvent;
@@ -329,8 +329,8 @@ class SyncScheduler : public sessions::SyncSession::Delegate {
void OnServerConnectionErrorFixed();
// The pointer is owned by the caller.
- csync::sessions::SyncSession* CreateSyncSession(
- const csync::sessions::SyncSourceInfo& info);
+ syncer::sessions::SyncSession* CreateSyncSession(
+ const syncer::sessions::SyncSourceInfo& info);
// Creates a session for a poll and performs the sync.
void PollTimerCallback();
@@ -402,6 +402,6 @@ class SyncScheduler : public sessions::SyncSession::Delegate {
DISALLOW_COPY_AND_ASSIGN(SyncScheduler);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNC_SCHEDULER_H_
diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index 82628cb..cfea374 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -30,7 +30,7 @@ using testing::Mock;
using testing::Return;
using testing::WithArg;
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
using sessions::SyncSessionContext;
using sessions::SyncSessionSnapshot;
@@ -1140,4 +1140,4 @@ TEST_F(SyncSchedulerTest, SetsPreviousRoutingInfo) {
EXPECT_TRUE(expected == context()->previous_session_routing_info());
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/sync_scheduler_whitebox_unittest.cc b/sync/engine/sync_scheduler_whitebox_unittest.cc
index b6e3234..7fb53be 100644
--- a/sync/engine/sync_scheduler_whitebox_unittest.cc
+++ b/sync/engine/sync_scheduler_whitebox_unittest.cc
@@ -18,8 +18,8 @@
using base::TimeDelta;
using base::TimeTicks;
-namespace csync {
-using csync::Syncer;
+namespace syncer {
+using syncer::Syncer;
using sessions::SyncSession;
using sessions::SyncSessionContext;
using sessions::SyncSourceInfo;
@@ -265,4 +265,4 @@ TEST_F(SyncSchedulerWhiteboxTest, ContinueCanaryJobConfig) {
EXPECT_EQ(decision, SyncScheduler::CONTINUE);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index 8d3063d..3e8e456 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -42,7 +42,7 @@ using syncable::SERVER_POSITION_IN_PARENT;
using syncable::SERVER_SPECIFICS;
using syncable::SERVER_VERSION;
-namespace csync {
+namespace syncer {
using sessions::ScopedSessionContextConflictResolver;
using sessions::StatusController;
@@ -296,4 +296,4 @@ void ClearServerData(syncable::MutableEntry* entry) {
entry->Put(SERVER_POSITION_IN_PARENT, 0);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/syncer.h b/sync/engine/syncer.h
index edddf9b..8369d80 100644
--- a/sync/engine/syncer.h
+++ b/sync/engine/syncer.h
@@ -24,7 +24,7 @@ class Entry;
class MutableEntry;
} // namespace syncable
-namespace csync {
+namespace syncer {
enum SyncerStep {
SYNCER_BEGIN,
@@ -107,6 +107,6 @@ void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest);
void ClearServerData(syncable::MutableEntry* entry);
const char* SyncerStepToString(const SyncerStep);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNCER_H_
diff --git a/sync/engine/syncer_command.cc b/sync/engine/syncer_command.cc
index bf7bf96..5dfd821 100644
--- a/sync/engine/syncer_command.cc
+++ b/sync/engine/syncer_command.cc
@@ -4,7 +4,7 @@
#include "sync/engine/syncer_command.h"
-namespace csync {
+namespace syncer {
SyncerCommand::SyncerCommand() {}
SyncerCommand::~SyncerCommand() {}
@@ -14,4 +14,4 @@ SyncerError SyncerCommand::Execute(sessions::SyncSession* session) {
return result;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/syncer_command.h b/sync/engine/syncer_command.h
index 710b3ac..b626b0f 100644
--- a/sync/engine/syncer_command.h
+++ b/sync/engine/syncer_command.h
@@ -10,7 +10,7 @@
#include "sync/internal_api/public/util/syncer_error.h"
-namespace csync {
+namespace syncer {
namespace sessions {
class SyncSession;
@@ -42,6 +42,6 @@ class SyncerCommand {
DISALLOW_COPY_AND_ASSIGN(SyncerCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNCER_COMMAND_H_
diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc
index 8be6888..e88bc06 100644
--- a/sync/engine/syncer_proto_util.cc
+++ b/sync/engine/syncer_proto_util.cc
@@ -21,7 +21,7 @@
#include "sync/syncable/syncable-inl.h"
#include "sync/util/time.h"
-using csync::SyncProtocolErrorType;
+using syncer::SyncProtocolErrorType;
using std::string;
using std::stringstream;
using syncable::BASE_VERSION;
@@ -33,7 +33,7 @@ using syncable::IS_UNSYNCED;
using syncable::MTIME;
using syncable::PARENT_ID;
-namespace csync {
+namespace syncer {
using sessions::SyncSession;
namespace {
@@ -217,7 +217,7 @@ void SyncerProtoUtil::HandleThrottleError(
const base::TimeTicks& throttled_until,
ThrottledDataTypeTracker* tracker,
sessions::SyncSession::Delegate* delegate) {
- DCHECK_EQ(error.error_type, csync::THROTTLED);
+ DCHECK_EQ(error.error_type, syncer::THROTTLED);
if (error.error_data_types.Empty()) {
// No datatypes indicates the client should be completely throttled.
delegate->OnSilencedUntil(throttled_until);
@@ -244,53 +244,53 @@ SyncProtocolErrorType ConvertSyncProtocolErrorTypePBToLocalType(
const sync_pb::SyncEnums::ErrorType& error_type) {
switch (error_type) {
case sync_pb::SyncEnums::SUCCESS:
- return csync::SYNC_SUCCESS;
+ return syncer::SYNC_SUCCESS;
case sync_pb::SyncEnums::NOT_MY_BIRTHDAY:
- return csync::NOT_MY_BIRTHDAY;
+ return syncer::NOT_MY_BIRTHDAY;
case sync_pb::SyncEnums::THROTTLED:
- return csync::THROTTLED;
+ return syncer::THROTTLED;
case sync_pb::SyncEnums::CLEAR_PENDING:
- return csync::CLEAR_PENDING;
+ return syncer::CLEAR_PENDING;
case sync_pb::SyncEnums::TRANSIENT_ERROR:
- return csync::TRANSIENT_ERROR;
+ return syncer::TRANSIENT_ERROR;
case sync_pb::SyncEnums::MIGRATION_DONE:
- return csync::MIGRATION_DONE;
+ return syncer::MIGRATION_DONE;
case sync_pb::SyncEnums::UNKNOWN:
- return csync::UNKNOWN_ERROR;
+ return syncer::UNKNOWN_ERROR;
case sync_pb::SyncEnums::USER_NOT_ACTIVATED:
case sync_pb::SyncEnums::AUTH_INVALID:
case sync_pb::SyncEnums::ACCESS_DENIED:
- return csync::INVALID_CREDENTIAL;
+ return syncer::INVALID_CREDENTIAL;
default:
NOTREACHED();
- return csync::UNKNOWN_ERROR;
+ return syncer::UNKNOWN_ERROR;
}
}
-csync::ClientAction ConvertClientActionPBToLocalClientAction(
+syncer::ClientAction ConvertClientActionPBToLocalClientAction(
const sync_pb::SyncEnums::Action& action) {
switch (action) {
case sync_pb::SyncEnums::UPGRADE_CLIENT:
- return csync::UPGRADE_CLIENT;
+ return syncer::UPGRADE_CLIENT;
case sync_pb::SyncEnums::CLEAR_USER_DATA_AND_RESYNC:
- return csync::CLEAR_USER_DATA_AND_RESYNC;
+ return syncer::CLEAR_USER_DATA_AND_RESYNC;
case sync_pb::SyncEnums::ENABLE_SYNC_ON_ACCOUNT:
- return csync::ENABLE_SYNC_ON_ACCOUNT;
+ return syncer::ENABLE_SYNC_ON_ACCOUNT;
case sync_pb::SyncEnums::STOP_AND_RESTART_SYNC:
- return csync::STOP_AND_RESTART_SYNC;
+ return syncer::STOP_AND_RESTART_SYNC;
case sync_pb::SyncEnums::DISABLE_SYNC_ON_CLIENT:
- return csync::DISABLE_SYNC_ON_CLIENT;
+ return syncer::DISABLE_SYNC_ON_CLIENT;
case sync_pb::SyncEnums::UNKNOWN_ACTION:
- return csync::UNKNOWN_ACTION;
+ return syncer::UNKNOWN_ACTION;
default:
NOTREACHED();
- return csync::UNKNOWN_ACTION;
+ return syncer::UNKNOWN_ACTION;
}
}
-csync::SyncProtocolError ConvertErrorPBToLocalType(
+syncer::SyncProtocolError ConvertErrorPBToLocalType(
const sync_pb::ClientToServerResponse::Error& error) {
- csync::SyncProtocolError sync_protocol_error;
+ syncer::SyncProtocolError sync_protocol_error;
sync_protocol_error.error_type = ConvertSyncProtocolErrorTypePBToLocalType(
error.error_type());
sync_protocol_error.error_description = error.error_description();
@@ -312,13 +312,13 @@ csync::SyncProtocolError ConvertErrorPBToLocalType(
}
// TODO(lipalani) : Rename these function names as per the CR for issue 7740067.
-csync::SyncProtocolError ConvertLegacyErrorCodeToNewError(
+syncer::SyncProtocolError ConvertLegacyErrorCodeToNewError(
const sync_pb::SyncEnums::ErrorType& error_type) {
- csync::SyncProtocolError error;
+ syncer::SyncProtocolError error;
error.error_type = ConvertSyncProtocolErrorTypePBToLocalType(error_type);
if (error_type == sync_pb::SyncEnums::CLEAR_PENDING ||
error_type == sync_pb::SyncEnums::NOT_MY_BIRTHDAY) {
- error.action = csync::DISABLE_SYNC_ON_CLIENT;
+ error.action = syncer::DISABLE_SYNC_ON_CLIENT;
} // There is no other action we can compute for legacy server.
return error;
}
@@ -345,11 +345,11 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage(
msg, response)) {
// There was an error establishing communication with the server.
// We can not proceed beyond this point.
- const csync::HttpResponse::ServerConnectionCode server_status =
+ const syncer::HttpResponse::ServerConnectionCode server_status =
session->context()->connection_manager()->server_status();
- DCHECK_NE(server_status, csync::HttpResponse::NONE);
- DCHECK_NE(server_status, csync::HttpResponse::SERVER_CONNECTION_OK);
+ DCHECK_NE(server_status, syncer::HttpResponse::NONE);
+ DCHECK_NE(server_status, syncer::HttpResponse::SERVER_CONNECTION_OK);
return ServerConnectionErrorAsSyncerError(server_status);
}
@@ -358,13 +358,13 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage(
session->context()->traffic_recorder()->RecordClientToServerResponse(
*response);
- csync::SyncProtocolError sync_protocol_error;
+ syncer::SyncProtocolError sync_protocol_error;
// Birthday mismatch overrides any error that is sent by the server.
if (!VerifyResponseBirthday(dir, response)) {
- sync_protocol_error.error_type = csync::NOT_MY_BIRTHDAY;
+ sync_protocol_error.error_type = syncer::NOT_MY_BIRTHDAY;
sync_protocol_error.action =
- csync::DISABLE_SYNC_ON_CLIENT;
+ syncer::DISABLE_SYNC_ON_CLIENT;
} else if (response->has_error()) {
// This is a new server. Just get the error from the protocol.
sync_protocol_error = ConvertErrorPBToLocalType(response->error());
@@ -384,28 +384,28 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage(
// Now do any special handling for the error type and decide on the return
// value.
switch (sync_protocol_error.error_type) {
- case csync::UNKNOWN_ERROR:
+ case syncer::UNKNOWN_ERROR:
LOG(WARNING) << "Sync protocol out-of-date. The server is using a more "
<< "recent version.";
return SERVER_RETURN_UNKNOWN_ERROR;
- case csync::SYNC_SUCCESS:
+ case syncer::SYNC_SUCCESS:
LogResponseProfilingData(*response);
return SYNCER_OK;
- case csync::THROTTLED:
+ case syncer::THROTTLED:
LOG(WARNING) << "Client silenced by server.";
HandleThrottleError(sync_protocol_error,
base::TimeTicks::Now() + GetThrottleDelay(*response),
session->context()->throttled_data_type_tracker(),
session->delegate());
return SERVER_RETURN_THROTTLED;
- case csync::TRANSIENT_ERROR:
+ case syncer::TRANSIENT_ERROR:
return SERVER_RETURN_TRANSIENT_ERROR;
- case csync::MIGRATION_DONE:
+ case syncer::MIGRATION_DONE:
HandleMigrationDoneResponse(response, session);
return SERVER_RETURN_MIGRATION_DONE;
- case csync::CLEAR_PENDING:
+ case syncer::CLEAR_PENDING:
return SERVER_RETURN_CLEAR_PENDING;
- case csync::NOT_MY_BIRTHDAY:
+ case syncer::NOT_MY_BIRTHDAY:
return SERVER_RETURN_NOT_MY_BIRTHDAY;
default:
NOTREACHED();
@@ -542,4 +542,4 @@ std::string SyncerProtoUtil::ClientToServerResponseDebugString(
return output;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/syncer_proto_util.h b/sync/engine/syncer_proto_util.h
index d9ccddc..4e9614c 100644
--- a/sync/engine/syncer_proto_util.h
+++ b/sync/engine/syncer_proto_util.h
@@ -25,7 +25,7 @@ class ClientToServerResponse;
class EntitySpecifics;
} // namespace sync_pb
-namespace csync {
+namespace syncer {
namespace sessions {
class SyncProtocolError;
@@ -111,7 +111,7 @@ class SyncerProtoUtil {
// Post the message using the scm, and do some processing on the returned
// headers. Decode the server response.
- static bool PostAndProcessHeaders(csync::ServerConnectionManager* scm,
+ static bool PostAndProcessHeaders(syncer::ServerConnectionManager* scm,
sessions::SyncSession* session,
const ClientToServerMessage& msg,
sync_pb::ClientToServerResponse* response);
@@ -122,7 +122,7 @@ class SyncerProtoUtil {
static void HandleThrottleError(
const SyncProtocolError& error,
const base::TimeTicks& throttled_until,
- csync::ThrottledDataTypeTracker* tracker,
+ syncer::ThrottledDataTypeTracker* tracker,
sessions::SyncSession::Delegate* delegate);
friend class SyncerProtoUtilTest;
@@ -135,6 +135,6 @@ class SyncerProtoUtil {
DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
diff --git a/sync/engine/syncer_proto_util_unittest.cc b/sync/engine/syncer_proto_util_unittest.cc
index b0c9f6e..7c496ee 100644
--- a/sync/engine/syncer_proto_util_unittest.cc
+++ b/sync/engine/syncer_proto_util_unittest.cc
@@ -28,7 +28,7 @@
using syncable::Blob;
using ::testing::_;
-namespace csync {
+namespace syncer {
using sessions::SyncSessionContext;
class MockDelegate : public sessions::SyncSession::Delegate {
@@ -203,7 +203,7 @@ TEST_F(SyncerProtoUtilTest, AddRequestBirthday) {
EXPECT_EQ(msg.store_birthday(), "meat");
}
-class DummyConnectionManager : public csync::ServerConnectionManager {
+class DummyConnectionManager : public syncer::ServerConnectionManager {
public:
DummyConnectionManager()
: ServerConnectionManager("unused", 0, false),
@@ -263,7 +263,7 @@ TEST_F(SyncerProtoUtilTest, PostAndProcessHeaders) {
TEST_F(SyncerProtoUtilTest, HandleThrottlingWithDatatypes) {
ThrottledDataTypeTracker tracker(NULL);
SyncProtocolError error;
- error.error_type = csync::THROTTLED;
+ error.error_type = syncer::THROTTLED;
syncable::ModelTypeSet types;
types.Put(syncable::BOOKMARKS);
types.Put(syncable::PASSWORDS);
@@ -278,7 +278,7 @@ TEST_F(SyncerProtoUtilTest, HandleThrottlingNoDatatypes) {
ThrottledDataTypeTracker tracker(NULL);
MockDelegate delegate;
SyncProtocolError error;
- error.error_type = csync::THROTTLED;
+ error.error_type = syncer::THROTTLED;
base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1);
@@ -287,4 +287,4 @@ TEST_F(SyncerProtoUtilTest, HandleThrottlingNoDatatypes) {
SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate);
EXPECT_TRUE(tracker.GetThrottledTypes().Empty());
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/syncer_types.h b/sync/engine/syncer_types.h
index 474bdaec..eb79d82 100644
--- a/sync/engine/syncer_types.h
+++ b/sync/engine/syncer_types.h
@@ -8,7 +8,7 @@
// The intent of this is to keep all shared data types and enums for the syncer
// in a single place without having dependencies between other files.
-namespace csync {
+namespace syncer {
enum UpdateAttemptResponse {
// Update was applied or safely ignored.
@@ -82,6 +82,6 @@ enum VerifyCommitResult {
VERIFY_OK,
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNCER_TYPES_H_
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 764161e..fe20a65 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -62,7 +62,7 @@ using std::multimap;
using std::set;
using std::string;
-namespace csync {
+namespace syncer {
using syncable::BaseTransaction;
using syncable::Blob;
@@ -560,7 +560,7 @@ class SyncerTest : public testing::Test,
scoped_refptr<ModelSafeWorker> worker_;
syncable::ModelTypeSet enabled_datatypes_;
- csync::TrafficRecorder traffic_recorder_;
+ syncer::TrafficRecorder traffic_recorder_;
DISALLOW_COPY_AND_ASSIGN(SyncerTest);
};
@@ -714,7 +714,7 @@ TEST_F(SyncerTest, GetCommitIdsFiltersUnreadyEntries) {
// Mark bookmarks as encrypted and set the cryptographer to have pending
// keys.
WriteTransaction wtrans(FROM_HERE, UNITTEST, directory());
- csync::Cryptographer other_cryptographer(&encryptor_);
+ syncer::Cryptographer other_cryptographer(&encryptor_);
other_cryptographer.AddKey(other_params);
sync_pb::EntitySpecifics specifics;
sync_pb::NigoriSpecifics* nigori = specifics.mutable_nigori();
@@ -807,7 +807,7 @@ TEST_F(SyncerTest, GetCommitIdsFiltersUnreadyEntries) {
TEST_F(SyncerTest, EncryptionAwareConflicts) {
KeyParams key_params = {"localhost", "dummy", "foobar"};
- csync::Cryptographer other_cryptographer(&encryptor_);
+ syncer::Cryptographer other_cryptographer(&encryptor_);
other_cryptographer.AddKey(key_params);
sync_pb::EntitySpecifics bookmark, encrypted_bookmark, modified_bookmark;
bookmark.mutable_bookmark()->set_title("title");
@@ -981,7 +981,7 @@ TEST_F(SyncerTest, ReceiveOldNigori) {
KeyParams current_key = {"localhost", "dummy", "cur"};
// Data for testing encryption/decryption.
- csync::Cryptographer other_cryptographer(&encryptor_);
+ syncer::Cryptographer other_cryptographer(&encryptor_);
other_cryptographer.AddKey(old_key);
sync_pb::EntitySpecifics other_encrypted_specifics;
other_encrypted_specifics.mutable_bookmark()->set_title("title");
@@ -1064,7 +1064,7 @@ TEST_F(SyncerTest, ReceiveOldNigori) {
TEST_F(SyncerTest, NigoriConflicts) {
KeyParams local_key_params = {"localhost", "dummy", "blargle"};
KeyParams other_key_params = {"localhost", "dummy", "foobar"};
- csync::Cryptographer other_cryptographer(&encryptor_);
+ syncer::Cryptographer other_cryptographer(&encryptor_);
other_cryptographer.AddKey(other_key_params);
syncable::ModelTypeSet encrypted_types(syncable::PASSWORDS, syncable::NIGORI);
sync_pb::EntitySpecifics initial_nigori_specifics;
@@ -4831,4 +4831,4 @@ TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) {
ExpectLocalOrderIsByServerId();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc
index 3e78472..4b95d05 100644
--- a/sync/engine/syncer_util.cc
+++ b/sync/engine/syncer_util.cc
@@ -68,7 +68,7 @@ using syncable::SPECIFICS;
using syncable::SYNCER;
using syncable::WriteTransaction;
-namespace csync {
+namespace syncer {
// Returns the number of unsynced entries.
// static
@@ -722,4 +722,4 @@ VerifyResult SyncerUtil::VerifyUndelete(syncable::WriteTransaction* trans,
return VERIFY_UNDECIDED;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/syncer_util.h b/sync/engine/syncer_util.h
index e7d0515..7312ab7 100644
--- a/sync/engine/syncer_util.h
+++ b/sync/engine/syncer_util.h
@@ -19,7 +19,7 @@
#include "sync/syncable/metahandle_set.h"
#include "sync/syncable/syncable_id.h"
-namespace csync {
+namespace syncer {
class Cryptographer;
class SyncEntity;
@@ -123,6 +123,6 @@ class SyncerUtil {
DISALLOW_IMPLICIT_CONSTRUCTORS(SyncerUtil);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNCER_UTIL_H_
diff --git a/sync/engine/syncproto.h b/sync/engine/syncproto.h
index ec6c6e4..8fa4697 100644
--- a/sync/engine/syncproto.h
+++ b/sync/engine/syncproto.h
@@ -12,7 +12,7 @@
#include "sync/protocol/sync.pb.h"
#include "sync/syncable/syncable_id.h"
-namespace csync {
+namespace syncer {
template<class Base>
class IdWrapper : public Base {
@@ -82,6 +82,6 @@ typedef sync_pb::CommitResponse CommitResponse;
typedef sync_pb::GetUpdatesResponse GetUpdatesResponse;
typedef sync_pb::GetUpdatesMessage GetUpdatesMessage;
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_SYNCPROTO_H_
diff --git a/sync/engine/syncproto_unittest.cc b/sync/engine/syncproto_unittest.cc
index d641b5d..1ceaab3 100644
--- a/sync/engine/syncproto_unittest.cc
+++ b/sync/engine/syncproto_unittest.cc
@@ -5,7 +5,7 @@
#include "sync/engine/syncproto.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
class SyncProtoTest : public testing::Test {
};
@@ -15,4 +15,4 @@ TEST_F(SyncProtoTest, ProtocolVersionPresent) {
EXPECT_TRUE(csm.has_protocol_version());
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/throttled_data_type_tracker.cc b/sync/engine/throttled_data_type_tracker.cc
index 47d68f6..e27f2e3 100644
--- a/sync/engine/throttled_data_type_tracker.cc
+++ b/sync/engine/throttled_data_type_tracker.cc
@@ -7,7 +7,7 @@
#include "sync/engine/all_status.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
ThrottledDataTypeTracker::ThrottledDataTypeTracker(AllStatus *allstatus)
: allstatus_(allstatus) {
@@ -69,4 +69,4 @@ syncable::ModelTypeSet ThrottledDataTypeTracker::GetThrottledTypes() const {
return types;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/throttled_data_type_tracker.h b/sync/engine/throttled_data_type_tracker.h
index f24ab74..a496bea 100644
--- a/sync/engine/throttled_data_type_tracker.h
+++ b/sync/engine/throttled_data_type_tracker.h
@@ -11,7 +11,7 @@
#include "base/gtest_prod_util.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
class AllStatus;
@@ -50,6 +50,6 @@ class ThrottledDataTypeTracker {
DISALLOW_COPY_AND_ASSIGN(ThrottledDataTypeTracker);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_THROTTLED_DATA_TYPE_TRACKER_H_
diff --git a/sync/engine/throttled_data_type_tracker_unittest.cc b/sync/engine/throttled_data_type_tracker_unittest.cc
index 6273915..20b7237 100644
--- a/sync/engine/throttled_data_type_tracker_unittest.cc
+++ b/sync/engine/throttled_data_type_tracker_unittest.cc
@@ -10,7 +10,7 @@
using base::TimeDelta;
using base::TimeTicks;
-namespace csync {
+namespace syncer {
TEST(ThrottledDataTypeTrackerTest, AddUnthrottleTimeTest) {
const syncable::ModelTypeSet types(syncable::BOOKMARKS, syncable::PASSWORDS);
@@ -63,5 +63,5 @@ TEST(ThrottledDataTypeTrackerTest, UnthrottleSomeTypesTest) {
EXPECT_TRUE(throttler.GetThrottledTypes().Equals(long_throttled));
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/traffic_logger.cc b/sync/engine/traffic_logger.cc
index e25fdc8..740409a 100644
--- a/sync/engine/traffic_logger.cc
+++ b/sync/engine/traffic_logger.cc
@@ -13,7 +13,7 @@
#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
-namespace csync {
+namespace syncer {
namespace {
template <class T>
@@ -43,4 +43,4 @@ void LogClientToServerResponse(
"******Server Response******");
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/traffic_logger.h b/sync/engine/traffic_logger.h
index 93ae2a3..cba7a67 100644
--- a/sync/engine/traffic_logger.h
+++ b/sync/engine/traffic_logger.h
@@ -15,12 +15,12 @@ class ClientToServerResponse;
class ClientToServerMessage;
} // namespace sync_pb
-namespace csync {
+namespace syncer {
void LogClientToServerMessage(const sync_pb::ClientToServerMessage& msg);
void LogClientToServerResponse(
const sync_pb::ClientToServerResponse& response);
-} // namespace csync
+} // namespace syncer
#endif // CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_LOGGER_H_
diff --git a/sync/engine/traffic_recorder.cc b/sync/engine/traffic_recorder.cc
index ade5bd6..379c488 100644
--- a/sync/engine/traffic_recorder.cc
+++ b/sync/engine/traffic_recorder.cc
@@ -12,7 +12,7 @@
#include "sync/protocol/sync.pb.h"
#include "sync/sessions/sync_session.h"
-namespace csync {
+namespace syncer {
TrafficRecorder::TrafficRecord::TrafficRecord(const std::string& message,
TrafficMessageType message_type,
@@ -129,5 +129,5 @@ void TrafficRecorder::RecordClientToServerResponse(
StoreProtoInQueue(response, CLIENT_TO_SERVER_RESPONSE);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/traffic_recorder.h b/sync/engine/traffic_recorder.h
index 525e735..436f07c 100644
--- a/sync/engine/traffic_recorder.h
+++ b/sync/engine/traffic_recorder.h
@@ -19,7 +19,7 @@ class ClientToServerResponse;
class ClientToServerMessage;
}
-namespace csync {
+namespace syncer {
class TrafficRecorder {
public:
@@ -72,7 +72,7 @@ class TrafficRecorder {
DISALLOW_COPY_AND_ASSIGN(TrafficRecorder);
};
-} // namespace csync
+} // namespace syncer
#endif // CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_
diff --git a/sync/engine/traffic_recorder_unittest.cc b/sync/engine/traffic_recorder_unittest.cc
index 637aeeb..cf821f5 100644
--- a/sync/engine/traffic_recorder_unittest.cc
+++ b/sync/engine/traffic_recorder_unittest.cc
@@ -7,7 +7,7 @@
#include "sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
const unsigned int kMaxMessages = 10;
const unsigned int kMaxMessageSize = 5 * 1024;
@@ -39,5 +39,4 @@ TEST(TrafficRecorderTest, MaxMessageSizeTest) {
EXPECT_TRUE(record.message.empty());
}
-} //namespace csync
-
+} // namespace syncer
diff --git a/sync/engine/update_applicator.cc b/sync/engine/update_applicator.cc
index 3986e60..2756902 100644
--- a/sync/engine/update_applicator.cc
+++ b/sync/engine/update_applicator.cc
@@ -16,7 +16,7 @@
using std::vector;
-namespace csync {
+namespace syncer {
UpdateApplicator::UpdateApplicator(ConflictResolver* resolver,
Cryptographer* cryptographer,
@@ -189,4 +189,4 @@ bool UpdateApplicator::ResultTracker::no_conflicts() const {
return conflicting_ids_.empty();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/update_applicator.h b/sync/engine/update_applicator.h
index fbc8361..de05999 100644
--- a/sync/engine/update_applicator.h
+++ b/sync/engine/update_applicator.h
@@ -24,7 +24,7 @@ class WriteTransaction;
class Entry;
}
-namespace csync {
+namespace syncer {
namespace sessions {
class ConflictProgress;
@@ -109,6 +109,6 @@ class UpdateApplicator {
DISALLOW_COPY_AND_ASSIGN(UpdateApplicator);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_UPDATE_APPLICATOR_H_
diff --git a/sync/engine/verify_updates_command.cc b/sync/engine/verify_updates_command.cc
index 91f08f0..93b6263 100644
--- a/sync/engine/verify_updates_command.cc
+++ b/sync/engine/verify_updates_command.cc
@@ -18,7 +18,7 @@
#include "sync/syncable/mutable_entry.h"
#include "sync/syncable/write_transaction.h"
-namespace csync {
+namespace syncer {
using syncable::GET_BY_ID;
using syncable::ModelTypeSet;
@@ -100,7 +100,7 @@ SyncerError VerifyUpdatesCommand::ModelChangingExecuteImpl(
const GetUpdatesResponse& updates = status->updates_response().get_updates();
int update_count = updates.entries().size();
- ModelTypeSet requested_types = csync::GetRoutingInfoTypes(
+ ModelTypeSet requested_types = syncer::GetRoutingInfoTypes(
session->routing_info());
DVLOG(1) << update_count << " entries to verify";
@@ -186,4 +186,4 @@ VerifyUpdatesCommand::VerifyUpdateResult VerifyUpdatesCommand::VerifyUpdate(
return result; // This might be VERIFY_SUCCESS as well
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/engine/verify_updates_command.h b/sync/engine/verify_updates_command.h
index b0bf68e..27b0b41 100644
--- a/sync/engine/verify_updates_command.h
+++ b/sync/engine/verify_updates_command.h
@@ -17,7 +17,7 @@ namespace syncable {
class WriteTransaction;
}
-namespace csync {
+namespace syncer {
// Verifies the response from a GetUpdates request. All invalid updates will be
// noted in the SyncSession after this command is executed.
@@ -45,6 +45,6 @@ class VerifyUpdatesCommand : public ModelChangingSyncerCommand {
DISALLOW_COPY_AND_ASSIGN(VerifyUpdatesCommand);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
diff --git a/sync/engine/verify_updates_command_unittest.cc b/sync/engine/verify_updates_command_unittest.cc
index 49ac704..afbc784 100644
--- a/sync/engine/verify_updates_command_unittest.cc
+++ b/sync/engine/verify_updates_command_unittest.cc
@@ -13,7 +13,7 @@
#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
using sessions::StatusController;
using std::string;
@@ -105,4 +105,4 @@ TEST_F(VerifyUpdatesCommandTest, AllVerified) {
}
}
-}
+} // namespace syncer
diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc
index 8af53cb..7563d02 100644
--- a/sync/internal_api/base_node.cc
+++ b/sync/internal_api/base_node.cc
@@ -28,7 +28,7 @@
using syncable::SPECIFICS;
using sync_pb::AutofillProfileSpecifics;
-namespace csync {
+namespace syncer {
// Helper function to look up the int64 metahandle of an object given the ID
// string.
@@ -255,7 +255,7 @@ DictionaryValue* BaseNode::GetDetailsAsValue() const {
DictionaryValue* node_info = GetSummaryAsValue();
node_info->SetString(
"modificationTime",
- csync::GetTimeDebugString(GetModificationTime()));
+ syncer::GetTimeDebugString(GetModificationTime()));
node_info->SetString("parentId", base::Int64ToString(GetParentId()));
// Specifics are already in the Entry value, so no need to duplicate
// it here.
@@ -352,4 +352,4 @@ void BaseNode::SetUnencryptedSpecifics(
unencrypted_data_.CopyFrom(specifics);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/base_transaction.cc b/sync/internal_api/base_transaction.cc
index d199f30..5b81136 100644
--- a/sync/internal_api/base_transaction.cc
+++ b/sync/internal_api/base_transaction.cc
@@ -7,9 +7,9 @@
#include "sync/syncable/directory.h"
#include "sync/util/cryptographer.h"
-using csync::Cryptographer;
+using syncer::Cryptographer;
-namespace csync {
+namespace syncer {
//////////////////////////////////////////////////////////////////////////
// BaseTransaction member definitions
@@ -20,13 +20,13 @@ BaseTransaction::BaseTransaction(UserShare* share) {
BaseTransaction::~BaseTransaction() {
}
-csync::Cryptographer* BaseTransaction::GetCryptographer() const {
+syncer::Cryptographer* BaseTransaction::GetCryptographer() const {
return directory_->GetCryptographer(this->GetWrappedTrans());
}
syncable::ModelTypeSet GetEncryptedTypes(
- const csync::BaseTransaction* trans) {
+ const syncer::BaseTransaction* trans) {
return trans->GetCryptographer()->GetEncryptedTypes();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/change_record.cc b/sync/internal_api/change_record.cc
index 231fe42..d75b903 100644
--- a/sync/internal_api/change_record.cc
+++ b/sync/internal_api/change_record.cc
@@ -10,7 +10,7 @@
#include "sync/internal_api/public/read_node.h"
#include "sync/protocol/proto_value_conversions.h"
-namespace csync {
+namespace syncer {
ChangeRecord::ChangeRecord()
: id(kInvalidId), action(ACTION_ADD) {}
@@ -42,7 +42,7 @@ DictionaryValue* ChangeRecord::ToValue() const {
value->Set("extra", extra->ToValue());
}
value->Set("specifics",
- csync::EntitySpecificsToValue(specifics));
+ syncer::EntitySpecificsToValue(specifics));
}
return value;
}
@@ -57,7 +57,7 @@ ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData(
ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {}
DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const {
- return csync::PasswordSpecificsDataToValue(unencrypted_);
+ return syncer::PasswordSpecificsDataToValue(unencrypted_);
}
const sync_pb::PasswordSpecificsData&
@@ -65,5 +65,5 @@ const sync_pb::PasswordSpecificsData&
return unencrypted_;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/change_reorder_buffer.cc b/sync/internal_api/change_reorder_buffer.cc
index 84619aa..786fd46 100644
--- a/sync/internal_api/change_reorder_buffer.cc
+++ b/sync/internal_api/change_reorder_buffer.cc
@@ -20,7 +20,7 @@ using std::pair;
using std::queue;
using std::set;
-namespace csync {
+namespace syncer {
// Traversal provides a way to collect a set of nodes from the syncable
// directory structure and then traverse them, along with any intermediate
@@ -226,4 +226,4 @@ bool ChangeReorderBuffer::GetAllChangesInTreeOrder(
return true;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/change_reorder_buffer.h b/sync/internal_api/change_reorder_buffer.h
index 44773b8..81f4f6d 100644
--- a/sync/internal_api/change_reorder_buffer.h
+++ b/sync/internal_api/change_reorder_buffer.h
@@ -19,7 +19,7 @@
#include "sync/internal_api/public/change_record.h"
#include "sync/protocol/sync.pb.h"
-namespace csync {
+namespace syncer {
// ChangeReorderBuffer is a utility type which accepts an unordered set
// of changes (via its Push methods), and yields an ImmutableChangeRecordList
@@ -119,6 +119,6 @@ class ChangeReorderBuffer {
DISALLOW_COPY_AND_ASSIGN(ChangeReorderBuffer);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_CHANGE_REORDER_BUFFER_H_
diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc
index 40c0e9e..27b6a10 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -4,8 +4,8 @@
#include "sync/internal_api/debug_info_event_listener.h"
-using csync::sessions::SyncSessionSnapshot;
-namespace csync {
+using syncer::sessions::SyncSessionSnapshot;
+namespace syncer {
DebugInfoEventListener::DebugInfoEventListener()
: events_dropped_(false),
@@ -44,18 +44,18 @@ void DebugInfoEventListener::OnSyncCycleCompleted(
}
void DebugInfoEventListener::OnInitializationComplete(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
bool success) {
CreateAndAddEvent(sync_pb::DebugEventInfo::INITIALIZATION_COMPLETE);
}
void DebugInfoEventListener::OnConnectionStatusChange(
- csync::ConnectionStatus status) {
+ syncer::ConnectionStatus status) {
CreateAndAddEvent(sync_pb::DebugEventInfo::CONNECTION_STATUS_CHANGE);
}
void DebugInfoEventListener::OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) {
CreateAndAddEvent(sync_pb::DebugEventInfo::PASSPHRASE_REQUIRED);
}
@@ -88,7 +88,7 @@ void DebugInfoEventListener::OnEncryptionComplete() {
}
void DebugInfoEventListener::OnActionableError(
- const csync::SyncProtocolError& sync_error) {
+ const syncer::SyncProtocolError& sync_error) {
CreateAndAddEvent(sync_pb::DebugEventInfo::ACTIONABLE_ERROR);
}
@@ -124,7 +124,7 @@ void DebugInfoEventListener::OnIncomingNotification(
void DebugInfoEventListener::GetAndClearDebugInfo(
sync_pb::DebugInfo* debug_info) {
- DCHECK(events_.size() <= csync::kMaxEntries);
+ DCHECK(events_.size() <= syncer::kMaxEntries);
while (!events_.empty()) {
sync_pb::DebugEventInfo* event_info = debug_info->add_events();
const sync_pb::DebugEventInfo& debug_event_info = events_.front();
@@ -149,7 +149,7 @@ void DebugInfoEventListener::CreateAndAddEvent(
void DebugInfoEventListener::AddEventToQueue(
const sync_pb::DebugEventInfo& event_info) {
- if (events_.size() >= csync::kMaxEntries) {
+ if (events_.size() >= syncer::kMaxEntries) {
DVLOG(1) << "DebugInfoEventListener::AddEventToQueue Dropping an old event "
<< "because of full queue";
@@ -158,4 +158,4 @@ void DebugInfoEventListener::AddEventToQueue(
}
events_.push(event_info);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h
index fec0b67..f671dd2 100644
--- a/sync/internal_api/debug_info_event_listener.h
+++ b/sync/internal_api/debug_info_event_listener.h
@@ -17,28 +17,28 @@
#include "sync/sessions/debug_info_getter.h"
#include "sync/sessions/session_state.h"
-namespace csync {
+namespace syncer {
const unsigned int kMaxEntries = 6;
// Listens to events and records them in a queue. And passes the events to
// syncer when requested.
-class DebugInfoEventListener : public csync::SyncManager::Observer,
- public csync::sessions::DebugInfoGetter {
+class DebugInfoEventListener : public syncer::SyncManager::Observer,
+ public syncer::sessions::DebugInfoGetter {
public:
DebugInfoEventListener();
virtual ~DebugInfoEventListener();
// SyncManager::Observer implementation.
virtual void OnSyncCycleCompleted(
- const csync::sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
+ const syncer::sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
virtual void OnInitializationComplete(
- const csync::WeakHandle<csync::JsBackend>& js_backend,
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend,
bool success) OVERRIDE;
virtual void OnConnectionStatusChange(
- csync::ConnectionStatus connection_status) OVERRIDE;
+ syncer::ConnectionStatus connection_status) OVERRIDE;
virtual void OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) OVERRIDE;
virtual void OnPassphraseAccepted() OVERRIDE;
virtual void OnBootstrapTokenUpdated(
@@ -50,7 +50,7 @@ class DebugInfoEventListener : public csync::SyncManager::Observer,
bool encrypt_everything) OVERRIDE;
virtual void OnEncryptionComplete() OVERRIDE;
virtual void OnActionableError(
- const csync::SyncProtocolError& sync_error) OVERRIDE;
+ const syncer::SyncProtocolError& sync_error) OVERRIDE;
// Sync manager events.
void OnNudgeFromDatatype(syncable::ModelType datatype);
@@ -86,5 +86,5 @@ class DebugInfoEventListener : public csync::SyncManager::Observer,
DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_
diff --git a/sync/internal_api/debug_info_event_listener_unittest.cc b/sync/internal_api/debug_info_event_listener_unittest.cc
index 2b67782..e37c8e2 100644
--- a/sync/internal_api/debug_info_event_listener_unittest.cc
+++ b/sync/internal_api/debug_info_event_listener_unittest.cc
@@ -8,9 +8,9 @@
typedef testing::Test DebugInfoEventListenerTest;
-namespace csync {
+namespace syncer {
TEST_F(DebugInfoEventListenerTest, VerifyEventsAdded) {
- csync::DebugInfoEventListener debug_info_event_listener;
+ syncer::DebugInfoEventListener debug_info_event_listener;
debug_info_event_listener.CreateAndAddEvent(
sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
ASSERT_EQ(debug_info_event_listener.events_.size(), 1U);
@@ -21,17 +21,17 @@ TEST_F(DebugInfoEventListenerTest, VerifyEventsAdded) {
}
TEST_F(DebugInfoEventListenerTest, VerifyQueueSize) {
- csync::DebugInfoEventListener debug_info_event_listener;
+ syncer::DebugInfoEventListener debug_info_event_listener;
for (int i = 0; i < 10; ++i) {
debug_info_event_listener.CreateAndAddEvent(
sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
}
ASSERT_EQ(debug_info_event_listener.events_.size(),
- csync::kMaxEntries);
+ syncer::kMaxEntries);
}
TEST_F(DebugInfoEventListenerTest, VerifyGetAndClearEvents) {
- csync::DebugInfoEventListener debug_info_event_listener;
+ syncer::DebugInfoEventListener debug_info_event_listener;
debug_info_event_listener.CreateAndAddEvent(
sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
ASSERT_EQ(debug_info_event_listener.events_.size(), 1U);
@@ -44,4 +44,4 @@ TEST_F(DebugInfoEventListenerTest, VerifyGetAndClearEvents) {
sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc
index 6aa6c4a..3822399 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/sync/internal_api/http_bridge.cc
@@ -65,13 +65,13 @@ HttpBridgeFactory::HttpBridgeFactory(
HttpBridgeFactory::~HttpBridgeFactory() {
}
-csync::HttpPostProviderInterface* HttpBridgeFactory::Create() {
+syncer::HttpPostProviderInterface* HttpBridgeFactory::Create() {
HttpBridge* http = new HttpBridge(request_context_getter_);
http->AddRef();
return http;
}
-void HttpBridgeFactory::Destroy(csync::HttpPostProviderInterface* http) {
+void HttpBridgeFactory::Destroy(syncer::HttpPostProviderInterface* http) {
static_cast<HttpBridge*>(http)->Release();
}
diff --git a/sync/internal_api/js_mutation_event_observer.cc b/sync/internal_api/js_mutation_event_observer.cc
index dc57f295..02f5837 100644
--- a/sync/internal_api/js_mutation_event_observer.cc
+++ b/sync/internal_api/js_mutation_event_observer.cc
@@ -13,7 +13,7 @@
#include "sync/js/js_event_details.h"
#include "sync/js/js_event_handler.h"
-namespace csync {
+namespace syncer {
JsMutationEventObserver::JsMutationEventObserver()
: weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {}
@@ -46,7 +46,7 @@ const size_t kChangeLimit = 100;
void JsMutationEventObserver::OnChangesApplied(
syncable::ModelType model_type,
int64 write_transaction_id,
- const csync::ImmutableChangeRecordList& changes) {
+ const syncer::ImmutableChangeRecordList& changes) {
if (!event_handler_.IsInitialized()) {
return;
}
@@ -58,7 +58,7 @@ void JsMutationEventObserver::OnChangesApplied(
const size_t changes_size = changes.Get().size();
if (changes_size <= kChangeLimit) {
ListValue* changes_list = new ListValue();
- for (csync::ChangeRecordList::const_iterator it =
+ for (syncer::ChangeRecordList::const_iterator it =
changes.Get().begin(); it != changes.Get().end(); ++it) {
changes_list->Append(it->ToValue());
}
@@ -109,4 +109,4 @@ void JsMutationEventObserver::HandleJsEvent(
&JsEventHandler::HandleJsEvent, name, details);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/js_mutation_event_observer.h b/sync/internal_api/js_mutation_event_observer.h
index eb0dc8e..18f6e32 100644
--- a/sync/internal_api/js_mutation_event_observer.h
+++ b/sync/internal_api/js_mutation_event_observer.h
@@ -20,7 +20,7 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
class JsEventDetails;
class JsEventHandler;
@@ -28,7 +28,7 @@ class JsEventHandler;
// Observes all change- and transaction-related events and routes a
// summarized version to a JsEventHandler.
class JsMutationEventObserver
- : public csync::SyncManager::ChangeObserver,
+ : public syncer::SyncManager::ChangeObserver,
public syncable::TransactionObserver,
public base::NonThreadSafe {
public:
@@ -42,11 +42,11 @@ class JsMutationEventObserver
void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler);
- // csync::SyncManager::ChangeObserver implementation.
+ // syncer::SyncManager::ChangeObserver implementation.
virtual void OnChangesApplied(
syncable::ModelType model_type,
int64 write_transaction_id,
- const csync::ImmutableChangeRecordList& changes) OVERRIDE;
+ const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
virtual void OnChangesComplete(syncable::ModelType model_type) OVERRIDE;
// syncable::TransactionObserver implementation.
@@ -65,6 +65,6 @@ class JsMutationEventObserver
DISALLOW_COPY_AND_ASSIGN(JsMutationEventObserver);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_
diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc
index 6bb07c3..2373349 100644
--- a/sync/internal_api/js_mutation_event_observer_unittest.cc
+++ b/sync/internal_api/js_mutation_event_observer_unittest.cc
@@ -13,7 +13,7 @@
#include "sync/js/js_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
using ::testing::InSequence;
@@ -46,22 +46,22 @@ TEST_F(JsMutationEventObserverTest, OnChangesApplied) {
// We don't test with passwords as that requires additional setup.
// Build a list of example ChangeRecords.
- csync::ChangeRecord changes[syncable::MODEL_TYPE_COUNT];
+ syncer::ChangeRecord changes[syncable::MODEL_TYPE_COUNT];
for (int i = syncable::AUTOFILL_PROFILE;
i < syncable::MODEL_TYPE_COUNT; ++i) {
changes[i].id = i;
switch (i % 3) {
case 0:
changes[i].action =
- csync::ChangeRecord::ACTION_ADD;
+ syncer::ChangeRecord::ACTION_ADD;
break;
case 1:
changes[i].action =
- csync::ChangeRecord::ACTION_UPDATE;
+ syncer::ChangeRecord::ACTION_UPDATE;
break;
default:
changes[i].action =
- csync::ChangeRecord::ACTION_DELETE;
+ syncer::ChangeRecord::ACTION_DELETE;
break;
}
}
@@ -91,11 +91,11 @@ TEST_F(JsMutationEventObserverTest, OnChangesApplied) {
// Fire OnChangesApplied() for each data type.
for (int i = syncable::AUTOFILL_PROFILE;
i < syncable::MODEL_TYPE_COUNT; ++i) {
- csync::ChangeRecordList
+ syncer::ChangeRecordList
local_changes(changes + i, changes + arraysize(changes));
js_mutation_event_observer_.OnChangesApplied(
syncable::ModelTypeFromInt(i),
- 0, csync::ImmutableChangeRecordList(&local_changes));
+ 0, syncer::ImmutableChangeRecordList(&local_changes));
}
PumpLoop();
@@ -124,4 +124,4 @@ TEST_F(JsMutationEventObserverTest, OnChangesComplete) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc
index 21a3ad2..70b4e48 100644
--- a/sync/internal_api/js_sync_manager_observer.cc
+++ b/sync/internal_api/js_sync_manager_observer.cc
@@ -18,9 +18,9 @@
#include "sync/js/js_event_handler.h"
#include "sync/sessions/session_state.h"
-namespace csync {
+namespace syncer {
-using csync::SyncProtocolError;
+using syncer::SyncProtocolError;
JsSyncManagerObserver::JsSyncManagerObserver() {}
@@ -42,12 +42,12 @@ void JsSyncManagerObserver::OnSyncCycleCompleted(
}
void JsSyncManagerObserver::OnConnectionStatusChange(
- csync::ConnectionStatus status) {
+ syncer::ConnectionStatus status) {
if (!event_handler_.IsInitialized()) {
return;
}
DictionaryValue details;
- details.SetString("status", csync::ConnectionStatusToString(status));
+ details.SetString("status", syncer::ConnectionStatusToString(status));
HandleJsEvent(FROM_HERE,
"onConnectionStatusChange", JsEventDetails(&details));
}
@@ -62,14 +62,14 @@ void JsSyncManagerObserver::OnUpdatedToken(const std::string& token) {
}
void JsSyncManagerObserver::OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) {
if (!event_handler_.IsInitialized()) {
return;
}
DictionaryValue details;
details.SetString("reason",
- csync::PassphraseRequiredReasonToString(reason));
+ syncer::PassphraseRequiredReasonToString(reason));
HandleJsEvent(FROM_HERE, "onPassphraseRequired", JsEventDetails(&details));
}
@@ -153,4 +153,4 @@ void JsSyncManagerObserver::HandleJsEvent(
&JsEventHandler::HandleJsEvent, name, details);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_manager_observer.h
index 75e5691..918eab5 100644
--- a/sync/internal_api/js_sync_manager_observer.h
+++ b/sync/internal_api/js_sync_manager_observer.h
@@ -18,27 +18,27 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
class JsEventDetails;
class JsEventHandler;
// Routes SyncManager events to a JsEventHandler.
-class JsSyncManagerObserver : public csync::SyncManager::Observer {
+class JsSyncManagerObserver : public syncer::SyncManager::Observer {
public:
JsSyncManagerObserver();
virtual ~JsSyncManagerObserver();
void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler);
- // csync::SyncManager::Observer implementation.
+ // syncer::SyncManager::Observer implementation.
virtual void OnSyncCycleCompleted(
const sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
virtual void OnConnectionStatusChange(
- csync::ConnectionStatus status) OVERRIDE;
+ syncer::ConnectionStatus status) OVERRIDE;
virtual void OnUpdatedToken(const std::string& token) OVERRIDE;
virtual void OnPassphraseRequired(
- csync::PassphraseRequiredReason reason,
+ syncer::PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) OVERRIDE;
virtual void OnPassphraseAccepted() OVERRIDE;
virtual void OnBootstrapTokenUpdated(
@@ -51,7 +51,7 @@ class JsSyncManagerObserver : public csync::SyncManager::Observer {
const WeakHandle<JsBackend>& js_backend, bool success) OVERRIDE;
virtual void OnStopSyncingPermanently() OVERRIDE;
virtual void OnActionableError(
- const csync::SyncProtocolError& sync_protocol_error) OVERRIDE;
+ const syncer::SyncProtocolError& sync_protocol_error) OVERRIDE;
private:
void HandleJsEvent(const tracked_objects::Location& from_here,
@@ -62,6 +62,6 @@ class JsSyncManagerObserver : public csync::SyncManager::Observer {
DISALLOW_COPY_AND_ASSIGN(JsSyncManagerObserver);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_
diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc
index 1693264..95f4e23 100644
--- a/sync/internal_api/js_sync_manager_observer_unittest.cc
+++ b/sync/internal_api/js_sync_manager_observer_unittest.cc
@@ -16,7 +16,7 @@
#include "sync/protocol/sync_protocol_error.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
using ::testing::InSequence;
@@ -92,9 +92,9 @@ TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) {
}
TEST_F(JsSyncManagerObserverTest, OnActionableError) {
- csync::SyncProtocolError sync_error;
- sync_error.action = csync::CLEAR_USER_DATA_AND_RESYNC;
- sync_error.error_type = csync::TRANSIENT_ERROR;
+ syncer::SyncProtocolError sync_error;
+ sync_error.action = syncer::CLEAR_USER_DATA_AND_RESYNC;
+ sync_error.error_type = syncer::TRANSIENT_ERROR;
DictionaryValue expected_details;
expected_details.Set("syncError", sync_error.ToValue());
@@ -108,11 +108,11 @@ TEST_F(JsSyncManagerObserverTest, OnActionableError) {
TEST_F(JsSyncManagerObserverTest, OnConnectionStatusChange) {
- const csync::ConnectionStatus kStatus =
- csync::CONNECTION_AUTH_ERROR;
+ const syncer::ConnectionStatus kStatus =
+ syncer::CONNECTION_AUTH_ERROR;
DictionaryValue expected_details;
expected_details.SetString("status",
- csync::ConnectionStatusToString(kStatus));
+ syncer::ConnectionStatusToString(kStatus));
EXPECT_CALL(mock_js_event_handler_,
HandleJsEvent("onConnectionStatusChange",
@@ -131,14 +131,14 @@ TEST_F(JsSyncManagerObserverTest, OnPassphraseRequired) {
reason_passphrase_not_required_details.SetString(
"reason",
- csync::PassphraseRequiredReasonToString(
- csync::REASON_PASSPHRASE_NOT_REQUIRED));
+ syncer::PassphraseRequiredReasonToString(
+ syncer::REASON_PASSPHRASE_NOT_REQUIRED));
reason_encryption_details.SetString(
"reason",
- csync::PassphraseRequiredReasonToString(csync::REASON_ENCRYPTION));
+ syncer::PassphraseRequiredReasonToString(syncer::REASON_ENCRYPTION));
reason_decryption_details.SetString(
"reason",
- csync::PassphraseRequiredReasonToString(csync::REASON_DECRYPTION));
+ syncer::PassphraseRequiredReasonToString(syncer::REASON_DECRYPTION));
EXPECT_CALL(mock_js_event_handler_,
HandleJsEvent("onPassphraseRequired",
@@ -152,11 +152,11 @@ TEST_F(JsSyncManagerObserverTest, OnPassphraseRequired) {
HasDetailsAsDictionary(reason_decryption_details)));
js_sync_manager_observer_.OnPassphraseRequired(
- csync::REASON_PASSPHRASE_NOT_REQUIRED,
+ syncer::REASON_PASSPHRASE_NOT_REQUIRED,
sync_pb::EncryptedData());
- js_sync_manager_observer_.OnPassphraseRequired(csync::REASON_ENCRYPTION,
+ js_sync_manager_observer_.OnPassphraseRequired(syncer::REASON_ENCRYPTION,
sync_pb::EncryptedData());
- js_sync_manager_observer_.OnPassphraseRequired(csync::REASON_DECRYPTION,
+ js_sync_manager_observer_.OnPassphraseRequired(syncer::REASON_DECRYPTION,
sync_pb::EncryptedData());
PumpLoop();
}
@@ -206,4 +206,4 @@ TEST_F(JsSyncManagerObserverTest, OnEncryptedTypesChanged) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/base_node.h b/sync/internal_api/public/base_node.h
index dfcd2a8..4b1924f 100644
--- a/sync/internal_api/public/base_node.h
+++ b/sync/internal_api/public/base_node.h
@@ -42,7 +42,7 @@ class ThemeSpecifics;
class TypedUrlSpecifics;
}
-namespace csync {
+namespace syncer {
class BaseTransaction;
@@ -250,6 +250,6 @@ class BaseNode {
DISALLOW_COPY_AND_ASSIGN(BaseNode);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
diff --git a/sync/internal_api/public/base_transaction.h b/sync/internal_api/public/base_transaction.h
index 6e96a04..067239b 100644
--- a/sync/internal_api/public/base_transaction.h
+++ b/sync/internal_api/public/base_transaction.h
@@ -15,7 +15,7 @@ class BaseTransaction;
class Directory;
}
-namespace csync {
+namespace syncer {
// Sync API's BaseTransaction, ReadTransaction, and WriteTransaction allow for
// batching of several read and/or write operations. The read and write
@@ -28,7 +28,7 @@ class BaseTransaction {
public:
// Provide access to the underlying syncable objects from BaseNode.
virtual syncable::BaseTransaction* GetWrappedTrans() const = 0;
- csync::Cryptographer* GetCryptographer() const;
+ syncer::Cryptographer* GetCryptographer() const;
syncable::Directory* GetDirectory() const {
return directory_;
@@ -47,8 +47,8 @@ class BaseTransaction {
};
syncable::ModelTypeSet GetEncryptedTypes(
- const csync::BaseTransaction* trans);
+ const syncer::BaseTransaction* trans);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_
diff --git a/sync/internal_api/public/change_record.h b/sync/internal_api/public/change_record.h
index 90a21a0..5b27285 100644
--- a/sync/internal_api/public/change_record.h
+++ b/sync/internal_api/public/change_record.h
@@ -17,7 +17,7 @@ namespace base {
class DictionaryValue;
} // namespace base
-namespace csync {
+namespace syncer {
// TODO(zea): One day get passwords playing nicely with the rest of encryption
// and get rid of this.
@@ -60,8 +60,8 @@ struct ChangeRecord {
typedef std::vector<ChangeRecord> ChangeRecordList;
-typedef csync::Immutable<ChangeRecordList> ImmutableChangeRecordList;
+typedef syncer::Immutable<ChangeRecordList> ImmutableChangeRecordList;
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_CHANGE_RECORD_H_
diff --git a/sync/internal_api/public/change_record_unittest.cc b/sync/internal_api/public/change_record_unittest.cc
index 132a880..b46ab99 100644
--- a/sync/internal_api/public/change_record_unittest.cc
+++ b/sync/internal_api/public/change_record_unittest.cc
@@ -14,7 +14,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
using base::ExpectDictDictionaryValue;
@@ -61,7 +61,7 @@ void CheckChangeRecordValue(
EXPECT_TRUE(Value::Equals(extra_value, expected_extra_value.get()));
scoped_ptr<DictionaryValue> expected_specifics_value(
- csync::EntitySpecificsToValue(record.specifics));
+ syncer::EntitySpecificsToValue(record.specifics));
ExpectDictDictionaryValue(*expected_specifics_value,
value, "specifics");
}
@@ -134,4 +134,4 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/configure_reason.h b/sync/internal_api/public/configure_reason.h
index 934c0e9..be77472 100644
--- a/sync/internal_api/public/configure_reason.h
+++ b/sync/internal_api/public/configure_reason.h
@@ -6,7 +6,7 @@
#define SYNC_INTERNAL_API_PUBLIC_CONFIGURE_REASON_H_
#pragma once
-namespace csync {
+namespace syncer {
// Note: This should confirm with the enums in sync.proto for
// GetUpdatesCallerInfo. They will have 1:1 mapping but this will only map
@@ -31,6 +31,6 @@ enum ConfigureReason {
CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE,
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_CONFIGURE_REASON_H_
diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc
index f82b451..0bde89b 100644
--- a/sync/internal_api/public/engine/model_safe_worker.cc
+++ b/sync/internal_api/public/engine/model_safe_worker.cc
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-namespace csync {
+namespace syncer {
base::DictionaryValue* ModelSafeRoutingInfoToValue(
const ModelSafeRoutingInfo& routing_info) {
@@ -72,4 +72,4 @@ std::string ModelSafeGroupToString(ModelSafeGroup group) {
ModelSafeWorker::~ModelSafeWorker() {}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h
index e1d6563..a78a322 100644
--- a/sync/internal_api/public/engine/model_safe_worker.h
+++ b/sync/internal_api/public/engine/model_safe_worker.h
@@ -19,7 +19,7 @@ namespace base {
class DictionaryValue;
} // namespace
-namespace csync {
+namespace syncer {
typedef base::Callback<enum SyncerError(void)> WorkCallback;
@@ -82,6 +82,6 @@ syncable::ModelTypeSet GetRoutingInfoTypes(
ModelSafeGroup GetGroupForModelType(const syncable::ModelType type,
const ModelSafeRoutingInfo& routes);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_
diff --git a/sync/internal_api/public/engine/model_safe_worker_unittest.cc b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
index a8580e1..550c1b2 100644
--- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc
+++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
@@ -8,7 +8,7 @@
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
class ModelSafeWorkerTest : public ::testing::Test {
@@ -52,4 +52,4 @@ TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/engine/passive_model_worker.cc b/sync/internal_api/public/engine/passive_model_worker.cc
index f33488e..10d20ee 100644
--- a/sync/internal_api/public/engine/passive_model_worker.cc
+++ b/sync/internal_api/public/engine/passive_model_worker.cc
@@ -6,7 +6,7 @@
#include "base/message_loop.h"
-namespace csync {
+namespace syncer {
PassiveModelWorker::PassiveModelWorker(const MessageLoop* sync_loop)
: sync_loop_(sync_loop) {}
@@ -25,4 +25,4 @@ ModelSafeGroup PassiveModelWorker::GetModelSafeGroup() {
return GROUP_PASSIVE;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/engine/passive_model_worker.h b/sync/internal_api/public/engine/passive_model_worker.h
index bb0870a..1ef9864 100644
--- a/sync/internal_api/public/engine/passive_model_worker.h
+++ b/sync/internal_api/public/engine/passive_model_worker.h
@@ -13,7 +13,7 @@
class MessageLoop;
-namespace csync {
+namespace syncer {
// Implementation of ModelSafeWorker for passive types. All work is
// done on the same thread DoWorkAndWaitUntilDone (i.e., the sync
@@ -35,6 +35,6 @@ class PassiveModelWorker : public ModelSafeWorker {
DISALLOW_COPY_AND_ASSIGN(PassiveModelWorker);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_
diff --git a/sync/internal_api/public/engine/polling_constants.cc b/sync/internal_api/public/engine/polling_constants.cc
index bebf180..d65994b 100644
--- a/sync/internal_api/public/engine/polling_constants.cc
+++ b/sync/internal_api/public/engine/polling_constants.cc
@@ -5,7 +5,7 @@
#include "base/basictypes.h"
#include "sync/internal_api/public/engine/polling_constants.h"
-namespace csync {
+namespace syncer {
// Server can overwrite these values via client commands.
// Standard short poll. This is used when XMPP is off.
@@ -22,5 +22,5 @@ const int64 kMaxBackoffSeconds = 60 * 60 * 4; // 4 hours.
// Backoff interval randomization factor.
const int kBackoffRandomizationFactor = 2;
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/engine/polling_constants.h b/sync/internal_api/public/engine/polling_constants.h
index cb7f5f5..94b375b 100644
--- a/sync/internal_api/public/engine/polling_constants.h
+++ b/sync/internal_api/public/engine/polling_constants.h
@@ -8,13 +8,13 @@
#define SYNC_INTERNAL_API_PUBLIC_ENGINE_POLLING_CONSTANTS_H_
#pragma once
-namespace csync {
+namespace syncer {
extern const int64 kDefaultShortPollIntervalSeconds;
extern const int64 kDefaultLongPollIntervalSeconds;
extern const int64 kMaxBackoffSeconds;
extern const int kBackoffRandomizationFactor;
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_POLLING_CONSTANTS_H_
diff --git a/sync/internal_api/public/engine/sync_status.cc b/sync/internal_api/public/engine/sync_status.cc
index 7d17269..9ed3bf3 100644
--- a/sync/internal_api/public/engine/sync_status.cc
+++ b/sync/internal_api/public/engine/sync_status.cc
@@ -4,7 +4,7 @@
#include "sync/internal_api/public/engine/sync_status.h"
-namespace csync {
+namespace syncer {
SyncStatus::SyncStatus()
: notifications_enabled(false),
@@ -36,4 +36,4 @@ SyncStatus::SyncStatus()
SyncStatus::~SyncStatus() {
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h
index 3ded90c..cb15adc 100644
--- a/sync/internal_api/public/engine/sync_status.h
+++ b/sync/internal_api/public/engine/sync_status.h
@@ -10,7 +10,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
-namespace csync {
+namespace syncer {
// Status encapsulates detailed state about the internals of the SyncManager.
//
@@ -29,7 +29,7 @@ struct SyncStatus {
// Notifications counters updated by the actions in synapi.
int notifications_received;
- csync::SyncProtocolError sync_protocol_error;
+ syncer::SyncProtocolError sync_protocol_error;
// Number of encryption conflicts counted during most recent sync cycle.
int encryption_conflicts;
@@ -91,6 +91,6 @@ struct SyncStatus {
std::string unique_id;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_STATUS_SUMMARY_H_
diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h
index cec5526..74eaa2c 100644
--- a/sync/internal_api/public/http_bridge.h
+++ b/sync/internal_api/public/http_bridge.h
@@ -38,7 +38,7 @@ namespace browser_sync {
// It is RefCountedThreadSafe because it can PostTask to the io loop, and thus
// needs to stick around across context switches, etc.
class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
- public csync::HttpPostProviderInterface,
+ public syncer::HttpPostProviderInterface,
public net::URLFetcherDelegate {
public:
// A request context used for HTTP requests bridged from the sync backend.
@@ -98,7 +98,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
explicit HttpBridge(RequestContextGetter* context);
- // csync::HttpPostProvider implementation.
+ // syncer::HttpPostProvider implementation.
virtual void SetExtraRequestHeaders(const char* headers) OVERRIDE;
virtual void SetURL(const char* url, int port) OVERRIDE;
virtual void SetPostPayload(const char* content_type, int content_length,
@@ -205,16 +205,16 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
DISALLOW_COPY_AND_ASSIGN(HttpBridge);
};
-class HttpBridgeFactory : public csync::HttpPostProviderFactory {
+class HttpBridgeFactory : public syncer::HttpPostProviderFactory {
public:
HttpBridgeFactory(
net::URLRequestContextGetter* baseline_context_getter,
const std::string& user_agent);
virtual ~HttpBridgeFactory();
- // csync::HttpPostProviderFactory:
- virtual csync::HttpPostProviderInterface* Create() OVERRIDE;
- virtual void Destroy(csync::HttpPostProviderInterface* http) OVERRIDE;
+ // syncer::HttpPostProviderFactory:
+ virtual syncer::HttpPostProviderInterface* Create() OVERRIDE;
+ virtual void Destroy(syncer::HttpPostProviderInterface* http) OVERRIDE;
private:
// This request context is built on top of the baseline context and shares
diff --git a/sync/internal_api/public/http_post_provider_factory.h b/sync/internal_api/public/http_post_provider_factory.h
index 709008d..8c5a991 100644
--- a/sync/internal_api/public/http_post_provider_factory.h
+++ b/sync/internal_api/public/http_post_provider_factory.h
@@ -6,7 +6,7 @@
#define SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_
#pragma once
-namespace csync {
+namespace syncer {
class HttpPostProviderInterface;
@@ -29,6 +29,6 @@ class HttpPostProviderFactory {
virtual void Destroy(HttpPostProviderInterface* http) = 0;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_
diff --git a/sync/internal_api/public/http_post_provider_interface.h b/sync/internal_api/public/http_post_provider_interface.h
index 378e18f..3f5e74e 100644
--- a/sync/internal_api/public/http_post_provider_interface.h
+++ b/sync/internal_api/public/http_post_provider_interface.h
@@ -8,7 +8,7 @@
#include <string>
-namespace csync {
+namespace syncer {
// An interface the embedding application (e.g. Chromium) implements to provide
// required HTTP POST functionality to the syncer backend. This interface is
@@ -58,6 +58,6 @@ class HttpPostProviderInterface {
virtual ~HttpPostProviderInterface() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_INTERFACE_H_
diff --git a/sync/internal_api/public/read_node.h b/sync/internal_api/public/read_node.h
index a4bd40f..c2a9428 100644
--- a/sync/internal_api/public/read_node.h
+++ b/sync/internal_api/public/read_node.h
@@ -13,7 +13,7 @@
#include "sync/internal_api/public/base_node.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
// ReadNode wraps a syncable::Entry to provide the functionality of a
// read-only BaseNode.
@@ -61,6 +61,6 @@ class ReadNode : public BaseNode {
DISALLOW_COPY_AND_ASSIGN(ReadNode);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_READ_NODE_H_
diff --git a/sync/internal_api/public/read_transaction.h b/sync/internal_api/public/read_transaction.h
index ba5610b..b7bcff3 100644
--- a/sync/internal_api/public/read_transaction.h
+++ b/sync/internal_api/public/read_transaction.h
@@ -12,7 +12,7 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
struct UserShare;
@@ -41,6 +41,6 @@ class ReadTransaction : public BaseTransaction {
DISALLOW_COPY_AND_ASSIGN(ReadTransaction);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_
diff --git a/sync/internal_api/public/sessions/model_neutral_state.cc b/sync/internal_api/public/sessions/model_neutral_state.cc
index 82d9a35..b25d3c7 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.cc
+++ b/sync/internal_api/public/sessions/model_neutral_state.cc
@@ -4,7 +4,7 @@
#include "sync/internal_api/public/sessions/model_neutral_state.h"
-namespace csync {
+namespace syncer {
namespace sessions {
ModelNeutralState::ModelNeutralState()
@@ -26,4 +26,4 @@ ModelNeutralState::ModelNeutralState()
ModelNeutralState::~ModelNeutralState() {}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h
index c9f93c8..fa127b0 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.h
+++ b/sync/internal_api/public/sessions/model_neutral_state.h
@@ -11,7 +11,7 @@
#include "sync/protocol/sync.pb.h"
#include "sync/protocol/sync_protocol_error.h"
-namespace csync {
+namespace syncer {
namespace sessions {
// Grouping of all state that applies to all model types. Note that some
@@ -69,6 +69,6 @@ struct ModelNeutralState {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index 6c6de86..74fba25 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -7,7 +7,7 @@
#include "base/json/json_writer.h"
#include "base/values.h"
-namespace csync {
+namespace syncer {
namespace sessions {
SyncSessionSnapshot::SyncSessionSnapshot()
@@ -170,4 +170,4 @@ bool SyncSessionSnapshot::retry_scheduled() const {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h
index 1ec188f..9029132 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.h
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.h
@@ -19,7 +19,7 @@ namespace base {
class DictionaryValue;
}
-namespace csync {
+namespace syncer {
namespace sessions {
// An immutable snapshot of state from a SyncSession. Convenient to use as
@@ -91,6 +91,6 @@ class SyncSessionSnapshot {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_
diff --git a/sync/internal_api/public/sessions/sync_source_info.cc b/sync/internal_api/public/sessions/sync_source_info.cc
index 1b6d72d..e4536ee 100644
--- a/sync/internal_api/public/sessions/sync_source_info.cc
+++ b/sync/internal_api/public/sessions/sync_source_info.cc
@@ -7,7 +7,7 @@
#include "base/values.h"
#include "sync/protocol/proto_enum_conversions.h"
-namespace csync {
+namespace syncer {
namespace sessions {
SyncSourceInfo::SyncSourceInfo()
@@ -33,4 +33,4 @@ DictionaryValue* SyncSourceInfo::ToValue() const {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/sessions/sync_source_info.h b/sync/internal_api/public/sessions/sync_source_info.h
index cbd66d0..6902b26 100644
--- a/sync/internal_api/public/sessions/sync_source_info.h
+++ b/sync/internal_api/public/sessions/sync_source_info.h
@@ -15,7 +15,7 @@ namespace base {
class DictionaryValue;
}
-namespace csync {
+namespace syncer {
namespace sessions {
// A container for the source of a sync session. This includes the update
@@ -37,6 +37,6 @@ struct SyncSourceInfo {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SOURCE_INFO_H_
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index 3a2cf2e..3b7164d 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -25,7 +25,7 @@
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/protocol/sync_protocol_error.h"
-namespace csync {
+namespace syncer {
class Encryptor;
struct Experiments;
class ExtensionsActivityMonitor;
@@ -35,17 +35,17 @@ class JsEventHandler;
namespace sessions {
class SyncSessionSnapshot;
} // namespace sessions
-} // namespace csync
+} // namespace syncer
-namespace csync {
+namespace syncer {
class SyncNotifier;
-} // namespace csync
+} // namespace syncer
namespace sync_pb {
class EncryptedData;
} // namespace sync_pb
-namespace csync {
+namespace syncer {
class BaseTransaction;
class HttpPostProviderFactory;
@@ -58,7 +58,7 @@ enum ConnectionStatus {
CONNECTION_SERVER_ERROR
};
-// Reasons due to which csync::Cryptographer might require a passphrase.
+// Reasons due to which syncer::Cryptographer might require a passphrase.
enum PassphraseRequiredReason {
REASON_PASSPHRASE_NOT_REQUIRED = 0, // Initial value.
REASON_ENCRYPTION = 1, // The cryptographer requires a
@@ -184,7 +184,7 @@ class SyncManager {
// A round-trip sync-cycle took place and the syncer has resolved any
// conflicts that may have arisen.
virtual void OnSyncCycleCompleted(
- const csync::sessions::SyncSessionSnapshot& snapshot) = 0;
+ const syncer::sessions::SyncSessionSnapshot& snapshot) = 0;
// Called when the status of the connection to the sync server has
// changed.
@@ -300,7 +300,7 @@ class SyncManager {
// function getChildNodeIds(id);
virtual void OnInitializationComplete(
- const csync::WeakHandle<csync::JsBackend>&
+ const syncer::WeakHandle<syncer::JsBackend>&
js_backend, bool success) = 0;
// We are no longer permitted to communicate with the server. Sync should
@@ -334,7 +334,7 @@ class SyncManager {
virtual void OnEncryptionComplete() = 0;
virtual void OnActionableError(
- const csync::SyncProtocolError& sync_protocol_error) = 0;
+ const syncer::SyncProtocolError& sync_protocol_error) = 0;
protected:
virtual ~Observer();
@@ -372,26 +372,26 @@ class SyncManager {
// TODO(akalin): Replace the |post_factory| parameter with a
// URLFetcher parameter.
bool Init(const FilePath& database_location,
- const csync::WeakHandle<csync::JsEventHandler>&
+ const syncer::WeakHandle<syncer::JsEventHandler>&
event_handler,
const std::string& sync_server_and_path,
int sync_server_port,
bool use_ssl,
const scoped_refptr<base::TaskRunner>& blocking_task_runner,
HttpPostProviderFactory* post_factory,
- const csync::ModelSafeRoutingInfo& model_safe_routing_info,
- const std::vector<csync::ModelSafeWorker*>& workers,
- csync::ExtensionsActivityMonitor*
+ const syncer::ModelSafeRoutingInfo& model_safe_routing_info,
+ const std::vector<syncer::ModelSafeWorker*>& workers,
+ syncer::ExtensionsActivityMonitor*
extensions_activity_monitor,
ChangeDelegate* change_delegate,
const SyncCredentials& credentials,
- csync::SyncNotifier* sync_notifier,
+ syncer::SyncNotifier* sync_notifier,
const std::string& restored_key_for_bootstrapping,
TestingMode testing_mode,
- csync::Encryptor* encryptor,
- csync::UnrecoverableErrorHandler*
+ syncer::Encryptor* encryptor,
+ syncer::UnrecoverableErrorHandler*
unrecoverable_error_handler,
- csync::ReportUnrecoverableErrorFunction
+ syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function);
// Throw an unrecoverable error from a transaction (mostly used for
@@ -409,7 +409,7 @@ class SyncManager {
// Put the syncer in normal mode ready to perform nudges and polls.
void StartSyncingNormally(
- const csync::ModelSafeRoutingInfo& routing_info);
+ const syncer::ModelSafeRoutingInfo& routing_info);
// Attempts to re-encrypt encrypted data types using the passphrase provided.
// Notifies observers of the result of the operation via OnPassphraseAccepted
@@ -436,12 +436,12 @@ class SyncManager {
// Switches the mode of operation to CONFIGURATION_MODE and
// schedules a config task to fetch updates for |types|.
- void RequestConfig(const csync::ModelSafeRoutingInfo& routing_info,
+ void RequestConfig(const syncer::ModelSafeRoutingInfo& routing_info,
const syncable::ModelTypeSet& types,
- csync::ConfigureReason reason);
+ syncer::ConfigureReason reason);
void RequestCleanupDisabledTypes(
- const csync::ModelSafeRoutingInfo& routing_info);
+ const syncer::ModelSafeRoutingInfo& routing_info);
// Adds a listener to be notified of sync events.
// NOTE: It is OK (in fact, it's probably a good idea) to call this before
@@ -516,7 +516,7 @@ class SyncManager {
// Reads the nigori node to determine if any experimental features should
// be enabled.
// Note: opens a transaction. May be called on any thread.
- bool ReceivedExperiment(csync::Experiments* experiments) const;
+ bool ReceivedExperiment(syncer::Experiments* experiments) const;
// Uses a read-only transaction to determine if the directory being synced has
// any remaining unsynced items. May be called on any thread.
@@ -555,13 +555,13 @@ bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share);
syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
syncable::ModelTypeSet types,
- csync::UserShare* share);
+ syncer::UserShare* share);
const char* ConnectionStatusToString(ConnectionStatus status);
// Returns the string representation of a PassphraseRequiredReason value.
const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
diff --git a/sync/internal_api/public/syncable/model_type.h b/sync/internal_api/public/syncable/model_type.h
index c8a9905..e134ee6 100644
--- a/sync/internal_api/public/syncable/model_type.h
+++ b/sync/internal_api/public/syncable/model_type.h
@@ -90,9 +90,9 @@ enum ModelType {
MODEL_TYPE_COUNT,
};
-typedef csync::EnumSet<
+typedef syncer::EnumSet<
ModelType, FIRST_REAL_MODEL_TYPE, LAST_REAL_MODEL_TYPE> ModelTypeSet;
-typedef csync::EnumSet<
+typedef syncer::EnumSet<
ModelType, UNSPECIFIED, LAST_REAL_MODEL_TYPE> FullModelTypeSet;
inline ModelType ModelTypeFromInt(int i) {
diff --git a/sync/internal_api/public/syncable/model_type_payload_map.cc b/sync/internal_api/public/syncable/model_type_payload_map.cc
index b803b39..97646b7c 100644
--- a/sync/internal_api/public/syncable/model_type_payload_map.cc
+++ b/sync/internal_api/public/syncable/model_type_payload_map.cc
@@ -11,7 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-using csync::ModelSafeRoutingInfo;
+using syncer::ModelSafeRoutingInfo;
namespace syncable {
ModelTypePayloadMap ModelTypePayloadMapFromEnumSet(
@@ -36,10 +36,10 @@ ModelTypeSet ModelTypePayloadMapToEnumSet(
}
ModelTypePayloadMap ModelTypePayloadMapFromRoutingInfo(
- const csync::ModelSafeRoutingInfo& routes,
+ const syncer::ModelSafeRoutingInfo& routes,
const std::string& payload) {
ModelTypePayloadMap types_with_payloads;
- for (csync::ModelSafeRoutingInfo::const_iterator i = routes.begin();
+ for (syncer::ModelSafeRoutingInfo::const_iterator i = routes.begin();
i != routes.end(); ++i) {
types_with_payloads[i->first] = payload;
}
diff --git a/sync/internal_api/public/syncable/model_type_payload_map.h b/sync/internal_api/public/syncable/model_type_payload_map.h
index 8f3319a..5ea9919 100644
--- a/sync/internal_api/public/syncable/model_type_payload_map.h
+++ b/sync/internal_api/public/syncable/model_type_payload_map.h
@@ -37,7 +37,7 @@ ModelTypeSet ModelTypePayloadMapToEnumSet(
// Make a TypePayloadMap for all the enabled types in a
// ModelSafeRoutingInfo using a default payload.
ModelTypePayloadMap ModelTypePayloadMapFromRoutingInfo(
- const csync::ModelSafeRoutingInfo& routes,
+ const syncer::ModelSafeRoutingInfo& routes,
const std::string& payload);
std::string ModelTypePayloadMapToString(
@@ -53,7 +53,7 @@ void CoalescePayloads(ModelTypePayloadMap* original,
const ModelTypePayloadMap& update);
void PurgeStalePayload(ModelTypePayloadMap* original,
- const csync::ModelSafeRoutingInfo& routing_info);
+ const syncer::ModelSafeRoutingInfo& routing_info);
} // namespace syncable
diff --git a/sync/internal_api/public/test/test_entry_factory.h b/sync/internal_api/public/test/test_entry_factory.h
index 9eed71d..bb96f2f 100644
--- a/sync/internal_api/public/test/test_entry_factory.h
+++ b/sync/internal_api/public/test/test_entry_factory.h
@@ -16,7 +16,7 @@ class Directory;
class Id;
}
-namespace csync {
+namespace syncer {
class TestEntryFactory {
public:
@@ -65,6 +65,6 @@ class TestEntryFactory {
DISALLOW_COPY_AND_ASSIGN(TestEntryFactory);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_TEST_ENTRY_FACTORY_H_
diff --git a/sync/internal_api/public/test/test_user_share.h b/sync/internal_api/public/test/test_user_share.h
index 3c11d49..0fb1503 100644
--- a/sync/internal_api/public/test/test_user_share.h
+++ b/sync/internal_api/public/test/test_user_share.h
@@ -3,7 +3,7 @@
// found in the LICENSE file.
//
// A handy class that takes care of setting up and destroying a
-// csync::UserShare instance for unit tests that require one.
+// syncer::UserShare instance for unit tests that require one.
//
// The expected usage is to make this a component of your test fixture:
//
@@ -22,7 +22,7 @@
// Then, in your tests:
//
// TEST_F(AwesomenessTest, IsMaximal) {
-// csync::ReadTransaction trans(test_user_share_.user_share());
+// syncer::ReadTransaction trans(test_user_share_.user_share());
// ...
// }
//
@@ -34,7 +34,7 @@
#include "base/basictypes.h"
#include "sync/internal_api/public/user_share.h"
-namespace csync {
+namespace syncer {
class TestDirectorySetterUpper;
@@ -54,15 +54,15 @@ class TestUserShare {
void TearDown();
// Non-NULL iff called between a call to SetUp() and TearDown().
- csync::UserShare* user_share();
+ syncer::UserShare* user_share();
private:
scoped_ptr<TestDirectorySetterUpper> dir_maker_;
- scoped_ptr<csync::UserShare> user_share_;
+ scoped_ptr<syncer::UserShare> user_share_;
DISALLOW_COPY_AND_ASSIGN(TestUserShare);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_USER_SHARE_H_
diff --git a/sync/internal_api/public/user_share.h b/sync/internal_api/public/user_share.h
index 95eb7f2..d7936a4 100644
--- a/sync/internal_api/public/user_share.h
+++ b/sync/internal_api/public/user_share.h
@@ -14,7 +14,7 @@ namespace syncable {
class Directory;
}
-namespace csync {
+namespace syncer {
// A UserShare encapsulates the syncable pieces that represent an authenticated
// user and their data (share).
@@ -31,6 +31,6 @@ struct UserShare {
std::string name;
};
-}
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_USER_SHARE_H_
diff --git a/sync/internal_api/public/util/enum_set.h b/sync/internal_api/public/util/enum_set.h
index 1a989ed..911ad12 100644
--- a/sync/internal_api/public/util/enum_set.h
+++ b/sync/internal_api/public/util/enum_set.h
@@ -13,7 +13,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
-namespace csync {
+namespace syncer {
// Forward declarations needed for friend declarations.
template <typename E, E MinEnumValue, E MaxEnumValue>
@@ -281,6 +281,6 @@ EnumSet<E, Min, Max> Difference(EnumSet<E, Min, Max> set1,
return EnumSet<E, Min, Max>(set1.enums_ & ~set2.enums_);
}
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_UTIL_ENUM_SET_H_
diff --git a/sync/internal_api/public/util/enum_set_unittest.cc b/sync/internal_api/public/util/enum_set_unittest.cc
index 1f6223c..5f222c6 100644
--- a/sync/internal_api/public/util/enum_set_unittest.cc
+++ b/sync/internal_api/public/util/enum_set_unittest.cc
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
enum TestEnum {
@@ -192,4 +192,4 @@ TEST_F(EnumSetTest, Difference) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/util/experiments.h b/sync/internal_api/public/util/experiments.h
index f13c09a..c6febe8 100644
--- a/sync/internal_api/public/util/experiments.h
+++ b/sync/internal_api/public/util/experiments.h
@@ -8,7 +8,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
// A structure to hold the enable status of experimental sync features.
struct Experiments {
@@ -23,6 +23,6 @@ struct Experiments {
bool sync_tab_favicons;
};
-}
+} // namespace syncer
#endif // SYNC_UTIL_EXPERIMENTS_
diff --git a/sync/internal_api/public/util/immutable.h b/sync/internal_api/public/util/immutable.h
index 3c20a4f..1742c0e 100644
--- a/sync/internal_api/public/util/immutable.h
+++ b/sync/internal_api/public/util/immutable.h
@@ -26,7 +26,7 @@
// undesirable. Here's the above code re-written using Immutable<T>:
//
// void ProcessStuff(
-// const csync::Immutable<LargeObjectList>& stuff) {
+// const syncer::Immutable<LargeObjectList>& stuff) {
// for (LargeObjectList::const_iterator it = stuff.Get().begin();
// it != stuff.Get().end(); ++it) {
// ... process it ...
@@ -72,7 +72,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-namespace csync {
+namespace syncer {
namespace internal {
// This class is part of the Immutable implementation. DO NOT USE
@@ -257,6 +257,6 @@ Immutable<T> MakeImmutable(T* t) {
return Immutable<T>(t);
}
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_IMMUTABLE_H_
diff --git a/sync/internal_api/public/util/immutable_unittest.cc b/sync/internal_api/public/util/immutable_unittest.cc
index e124b70..f8494b6 100644
--- a/sync/internal_api/public/util/immutable_unittest.cc
+++ b/sync/internal_api/public/util/immutable_unittest.cc
@@ -16,7 +16,7 @@
#include "base/memory/ref_counted.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
// Helper class that keeps track of the token passed in at
// construction and how many times that token is copied.
@@ -102,20 +102,20 @@ void swap(ADLToken& t1, ADLToken& t2) {
t1.Swap(&t2);
}
-} // namespace csync
+} // namespace syncer
// Allowed by the standard (17.4.3.1/1).
namespace std {
template <>
-void swap(csync::SpecializationToken& t1,
- csync::SpecializationToken& t2) {
+void swap(syncer::SpecializationToken& t1,
+ syncer::SpecializationToken& t2) {
t1.Swap(&t2);
}
} // namespace
-namespace csync {
+namespace syncer {
namespace {
class ImmutableTest : public ::testing::Test {};
@@ -247,4 +247,4 @@ TEST_F(ImmutableTest, Set) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/util/report_unrecoverable_error_function.h b/sync/internal_api/public/util/report_unrecoverable_error_function.h
index dfe00a8..a6aec0f2 100644
--- a/sync/internal_api/public/util/report_unrecoverable_error_function.h
+++ b/sync/internal_api/public/util/report_unrecoverable_error_function.h
@@ -6,7 +6,7 @@
#define SYNC_UTIL_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
#pragma once
-namespace csync {
+namespace syncer {
// A ReportUnrecoverableErrorFunction is a function that is called
// immediately when an unrecoverable error is encountered. Unlike
@@ -14,6 +14,6 @@ namespace csync {
// context surrounding it.
typedef void (*ReportUnrecoverableErrorFunction)(void);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
diff --git a/sync/internal_api/public/util/syncer_error.cc b/sync/internal_api/public/util/syncer_error.cc
index 57cd4ed..d77821d 100644
--- a/sync/internal_api/public/util/syncer_error.cc
+++ b/sync/internal_api/public/util/syncer_error.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
-namespace csync {
+namespace syncer {
#define ENUM_CASE(x) case x: return #x; break;
const char* GetSyncerErrorString(SyncerError value) {
@@ -32,5 +32,4 @@ const char* GetSyncerErrorString(SyncerError value) {
}
#undef ENUM_CASE
-} // namespace csync
-
+} // namespace syncer
diff --git a/sync/internal_api/public/util/syncer_error.h b/sync/internal_api/public/util/syncer_error.h
index 8df8afd..f895066 100644
--- a/sync/internal_api/public/util/syncer_error.h
+++ b/sync/internal_api/public/util/syncer_error.h
@@ -6,7 +6,7 @@
#define SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_
#pragma once
-namespace csync {
+namespace syncer {
// This enum describes all the ways a SyncerCommand can fail.
//
@@ -41,6 +41,6 @@ enum SyncerError {
const char * GetSyncerErrorString(SyncerError);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_
diff --git a/sync/internal_api/public/util/unrecoverable_error_handler.h b/sync/internal_api/public/util/unrecoverable_error_handler.h
index a96a487..82644ee 100644
--- a/sync/internal_api/public/util/unrecoverable_error_handler.h
+++ b/sync/internal_api/public/util/unrecoverable_error_handler.h
@@ -10,7 +10,7 @@
#include "base/location.h"
-namespace csync {
+namespace syncer {
class UnrecoverableErrorHandler {
public:
@@ -24,7 +24,6 @@ class UnrecoverableErrorHandler {
virtual ~UnrecoverableErrorHandler() { }
};
-}
+} // namespace syncer
#endif // SYNC_UTIL_UNRECOVERABLE_ERROR_HANDLER_H_
-
diff --git a/sync/internal_api/public/util/unrecoverable_error_info.cc b/sync/internal_api/public/util/unrecoverable_error_info.cc
index ae17d2f..2234650 100644
--- a/sync/internal_api/public/util/unrecoverable_error_info.cc
+++ b/sync/internal_api/public/util/unrecoverable_error_info.cc
@@ -4,7 +4,7 @@
#include "sync/internal_api/public/util/unrecoverable_error_info.h"
-namespace csync {
+namespace syncer {
UnrecoverableErrorInfo::UnrecoverableErrorInfo()
: is_set_(false) {
@@ -41,4 +41,4 @@ const std::string& UnrecoverableErrorInfo::message() const {
return message_;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/util/unrecoverable_error_info.h b/sync/internal_api/public/util/unrecoverable_error_info.h
index 6e8af72..912b51e 100644
--- a/sync/internal_api/public/util/unrecoverable_error_info.h
+++ b/sync/internal_api/public/util/unrecoverable_error_info.h
@@ -12,7 +12,7 @@
#include "base/location.h"
-namespace csync {
+namespace syncer {
class UnrecoverableErrorInfo {
public:
@@ -36,6 +36,6 @@ class UnrecoverableErrorInfo {
bool is_set_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_
diff --git a/sync/internal_api/public/util/weak_handle.cc b/sync/internal_api/public/util/weak_handle.cc
index 9de3f9b..e6411ee 100644
--- a/sync/internal_api/public/util/weak_handle.cc
+++ b/sync/internal_api/public/util/weak_handle.cc
@@ -10,7 +10,7 @@
#include "base/location.h"
#include "base/message_loop_proxy.h"
-namespace csync {
+namespace syncer {
namespace internal {
@@ -33,4 +33,4 @@ void WeakHandleCoreBase::PostToOwnerThread(
} // namespace internal
-} // namespace base
+} // namespace syncer
diff --git a/sync/internal_api/public/util/weak_handle.h b/sync/internal_api/public/util/weak_handle.h
index fc7909e..9441949 100644
--- a/sync/internal_api/public/util/weak_handle.h
+++ b/sync/internal_api/public/util/weak_handle.h
@@ -68,7 +68,7 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
template <typename T> class WeakHandle;
@@ -286,7 +286,7 @@ class WeakHandle {
// Note that this doesn't override the regular copy constructor, so
// that one can be called on any thread.
template <typename U>
- WeakHandle(const csync::WeakHandle<U>& other) // NOLINT
+ WeakHandle(const syncer::WeakHandle<U>& other) // NOLINT
: core_(
other.IsInitialized() ?
new internal::WeakHandleCore<T>(other.Get()) :
@@ -374,6 +374,6 @@ WeakHandle<T> MakeWeakHandle(const base::WeakPtr<T>& ptr) {
return WeakHandle<T>(ptr);
}
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_WEAK_HANDLE_H_
diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc
index 67c7b20..c770a29 100644
--- a/sync/internal_api/public/util/weak_handle_unittest.cc
+++ b/sync/internal_api/public/util/weak_handle_unittest.cc
@@ -13,7 +13,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
using ::testing::_;
using ::testing::SaveArg;
@@ -323,4 +323,4 @@ TEST_F(WeakHandleTest, TypeConversionConstructorUninitializedAssignment) {
EXPECT_FALSE(base_weak_handle.IsInitialized());
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/public/write_node.h b/sync/internal_api/public/write_node.h
index c99b3a0..b113187 100644
--- a/sync/internal_api/public/write_node.h
+++ b/sync/internal_api/public/write_node.h
@@ -14,7 +14,7 @@
#include "sync/internal_api/public/base_node.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
class Cryptographer;
class TestBookmarkModelAssociator;
}
@@ -38,7 +38,7 @@ class ThemeSpecifics;
class TypedUrlSpecifics;
}
-namespace csync {
+namespace syncer {
class WriteTransaction;
@@ -199,6 +199,6 @@ class WriteNode : public BaseNode {
DISALLOW_COPY_AND_ASSIGN(WriteNode);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_
diff --git a/sync/internal_api/public/write_transaction.h b/sync/internal_api/public/write_transaction.h
index b2de9a1..e72ae71 100644
--- a/sync/internal_api/public/write_transaction.h
+++ b/sync/internal_api/public/write_transaction.h
@@ -18,7 +18,7 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
// Sync API's WriteTransaction is a read/write BaseTransaction. It wraps
// a syncable::WriteTransaction.
@@ -52,6 +52,6 @@ class WriteTransaction : public BaseTransaction {
DISALLOW_COPY_AND_ASSIGN(WriteTransaction);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_
diff --git a/sync/internal_api/read_node.cc b/sync/internal_api/read_node.cc
index 019ba1d..6f7fc35 100644
--- a/sync/internal_api/read_node.cc
+++ b/sync/internal_api/read_node.cc
@@ -9,7 +9,7 @@
#include "sync/syncable/base_transaction.h"
#include "sync/syncable/entry.h"
-namespace csync {
+namespace syncer {
//////////////////////////////////////////////////////////////////////////
// ReadNode member definitions
@@ -95,4 +95,4 @@ BaseNode::InitByLookupResult ReadNode::InitByTagLookup(
return DecryptIfNecessary() ? INIT_OK : INIT_FAILED_DECRYPT_IF_NECESSARY;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/read_transaction.cc b/sync/internal_api/read_transaction.cc
index 7b6e117..32296f7 100644
--- a/sync/internal_api/read_transaction.cc
+++ b/sync/internal_api/read_transaction.cc
@@ -6,7 +6,7 @@
#include "sync/syncable/read_transaction.h"
-namespace csync {
+namespace syncer {
//////////////////////////////////////////////////////////////////////////
// ReadTransaction member definitions
@@ -35,4 +35,4 @@ syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const {
return transaction_;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc
index 53916d9..efdd5a5 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -62,30 +62,30 @@
#include "sync/util/time.h"
using base::TimeDelta;
-using csync::AllStatus;
-using csync::Cryptographer;
-using csync::Encryptor;
-using csync::JsArgList;
-using csync::JsBackend;
-using csync::JsEventDetails;
-using csync::JsEventHandler;
-using csync::JsEventHandler;
-using csync::JsReplyHandler;
-using csync::JsMutationEventObserver;
-using csync::JsSyncManagerObserver;
-using csync::kNigoriTag;
-using csync::KeyParams;
-using csync::ModelSafeRoutingInfo;
-using csync::ReportUnrecoverableErrorFunction;
-using csync::ServerConnectionEvent;
-using csync::ServerConnectionEventListener;
-using csync::SyncEngineEvent;
-using csync::SyncEngineEventListener;
-using csync::SyncScheduler;
-using csync::Syncer;
-using csync::UnrecoverableErrorHandler;
-using csync::WeakHandle;
-using csync::sessions::SyncSessionContext;
+using syncer::AllStatus;
+using syncer::Cryptographer;
+using syncer::Encryptor;
+using syncer::JsArgList;
+using syncer::JsBackend;
+using syncer::JsEventDetails;
+using syncer::JsEventHandler;
+using syncer::JsEventHandler;
+using syncer::JsReplyHandler;
+using syncer::JsMutationEventObserver;
+using syncer::JsSyncManagerObserver;
+using syncer::kNigoriTag;
+using syncer::KeyParams;
+using syncer::ModelSafeRoutingInfo;
+using syncer::ReportUnrecoverableErrorFunction;
+using syncer::ServerConnectionEvent;
+using syncer::ServerConnectionEventListener;
+using syncer::SyncEngineEvent;
+using syncer::SyncEngineEventListener;
+using syncer::SyncScheduler;
+using syncer::Syncer;
+using syncer::UnrecoverableErrorHandler;
+using syncer::WeakHandle;
+using syncer::sessions::SyncSessionContext;
using syncable::ImmutableWriteTransactionInfo;
using syncable::ModelType;
using syncable::ModelTypeSet;
@@ -99,15 +99,15 @@ static const int kSyncRefreshDelayMsec = 500;
static const int kSyncSchedulerDelayMsec = 250;
GetUpdatesCallerInfo::GetUpdatesSource GetSourceFromReason(
- csync::ConfigureReason reason) {
+ syncer::ConfigureReason reason) {
switch (reason) {
- case csync::CONFIGURE_REASON_RECONFIGURATION:
+ case syncer::CONFIGURE_REASON_RECONFIGURATION:
return GetUpdatesCallerInfo::RECONFIGURATION;
- case csync::CONFIGURE_REASON_MIGRATION:
+ case syncer::CONFIGURE_REASON_MIGRATION:
return GetUpdatesCallerInfo::MIGRATION;
- case csync::CONFIGURE_REASON_NEW_CLIENT:
+ case syncer::CONFIGURE_REASON_NEW_CLIENT:
return GetUpdatesCallerInfo::NEW_CLIENT;
- case csync::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE:
+ case syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE:
return GetUpdatesCallerInfo::NEWLY_SUPPORTED_DATATYPE;
default:
NOTREACHED();
@@ -122,7 +122,7 @@ static const int kNigoriOverwriteLimit = 10;
} // namespace
-namespace csync {
+namespace syncer {
const int SyncManager::kDefaultNudgeDelayMilliseconds = 200;
const int SyncManager::kPreferencesNudgeDelayMilliseconds = 2000;
@@ -135,8 +135,8 @@ const unsigned int kMaxMessageSizeToRecord = 5 * 1024;
// SyncManager's implementation: SyncManager::SyncInternal
class SyncManager::SyncInternal
: public net::NetworkChangeNotifier::IPAddressObserver,
- public csync::Cryptographer::Observer,
- public csync::SyncNotifierObserver,
+ public syncer::Cryptographer::Observer,
+ public syncer::SyncNotifierObserver,
public JsBackend,
public SyncEngineEventListener,
public ServerConnectionEventListener,
@@ -201,13 +201,13 @@ class SyncManager::SyncInternal
bool use_ssl,
const scoped_refptr<base::TaskRunner>& blocking_task_runner,
HttpPostProviderFactory* post_factory,
- const csync::ModelSafeRoutingInfo& model_safe_routing_info,
- const std::vector<csync::ModelSafeWorker*>& workers,
- csync::ExtensionsActivityMonitor*
+ const syncer::ModelSafeRoutingInfo& model_safe_routing_info,
+ const std::vector<syncer::ModelSafeWorker*>& workers,
+ syncer::ExtensionsActivityMonitor*
extensions_activity_monitor,
ChangeDelegate* change_delegate,
const SyncCredentials& credentials,
- csync::SyncNotifier* sync_notifier,
+ syncer::SyncNotifier* sync_notifier,
const std::string& restored_key_for_bootstrapping,
TestingMode testing_mode,
Encryptor* encryptor,
@@ -229,7 +229,7 @@ class SyncManager::SyncInternal
// Tell the sync engine to start the syncing process.
void StartSyncingNormally(
- const csync::ModelSafeRoutingInfo& routing_info);
+ const syncer::ModelSafeRoutingInfo& routing_info);
// Whether or not the Nigori node is encrypted using an explicit passphrase.
bool IsUsingExplicitPassphrase();
@@ -325,10 +325,10 @@ class SyncManager::SyncInternal
// SyncNotifierObserver implementation.
virtual void OnNotificationsEnabled() OVERRIDE;
virtual void OnNotificationsDisabled(
- csync::NotificationsDisabledReason reason) OVERRIDE;
+ syncer::NotificationsDisabledReason reason) OVERRIDE;
virtual void OnIncomingNotification(
const syncable::ModelTypePayloadMap& type_payloads,
- csync::IncomingNotificationSource source) OVERRIDE;
+ syncer::IncomingNotificationSource source) OVERRIDE;
void AddObserver(SyncManager::Observer* observer);
void RemoveObserver(SyncManager::Observer* observer);
@@ -553,7 +553,7 @@ class SyncManager::SyncInternal
// This can be called from any thread, but only between calls to
// OpenDirectory() and ShutdownOnSyncThread().
- csync::WeakHandle<SyncManager::ChangeObserver> change_observer_;
+ syncer::WeakHandle<SyncManager::ChangeObserver> change_observer_;
ObserverList<SyncManager::Observer> observers_;
@@ -570,7 +570,7 @@ class SyncManager::SyncInternal
scoped_ptr<SyncScheduler> scheduler_;
// The SyncNotifier which notifies us when updates need to be downloaded.
- scoped_ptr<csync::SyncNotifier> sync_notifier_;
+ scoped_ptr<syncer::SyncNotifier> sync_notifier_;
// A multi-purpose status watch object that aggregates stats from various
// sync components.
@@ -607,12 +607,12 @@ class SyncManager::SyncInternal
JsSyncManagerObserver js_sync_manager_observer_;
JsMutationEventObserver js_mutation_event_observer_;
- csync::ThrottledDataTypeTracker throttled_data_type_tracker_;
+ syncer::ThrottledDataTypeTracker throttled_data_type_tracker_;
// This is for keeping track of client events to send to the server.
DebugInfoEventListener debug_info_event_listener_;
- csync::TrafficRecorder traffic_recorder_;
+ syncer::TrafficRecorder traffic_recorder_;
Encryptor* encryptor_;
UnrecoverableErrorHandler* unrecoverable_error_handler_;
@@ -678,7 +678,7 @@ class NudgeStrategy {
break;
case ACCOMPANY_ONLY:
delay = TimeDelta::FromSeconds(
- csync::kDefaultShortPollIntervalSeconds);
+ syncer::kDefaultShortPollIntervalSeconds);
break;
case CUSTOM:
switch (model_type) {
@@ -717,12 +717,12 @@ bool SyncManager::Init(
bool use_ssl,
const scoped_refptr<base::TaskRunner>& blocking_task_runner,
HttpPostProviderFactory* post_factory,
- const csync::ModelSafeRoutingInfo& model_safe_routing_info,
- const std::vector<csync::ModelSafeWorker*>& workers,
- csync::ExtensionsActivityMonitor* extensions_activity_monitor,
+ const syncer::ModelSafeRoutingInfo& model_safe_routing_info,
+ const std::vector<syncer::ModelSafeWorker*>& workers,
+ syncer::ExtensionsActivityMonitor* extensions_activity_monitor,
ChangeDelegate* change_delegate,
const SyncCredentials& credentials,
- csync::SyncNotifier* sync_notifier,
+ syncer::SyncNotifier* sync_notifier,
const std::string& restored_key_for_bootstrapping,
TestingMode testing_mode,
Encryptor* encryptor,
@@ -774,7 +774,7 @@ syncable::ModelTypeSet SyncManager::InitialSyncEndedTypes() {
}
void SyncManager::StartSyncingNormally(
- const csync::ModelSafeRoutingInfo& routing_info) {
+ const syncer::ModelSafeRoutingInfo& routing_info) {
DCHECK(thread_checker_.CalledOnValidThread());
data_->StartSyncingNormally(routing_info);
}
@@ -818,7 +818,7 @@ bool SyncManager::IsUsingExplicitPassphrase() {
}
void SyncManager::RequestCleanupDisabledTypes(
- const csync::ModelSafeRoutingInfo& routing_info) {
+ const syncer::ModelSafeRoutingInfo& routing_info) {
DCHECK(thread_checker_.CalledOnValidThread());
if (data_->scheduler()) {
data_->session_context()->set_routing_info(routing_info);
@@ -827,7 +827,7 @@ void SyncManager::RequestCleanupDisabledTypes(
}
void SyncManager::RequestConfig(
- const csync::ModelSafeRoutingInfo& routing_info,
+ const syncer::ModelSafeRoutingInfo& routing_info,
const ModelTypeSet& types, ConfigureReason reason) {
DCHECK(thread_checker_.CalledOnValidThread());
if (!data_->scheduler()) {
@@ -850,7 +850,7 @@ void SyncManager::StartConfigurationMode(const base::Closure& callback) {
return;
}
data_->scheduler()->Start(
- csync::SyncScheduler::CONFIGURATION_MODE, callback);
+ syncer::SyncScheduler::CONFIGURATION_MODE, callback);
}
bool SyncManager::SyncInternal::Init(
@@ -861,12 +861,12 @@ bool SyncManager::SyncInternal::Init(
bool use_ssl,
const scoped_refptr<base::TaskRunner>& blocking_task_runner,
HttpPostProviderFactory* post_factory,
- const csync::ModelSafeRoutingInfo& model_safe_routing_info,
- const std::vector<csync::ModelSafeWorker*>& workers,
- csync::ExtensionsActivityMonitor* extensions_activity_monitor,
+ const syncer::ModelSafeRoutingInfo& model_safe_routing_info,
+ const std::vector<syncer::ModelSafeWorker*>& workers,
+ syncer::ExtensionsActivityMonitor* extensions_activity_monitor,
ChangeDelegate* change_delegate,
const SyncCredentials& credentials,
- csync::SyncNotifier* sync_notifier,
+ syncer::SyncNotifier* sync_notifier,
const std::string& restored_key_for_bootstrapping,
TestingMode testing_mode,
Encryptor* encryptor,
@@ -952,7 +952,7 @@ bool SyncManager::SyncInternal::Init(
if (signed_in) {
if (scheduler()) {
scheduler()->Start(
- csync::SyncScheduler::CONFIGURATION_MODE, base::Closure());
+ syncer::SyncScheduler::CONFIGURATION_MODE, base::Closure());
}
initialized_ = true;
@@ -988,7 +988,7 @@ void SyncManager::SyncInternal::UpdateCryptographerAndNigori(
const std::string& chrome_version,
const base::Closure& done_callback) {
DCHECK(initialized_);
- csync::GetSessionName(
+ syncer::GetSessionName(
blocking_task_runner_,
base::Bind(
&SyncManager::SyncInternal::UpdateCryptographerAndNigoriCallback,
@@ -1046,7 +1046,7 @@ void SyncManager::SyncInternal::UpdateCryptographerAndNigoriCallback(
Cryptographer* cryptographer = trans.GetCryptographer();
WriteNode node(&trans);
- if (node.InitByTagLookup(kNigoriTag) == csync::BaseNode::INIT_OK) {
+ if (node.InitByTagLookup(kNigoriTag) == syncer::BaseNode::INIT_OK) {
sync_pb::NigoriSpecifics nigori(node.GetNigoriSpecifics());
Cryptographer::UpdateResult result = cryptographer->Update(nigori);
if (result == Cryptographer::NEEDS_PASSPHRASE) {
@@ -1054,7 +1054,7 @@ void SyncManager::SyncInternal::UpdateCryptographerAndNigoriCallback(
if (cryptographer->has_pending_keys())
pending_keys = cryptographer->GetPendingKeys();
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
- OnPassphraseRequired(csync::REASON_DECRYPTION,
+ OnPassphraseRequired(syncer::REASON_DECRYPTION,
pending_keys));
}
@@ -1124,7 +1124,7 @@ void SyncManager::SyncInternal::NotifyCryptographerState(
}
void SyncManager::SyncInternal::StartSyncingNormally(
- const csync::ModelSafeRoutingInfo& routing_info) {
+ const syncer::ModelSafeRoutingInfo& routing_info) {
// Start the sync scheduler.
if (scheduler()) { // NULL during certain unittests.
session_context()->set_routing_info(routing_info);
@@ -1137,9 +1137,9 @@ bool SyncManager::SyncInternal::OpenDirectory() {
// Set before Open().
change_observer_ =
- csync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr());
+ syncer::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr());
WeakHandle<syncable::TransactionObserver> transaction_observer(
- csync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr()));
+ syncer::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr()));
syncable::DirOpenResult open_result = syncable::NOT_INITIALIZED;
open_result = directory()->Open(username_for_share(), this,
@@ -1219,7 +1219,7 @@ void SyncManager::SyncInternal::SetEncryptionPassphrase(
Cryptographer* cryptographer = trans.GetCryptographer();
KeyParams key_params = {"localhost", "dummy", passphrase};
WriteNode node(&trans);
- if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) {
+ if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) {
// TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS.
NOTREACHED();
return;
@@ -1333,7 +1333,7 @@ void SyncManager::SyncInternal::SetDecryptionPassphrase(
Cryptographer* cryptographer = trans.GetCryptographer();
KeyParams key_params = {"localhost", "dummy", passphrase};
WriteNode node(&trans);
- if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) {
+ if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) {
// TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS.
NOTREACHED();
return;
@@ -1486,11 +1486,11 @@ void SyncManager::SyncInternal::FinishSetPassphrase(
<< "was ready.";
} else if (cryptographer->has_pending_keys()) {
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
- OnPassphraseRequired(csync::REASON_DECRYPTION,
+ OnPassphraseRequired(syncer::REASON_DECRYPTION,
cryptographer->GetPendingKeys()));
} else {
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
- OnPassphraseRequired(csync::REASON_ENCRYPTION,
+ OnPassphraseRequired(syncer::REASON_ENCRYPTION,
sync_pb::EncryptedData()));
}
return;
@@ -1522,7 +1522,7 @@ void SyncManager::SyncInternal::FinishSetPassphrase(
bool SyncManager::SyncInternal::IsUsingExplicitPassphrase() {
ReadTransaction trans(FROM_HERE, &share_);
ReadNode node(&trans);
- if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) {
+ if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) {
// TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS.
NOTREACHED();
return false;
@@ -1536,7 +1536,7 @@ void SyncManager::SyncInternal::RefreshEncryption() {
WriteTransaction trans(FROM_HERE, GetUserShare());
WriteNode node(&trans);
- if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) {
+ if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) {
NOTREACHED() << "Unable to set encrypted datatypes because Nigori node not "
<< "found.";
return;
@@ -1553,7 +1553,7 @@ void SyncManager::SyncInternal::RefreshEncryption() {
if (cryptographer->has_pending_keys())
pending_keys = cryptographer->GetPendingKeys();
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
- OnPassphraseRequired(csync::REASON_DECRYPTION,
+ OnPassphraseRequired(syncer::REASON_DECRYPTION,
pending_keys));
return;
}
@@ -1584,7 +1584,7 @@ void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) {
ReadNode type_root(trans);
std::string tag = syncable::ModelTypeToRootTag(iter.Get());
- if (type_root.InitByTagLookup(tag) != csync::BaseNode::INIT_OK)
+ if (type_root.InitByTagLookup(tag) != syncer::BaseNode::INIT_OK)
continue; // Don't try to reencrypt if the type's data is unavailable.
// Iterate through all children of this datatype.
@@ -1598,7 +1598,7 @@ void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) {
continue;
WriteNode child(trans);
- if (child.InitByIdLookup(child_id) != csync::BaseNode::INIT_OK) {
+ if (child.InitByIdLookup(child_id) != syncer::BaseNode::INIT_OK) {
NOTREACHED();
continue;
}
@@ -1620,11 +1620,11 @@ void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) {
std::string passwords_tag =
syncable::ModelTypeToRootTag(syncable::PASSWORDS);
if (passwords_root.InitByTagLookup(passwords_tag) ==
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
int64 child_id = passwords_root.GetFirstChildId();
while (child_id != kInvalidId) {
WriteNode child(trans);
- if (child.InitByIdLookup(child_id) != csync::BaseNode::INIT_OK) {
+ if (child.InitByIdLookup(child_id) != syncer::BaseNode::INIT_OK) {
NOTREACHED();
return;
}
@@ -1744,19 +1744,19 @@ void SyncManager::SyncInternal::OnServerConnectionEvent(
const ServerConnectionEvent& event) {
DCHECK(thread_checker_.CalledOnValidThread());
if (event.connection_code ==
- csync::HttpResponse::SERVER_CONNECTION_OK) {
+ syncer::HttpResponse::SERVER_CONNECTION_OK) {
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnConnectionStatusChange(CONNECTION_OK));
}
- if (event.connection_code == csync::HttpResponse::SYNC_AUTH_ERROR) {
+ if (event.connection_code == syncer::HttpResponse::SYNC_AUTH_ERROR) {
observing_ip_address_changes_ = false;
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnConnectionStatusChange(CONNECTION_AUTH_ERROR));
}
if (event.connection_code ==
- csync::HttpResponse::SYNC_SERVER_ERROR) {
+ syncer::HttpResponse::SYNC_SERVER_ERROR) {
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnConnectionStatusChange(CONNECTION_SERVER_ERROR));
}
@@ -1946,7 +1946,7 @@ void SyncManager::SyncInternal::RequestNudge(
const tracked_objects::Location& location) {
if (scheduler()) {
scheduler()->ScheduleNudgeAsync(
- TimeDelta::FromMilliseconds(0), csync::NUDGE_SOURCE_LOCAL,
+ TimeDelta::FromMilliseconds(0), syncer::NUDGE_SOURCE_LOCAL,
ModelTypeSet(), location);
}
}
@@ -1971,7 +1971,7 @@ void SyncManager::SyncInternal::RequestNudgeForDataTypes(
types.First().Get(),
this);
scheduler()->ScheduleNudgeAsync(nudge_delay,
- csync::NUDGE_SOURCE_LOCAL,
+ syncer::NUDGE_SOURCE_LOCAL,
types,
nudge_location);
}
@@ -1998,14 +1998,14 @@ void SyncManager::SyncInternal::OnSyncEngineEvent(
DVLOG(1) << "OnPassPhraseRequired Sent";
sync_pb::EncryptedData pending_keys = cryptographer->GetPendingKeys();
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
- OnPassphraseRequired(csync::REASON_DECRYPTION,
+ OnPassphraseRequired(syncer::REASON_DECRYPTION,
pending_keys));
} else if (!cryptographer->is_ready() &&
event.snapshot.initial_sync_ended().Has(syncable::NIGORI)) {
DVLOG(1) << "OnPassphraseRequired sent because cryptographer is not "
<< "ready";
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
- OnPassphraseRequired(csync::REASON_ENCRYPTION,
+ OnPassphraseRequired(syncer::REASON_ENCRYPTION,
sync_pb::EncryptedData()));
}
@@ -2025,7 +2025,7 @@ void SyncManager::SyncInternal::OnSyncEngineEvent(
WriteTransaction trans(FROM_HERE, GetUserShare());
WriteNode nigori_node(&trans);
if (nigori_node.InitByTagLookup(kNigoriTag) ==
- csync::BaseNode::INIT_OK) {
+ syncer::BaseNode::INIT_OK) {
Cryptographer* cryptographer = trans.GetCryptographer();
UpdateNigoriEncryptionState(cryptographer, &nigori_node);
}
@@ -2194,7 +2194,7 @@ JsArgList GetNodeInfoById(const JsArgList& args,
continue;
}
ReadNode node(&trans);
- if (node.InitByIdLookup(id) != csync::BaseNode::INIT_OK) {
+ if (node.InitByIdLookup(id) != syncer::BaseNode::INIT_OK) {
continue;
}
node_summaries->Append((node.*info_getter)());
@@ -2292,9 +2292,9 @@ void SyncManager::SyncInternal::OnNotificationsEnabled() {
}
void SyncManager::SyncInternal::OnNotificationsDisabled(
- csync::NotificationsDisabledReason reason) {
+ syncer::NotificationsDisabledReason reason) {
DVLOG(1) << "Notifications disabled with reason "
- << csync::NotificationsDisabledReasonToString(reason);
+ << syncer::NotificationsDisabledReasonToString(reason);
allstatus_.SetNotificationsEnabled(false);
if (scheduler()) {
scheduler()->set_notifications_enabled(false);
@@ -2313,20 +2313,20 @@ void SyncManager::SyncInternal::OnNotificationsDisabled(
void SyncManager::SyncInternal::OnIncomingNotification(
const syncable::ModelTypePayloadMap& type_payloads,
- csync::IncomingNotificationSource source) {
+ syncer::IncomingNotificationSource source) {
DCHECK(thread_checker_.CalledOnValidThread());
- if (source == csync::LOCAL_NOTIFICATION) {
+ if (source == syncer::LOCAL_NOTIFICATION) {
if (scheduler()) {
scheduler()->ScheduleNudgeWithPayloadsAsync(
TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec),
- csync::NUDGE_SOURCE_LOCAL_REFRESH,
+ syncer::NUDGE_SOURCE_LOCAL_REFRESH,
type_payloads, FROM_HERE);
}
} else if (!type_payloads.empty()) {
if (scheduler()) {
scheduler()->ScheduleNudgeWithPayloadsAsync(
TimeDelta::FromMilliseconds(kSyncSchedulerDelayMsec),
- csync::NUDGE_SOURCE_NOTIFICATION,
+ syncer::NUDGE_SOURCE_NOTIFICATION,
type_payloads, FROM_HERE);
}
allstatus_.IncrementNotificationsReceived();
@@ -2347,7 +2347,7 @@ void SyncManager::SyncInternal::OnIncomingNotification(
syncable::ModelTypeToString(it->first);
changed_types->Append(Value::CreateStringValue(model_type_str));
}
- details.SetString("source", (source == csync::LOCAL_NOTIFICATION) ?
+ details.SetString("source", (source == syncer::LOCAL_NOTIFICATION) ?
"LOCAL_NOTIFICATION" : "REMOTE_NOTIFICATION");
js_event_handler_.Call(FROM_HERE,
&JsEventHandler::HandleJsEvent,
@@ -2401,11 +2401,11 @@ syncable::ModelTypeSet SyncManager::GetEncryptedDataTypesForTest() const {
return GetEncryptedTypes(&trans);
}
-bool SyncManager::ReceivedExperiment(csync::Experiments* experiments)
+bool SyncManager::ReceivedExperiment(syncer::Experiments* experiments)
const {
ReadTransaction trans(FROM_HERE, GetUserShare());
ReadNode node(&trans);
- if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) {
+ if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) {
DVLOG(1) << "Couldn't find Nigori node.";
return false;
}
@@ -2418,7 +2418,7 @@ bool SyncManager::ReceivedExperiment(csync::Experiments* experiments)
}
bool SyncManager::HasUnsyncedItems() const {
- csync::ReadTransaction trans(FROM_HERE, GetUserShare());
+ syncer::ReadTransaction trans(FROM_HERE, GetUserShare());
return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0);
}
@@ -2430,7 +2430,7 @@ void SyncManager::SimulateEnableNotificationsForTest() {
void SyncManager::SimulateDisableNotificationsForTest(int reason) {
DCHECK(thread_checker_.CalledOnValidThread());
data_->OnNotificationsDisabled(
- static_cast<csync::NotificationsDisabledReason>(reason));
+ static_cast<syncer::NotificationsDisabledReason>(reason));
}
void SyncManager::TriggerOnIncomingNotificationForTest(
@@ -2441,7 +2441,7 @@ void SyncManager::TriggerOnIncomingNotificationForTest(
std::string());
data_->OnIncomingNotification(model_types_with_payloads,
- csync::REMOTE_NOTIFICATION);
+ syncer::REMOTE_NOTIFICATION);
}
const char* ConnectionStatusToString(ConnectionStatus status) {
@@ -2476,7 +2476,7 @@ const char* PassphraseRequiredReasonToString(
// Helper function to determine if initial sync had ended for types.
bool InitialSyncEndedForTypes(syncable::ModelTypeSet types,
- csync::UserShare* share) {
+ syncer::UserShare* share) {
for (syncable::ModelTypeSet::Iterator i = types.First();
i.Good(); i.Inc()) {
if (!share->directory->initial_sync_ended_for_type(i.Get()))
@@ -2487,7 +2487,7 @@ bool InitialSyncEndedForTypes(syncable::ModelTypeSet types,
syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
syncable::ModelTypeSet types,
- csync::UserShare* share) {
+ syncer::UserShare* share) {
syncable::ModelTypeSet result;
for (syncable::ModelTypeSet::Iterator i = types.First();
i.Good(); i.Inc()) {
@@ -2501,4 +2501,4 @@ syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
return result;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/syncapi_internal.cc b/sync/internal_api/syncapi_internal.cc
index c6b1cad..282082b 100644
--- a/sync/internal_api/syncapi_internal.cc
+++ b/sync/internal_api/syncapi_internal.cc
@@ -9,9 +9,9 @@
#include "sync/protocol/sync.pb.h"
#include "sync/util/cryptographer.h"
-using csync::Cryptographer;
+using syncer::Cryptographer;
-namespace csync {
+namespace syncer {
sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics(
const sync_pb::EntitySpecifics& specifics, Cryptographer* crypto) {
@@ -33,9 +33,9 @@ static const char* kForbiddenServerNames[] = { "", ".", ".." };
// When taking a name from the syncapi, append a space if it matches the
// pattern of a server-illegal name followed by zero or more spaces.
-void SyncAPINameToServerName(const std::string& csync_name,
+void SyncAPINameToServerName(const std::string& syncer_name,
std::string* out) {
- *out = csync_name;
+ *out = syncer_name;
if (IsNameServerIllegalAfterTrimming(*out))
out->append(" ");
}
@@ -54,7 +54,7 @@ bool IsNameServerIllegalAfterTrimming(const std::string& name) {
}
// Compare the values of two EntitySpecifics, accounting for encryption.
-bool AreSpecificsEqual(const csync::Cryptographer* cryptographer,
+bool AreSpecificsEqual(const syncer::Cryptographer* cryptographer,
const sync_pb::EntitySpecifics& left,
const sync_pb::EntitySpecifics& right) {
// Note that we can't compare encrypted strings directly as they are seeded
@@ -84,4 +84,4 @@ bool AreSpecificsEqual(const csync::Cryptographer* cryptographer,
return false;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/syncapi_internal.h b/sync/internal_api/syncapi_internal.h
index da8de78..afc9c0a 100644
--- a/sync/internal_api/syncapi_internal.h
+++ b/sync/internal_api/syncapi_internal.h
@@ -6,32 +6,31 @@
#define SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_
// The functions defined are shared among some of the classes that implement
-// the internal csync. They are not to be used by clients of the API.
+// the internal sync API. They are not to be used by clients of the API.
#include <string>
-namespace csync {
-class Cryptographer;
-}
-
namespace sync_pb {
class EntitySpecifics;
class PasswordSpecificsData;
}
-namespace csync {
+namespace syncer {
+
+class Cryptographer;
+
sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics(
const sync_pb::EntitySpecifics& specifics,
- csync::Cryptographer* crypto);
+ syncer::Cryptographer* crypto);
-void SyncAPINameToServerName(const std::string& csync_name,
+void SyncAPINameToServerName(const std::string& syncer_name,
std::string* out);
bool IsNameServerIllegalAfterTrimming(const std::string& name);
-bool AreSpecificsEqual(const csync::Cryptographer* cryptographer,
+bool AreSpecificsEqual(const syncer::Cryptographer* cryptographer,
const sync_pb::EntitySpecifics& left,
const sync_pb::EntitySpecifics& right);
-}
+} // namespace syncer
#endif // SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_
diff --git a/sync/internal_api/syncapi_server_connection_manager.cc b/sync/internal_api/syncapi_server_connection_manager.cc
index f2abcc9..63f96c9 100644
--- a/sync/internal_api/syncapi_server_connection_manager.cc
+++ b/sync/internal_api/syncapi_server_connection_manager.cc
@@ -9,12 +9,12 @@
#include "sync/internal_api/public/http_post_provider_factory.h"
#include "sync/internal_api/public/http_post_provider_interface.h"
-using csync::HttpResponse;
+using syncer::HttpResponse;
-namespace csync {
+namespace syncer {
SyncAPIBridgedConnection::SyncAPIBridgedConnection(
- csync::ServerConnectionManager* scm,
+ syncer::ServerConnectionManager* scm,
HttpPostProviderFactory* factory)
: Connection(scm), factory_(factory) {
post_provider_ = factory_->Create();
@@ -97,9 +97,9 @@ SyncAPIServerConnectionManager::SyncAPIServerConnectionManager(
SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {}
-csync::ServerConnectionManager::Connection*
+syncer::ServerConnectionManager::Connection*
SyncAPIServerConnectionManager::MakeConnection() {
return new SyncAPIBridgedConnection(this, post_provider_factory_.get());
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/syncapi_server_connection_manager.h b/sync/internal_api/syncapi_server_connection_manager.h
index 9678045..4b15f72 100644
--- a/sync/internal_api/syncapi_server_connection_manager.h
+++ b/sync/internal_api/syncapi_server_connection_manager.h
@@ -13,7 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "sync/engine/net/server_connection_manager.h"
-namespace csync {
+namespace syncer {
class HttpPostProviderFactory;
class HttpPostProviderInterface;
@@ -21,9 +21,9 @@ class HttpPostProviderInterface;
// This provides HTTP Post functionality through the interface provided
// to the sync API by the application hosting the syncer backend.
class SyncAPIBridgedConnection
- : public csync::ServerConnectionManager::Connection {
+ : public syncer::ServerConnectionManager::Connection {
public:
- SyncAPIBridgedConnection(csync::ServerConnectionManager* scm,
+ SyncAPIBridgedConnection(syncer::ServerConnectionManager* scm,
HttpPostProviderFactory* factory);
virtual ~SyncAPIBridgedConnection();
@@ -31,7 +31,7 @@ class SyncAPIBridgedConnection
virtual bool Init(const char* path,
const std::string& auth_token,
const std::string& payload,
- csync::HttpResponse* response) OVERRIDE;
+ syncer::HttpResponse* response) OVERRIDE;
virtual void Abort() OVERRIDE;
@@ -49,7 +49,7 @@ class SyncAPIBridgedConnection
// subclass so that we can override MakePost() to generate a POST object using
// an instance of the HttpPostProviderFactory class.
class SyncAPIServerConnectionManager
- : public csync::ServerConnectionManager {
+ : public syncer::ServerConnectionManager {
public:
// Takes ownership of factory.
SyncAPIServerConnectionManager(const std::string& server,
@@ -72,6 +72,6 @@ class SyncAPIServerConnectionManager
DISALLOW_COPY_AND_ASSIGN(SyncAPIServerConnectionManager);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_
diff --git a/sync/internal_api/syncapi_server_connection_manager_unittest.cc b/sync/internal_api/syncapi_server_connection_manager_unittest.cc
index a6e34d0..606acf5 100644
--- a/sync/internal_api/syncapi_server_connection_manager_unittest.cc
+++ b/sync/internal_api/syncapi_server_connection_manager_unittest.cc
@@ -17,11 +17,11 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::TimeDelta;
-using csync::HttpResponse;
-using csync::ServerConnectionManager;
-using csync::ScopedServerStatusWatcher;
+using syncer::HttpResponse;
+using syncer::ServerConnectionManager;
+using syncer::ScopedServerStatusWatcher;
-namespace csync {
+namespace syncer {
namespace {
class BlockingHttpPost : public HttpPostProviderInterface {
@@ -111,4 +111,4 @@ TEST(SyncAPIServerConnectionManagerTest, AbortPost) {
abort_thread.Stop();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/syncapi_unittest.cc b/sync/internal_api/syncapi_unittest.cc
index 1d125ce..2ee4977a 100644
--- a/sync/internal_api/syncapi_unittest.cc
+++ b/sync/internal_api/syncapi_unittest.cc
@@ -67,24 +67,24 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::ExpectDictStringValue;
-using csync::Cryptographer;
-using csync::FakeEncryptor;
-using csync::FakeExtensionsActivityMonitor;
-using csync::HasArgsAsList;
-using csync::HasDetailsAsDictionary;
-using csync::KeyParams;
-using csync::kNigoriTag;
-using csync::JsArgList;
-using csync::JsBackend;
-using csync::JsEventHandler;
-using csync::JsReplyHandler;
-using csync::MockJsEventHandler;
-using csync::MockJsReplyHandler;
-using csync::ModelSafeRoutingInfo;
-using csync::ModelSafeWorker;
-using csync::sessions::SyncSessionSnapshot;
-using csync::TestUnrecoverableErrorHandler;
-using csync::WeakHandle;
+using syncer::Cryptographer;
+using syncer::FakeEncryptor;
+using syncer::FakeExtensionsActivityMonitor;
+using syncer::HasArgsAsList;
+using syncer::HasDetailsAsDictionary;
+using syncer::KeyParams;
+using syncer::kNigoriTag;
+using syncer::JsArgList;
+using syncer::JsBackend;
+using syncer::JsEventHandler;
+using syncer::JsReplyHandler;
+using syncer::MockJsEventHandler;
+using syncer::MockJsReplyHandler;
+using syncer::ModelSafeRoutingInfo;
+using syncer::ModelSafeWorker;
+using syncer::sessions::SyncSessionSnapshot;
+using syncer::TestUnrecoverableErrorHandler;
+using syncer::WeakHandle;
using syncable::IS_DEL;
using syncable::IS_UNSYNCED;
using syncable::kEncryptedString;
@@ -100,7 +100,7 @@ using testing::Invoke;
using testing::SaveArg;
using testing::StrictMock;
-namespace csync {
+namespace syncer {
namespace {
@@ -121,7 +121,7 @@ void ExpectTimeValue(const base::Time& expected_value,
const DictionaryValue& value, const std::string& key) {
std::string time_str;
EXPECT_TRUE(value.GetString(key, &time_str));
- EXPECT_EQ(csync::GetTimeDebugString(expected_value), time_str);
+ EXPECT_EQ(syncer::GetTimeDebugString(expected_value), time_str);
}
// Makes a non-folder child of the root node. Returns the id of the
@@ -133,9 +133,9 @@ int64 MakeNode(UserShare* share,
ReadNode root_node(&trans);
root_node.InitByRootLookup();
WriteNode node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(model_type, root_node, client_tag);
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
node.SetIsFolder(false);
return node.GetId();
}
@@ -150,9 +150,9 @@ int64 MakeNodeWithParent(UserShare* share,
ReadNode parent_node(&trans);
EXPECT_EQ(BaseNode::INIT_OK, parent_node.InitByIdLookup(parent_id));
WriteNode node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(model_type, parent_node, client_tag);
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
node.SetIsFolder(false);
return node.GetId();
}
@@ -245,7 +245,7 @@ class SyncApiTest : public testing::Test {
protected:
MessageLoop message_loop_;
- csync::TestUserShare test_user_share_;
+ syncer::TestUserShare test_user_share_;
};
TEST_F(SyncApiTest, SanityCheckTest) {
@@ -381,9 +381,9 @@ TEST_F(SyncApiTest, TestDeleteBehavior) {
folder_id = folder_node.GetId();
WriteNode wnode(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
wnode.InitUniqueByCreation(syncable::BOOKMARKS, root_node, "testtag");
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
wnode.SetIsFolder(false);
wnode.SetTitle(UTF8ToWide(test_title));
@@ -423,9 +423,9 @@ TEST_F(SyncApiTest, TestDeleteBehavior) {
WriteNode wnode(&trans);
// This will undelete the tag.
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
wnode.InitUniqueByCreation(syncable::BOOKMARKS, folder_node, "testtag");
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
EXPECT_EQ(wnode.GetIsFolder(), false);
EXPECT_EQ(wnode.GetParentId(), folder_node.GetId());
EXPECT_EQ(wnode.GetId(), node_id);
@@ -457,10 +457,10 @@ TEST_F(SyncApiTest, WriteAndReadPassword) {
root_node.InitByRootLookup();
WriteNode password_node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
password_node.InitUniqueByCreation(syncable::PASSWORDS,
root_node, "foo");
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
sync_pb::PasswordSpecificsData data;
data.set_password_value("secret");
password_node.SetPasswordSpecifics(data);
@@ -493,16 +493,16 @@ TEST_F(SyncApiTest, WriteEncryptedTitle) {
root_node.InitByRootLookup();
WriteNode bookmark_node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
bookmark_node.InitUniqueByCreation(syncable::BOOKMARKS,
root_node, "foo");
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
bookmark_node.SetTitle(UTF8ToWide("foo"));
WriteNode pref_node(&trans);
result =
pref_node.InitUniqueByCreation(syncable::PREFERENCES, root_node, "bar");
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
pref_node.SetTitle(UTF8ToWide("bar"));
}
{
@@ -640,9 +640,9 @@ TEST_F(SyncApiTest, EmptyTags) {
root_node.InitByRootLookup();
WriteNode node(&trans);
std::string empty_tag;
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
node.InitUniqueByCreation(syncable::TYPED_URLS, root_node, empty_tag);
- EXPECT_NE(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_NE(syncer::WriteNode::INIT_SUCCESS, result);
EXPECT_EQ(BaseNode::INIT_FAILED_PRECONDITION,
node.InitByTagLookup(empty_tag));
}
@@ -694,7 +694,7 @@ class SyncManagerObserverMock : public SyncManager::Observer {
void(const WeakHandle<JsBackend>&, bool)); // NOLINT
MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT
MOCK_METHOD2(OnPassphraseRequired,
- void(csync::PassphraseRequiredReason,
+ void(syncer::PassphraseRequiredReason,
const sync_pb::EncryptedData&)); // NOLINT
MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT
MOCK_METHOD1(OnBootstrapTokenUpdated, void(const std::string&)); // NOLINT
@@ -704,13 +704,13 @@ class SyncManagerObserverMock : public SyncManager::Observer {
void(ModelTypeSet, bool)); // NOLINT
MOCK_METHOD0(OnEncryptionComplete, void()); // NOLINT
MOCK_METHOD1(OnActionableError,
- void(const csync::SyncProtocolError&)); // NOLINT
+ void(const syncer::SyncProtocolError&)); // NOLINT
};
-class SyncNotifierMock : public csync::SyncNotifier {
+class SyncNotifierMock : public syncer::SyncNotifier {
public:
- MOCK_METHOD1(AddObserver, void(csync::SyncNotifierObserver*));
- MOCK_METHOD1(RemoveObserver, void(csync::SyncNotifierObserver*));
+ MOCK_METHOD1(AddObserver, void(syncer::SyncNotifierObserver*));
+ MOCK_METHOD1(RemoveObserver, void(syncer::SyncNotifierObserver*));
MOCK_METHOD1(SetUniqueId, void(const std::string&));
MOCK_METHOD1(SetStateDeprecated, void(const std::string&));
MOCK_METHOD2(UpdateCredentials,
@@ -787,7 +787,7 @@ class SyncManagerTest : public testing::Test,
&extensions_activity_monitor_, this,
credentials,
sync_notifier_mock_, "",
- csync::SyncManager::TEST_IN_MEMORY,
+ syncer::SyncManager::TEST_IN_MEMORY,
&encryptor_,
&handler_,
NULL);
@@ -814,12 +814,12 @@ class SyncManagerTest : public testing::Test,
}
void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) {
- (*out)[syncable::NIGORI] = csync::GROUP_PASSIVE;
- (*out)[syncable::BOOKMARKS] = csync::GROUP_PASSIVE;
- (*out)[syncable::THEMES] = csync::GROUP_PASSIVE;
- (*out)[syncable::SESSIONS] = csync::GROUP_PASSIVE;
- (*out)[syncable::PASSWORDS] = csync::GROUP_PASSIVE;
- (*out)[syncable::PREFERENCES] = csync::GROUP_PASSIVE;
+ (*out)[syncable::NIGORI] = syncer::GROUP_PASSIVE;
+ (*out)[syncable::BOOKMARKS] = syncer::GROUP_PASSIVE;
+ (*out)[syncable::THEMES] = syncer::GROUP_PASSIVE;
+ (*out)[syncable::SESSIONS] = syncer::GROUP_PASSIVE;
+ (*out)[syncable::PASSWORDS] = syncer::GROUP_PASSIVE;
+ (*out)[syncable::PREFERENCES] = syncer::GROUP_PASSIVE;
}
virtual void OnChangesApplied(
@@ -871,13 +871,13 @@ class SyncManagerTest : public testing::Test,
}
void SyncNotifierAddObserver(
- csync::SyncNotifierObserver* sync_notifier_observer) {
+ syncer::SyncNotifierObserver* sync_notifier_observer) {
EXPECT_EQ(NULL, sync_notifier_observer_);
sync_notifier_observer_ = sync_notifier_observer;
}
void SyncNotifierRemoveObserver(
- csync::SyncNotifierObserver* sync_notifier_observer) {
+ syncer::SyncNotifierObserver* sync_notifier_observer) {
EXPECT_EQ(sync_notifier_observer_, sync_notifier_observer);
sync_notifier_observer_ = NULL;
}
@@ -942,7 +942,7 @@ class SyncManagerTest : public testing::Test,
SyncManager sync_manager_;
WeakHandle<JsBackend> js_backend_;
StrictMock<SyncManagerObserverMock> observer_;
- csync::SyncNotifierObserver* sync_notifier_observer_;
+ syncer::SyncNotifierObserver* sync_notifier_observer_;
int update_enabled_types_call_count_;
};
@@ -1266,17 +1266,17 @@ TEST_F(SyncManagerTest, OnNotificationStateChange) {
sync_manager_.SimulateEnableNotificationsForTest();
sync_manager_.SimulateDisableNotificationsForTest(
- csync::TRANSIENT_NOTIFICATION_ERROR);
+ syncer::TRANSIENT_NOTIFICATION_ERROR);
SetJsEventHandler(event_handler.AsWeakHandle());
sync_manager_.SimulateEnableNotificationsForTest();
sync_manager_.SimulateDisableNotificationsForTest(
- csync::TRANSIENT_NOTIFICATION_ERROR);
+ syncer::TRANSIENT_NOTIFICATION_ERROR);
SetJsEventHandler(WeakHandle<JsEventHandler>());
sync_manager_.SimulateEnableNotificationsForTest();
sync_manager_.SimulateDisableNotificationsForTest(
- csync::TRANSIENT_NOTIFICATION_ERROR);
+ syncer::TRANSIENT_NOTIFICATION_ERROR);
// Should trigger the replies.
PumpLoop();
@@ -1577,10 +1577,10 @@ TEST_F(SyncManagerTest, SetPassphraseWithPassword) {
root_node.InitByRootLookup();
WriteNode password_node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
password_node.InitUniqueByCreation(syncable::PASSWORDS,
root_node, "foo");
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
sync_pb::PasswordSpecificsData data;
data.set_password_value("secret");
password_node.SetPasswordSpecifics(data);
@@ -1811,9 +1811,9 @@ TEST_F(SyncManagerTest, SetPassphraseWithEmptyPasswordNode) {
root_node.InitByRootLookup();
WriteNode password_node(&trans);
- csync::WriteNode::InitUniqueByCreationResult result =
+ syncer::WriteNode::InitUniqueByCreationResult result =
password_node.InitUniqueByCreation(syncable::PASSWORDS, root_node, tag);
- EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result);
+ EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result);
node_id = password_node.GetId();
}
EXPECT_CALL(observer_, OnBootstrapTokenUpdated(_));
@@ -1843,7 +1843,7 @@ TEST_F(SyncManagerTest, NudgeDelayTest) {
EXPECT_EQ(sync_manager_.GetNudgeDelayTimeDelta(syncable::AUTOFILL),
base::TimeDelta::FromSeconds(
- csync::kDefaultShortPollIntervalSeconds));
+ syncer::kDefaultShortPollIntervalSeconds));
EXPECT_EQ(sync_manager_.GetNudgeDelayTimeDelta(syncable::PREFERENCES),
base::TimeDelta::FromMilliseconds(
@@ -2462,7 +2462,7 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) {
EXPECT_TRUE(SetUpEncryption(WRITE_TO_NIGORI, DEFAULT_ENCRYPTION));
{
ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
- csync::Cryptographer* crypto = trans.GetCryptographer();
+ syncer::Cryptographer* crypto = trans.GetCryptographer();
sync_pb::EntitySpecifics bm_specifics;
bm_specifics.mutable_bookmark()->set_title("title");
bm_specifics.mutable_bookmark()->set_url("url");
@@ -2510,4 +2510,4 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) {
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/test/test_entry_factory.cc b/sync/internal_api/test/test_entry_factory.cc
index f42fc64..6731f72 100644
--- a/sync/internal_api/test/test_entry_factory.cc
+++ b/sync/internal_api/test/test_entry_factory.cc
@@ -16,7 +16,7 @@ using syncable::MutableEntry;
using syncable::UNITTEST;
using syncable::WriteTransaction;
-namespace csync {
+namespace syncer {
TestEntryFactory::TestEntryFactory(syncable::Directory *dir)
: directory_(dir), next_revision_(1) {
@@ -162,4 +162,4 @@ int64 TestEntryFactory::GetNextRevision() {
return next_revision_++;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/test/test_user_share.cc b/sync/internal_api/test/test_user_share.cc
index e11b542..136b438 100644
--- a/sync/internal_api/test/test_user_share.cc
+++ b/sync/internal_api/test/test_user_share.cc
@@ -9,7 +9,7 @@
#include "sync/test/engine/test_directory_setter_upper.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
TestUserShare::TestUserShare() : dir_maker_(new TestDirectorySetterUpper()) {}
@@ -19,7 +19,7 @@ TestUserShare::~TestUserShare() {
}
void TestUserShare::SetUp() {
- user_share_.reset(new csync::UserShare());
+ user_share_.reset(new syncer::UserShare());
dir_maker_->SetUp();
// The pointer is owned by dir_maker_, we should not be storing it in a
@@ -35,8 +35,8 @@ void TestUserShare::TearDown() {
dir_maker_->TearDown();
}
-csync::UserShare* TestUserShare::user_share() {
+syncer::UserShare* TestUserShare::user_share() {
return user_share_.get();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/user_share.cc b/sync/internal_api/user_share.cc
index 5a5cfde..1a3736d 100644
--- a/sync/internal_api/user_share.cc
+++ b/sync/internal_api/user_share.cc
@@ -6,10 +6,10 @@
#include "sync/syncable/directory.h"
-namespace csync {
+namespace syncer {
UserShare::UserShare() {}
UserShare::~UserShare() {}
-}
+} // namespace syncer
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc
index bda6388..17fccd0 100644
--- a/sync/internal_api/write_node.cc
+++ b/sync/internal_api/write_node.cc
@@ -21,13 +21,13 @@
#include "sync/syncable/mutable_entry.h"
#include "sync/util/cryptographer.h"
-using csync::Cryptographer;
+using syncer::Cryptographer;
using std::string;
using std::vector;
using syncable::kEncryptedString;
using syncable::SPECIFICS;
-namespace csync {
+namespace syncer {
static const char kDefaultNameForNewNodes[] = " ";
@@ -205,7 +205,7 @@ void WriteNode::SetEntitySpecifics(
if (GetModelType() != syncable::UNSPECIFIED) {
DCHECK_EQ(new_specifics_type, GetModelType());
}
- csync::Cryptographer* cryptographer =
+ syncer::Cryptographer* cryptographer =
GetTransaction()->GetCryptographer();
// Preserve unknown fields.
@@ -509,4 +509,4 @@ void WriteNode::MarkForSyncing() {
syncable::MarkForSyncing(entry_);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/internal_api/write_transaction.cc b/sync/internal_api/write_transaction.cc
index 7ccb116..fe11adf 100644
--- a/sync/internal_api/write_transaction.cc
+++ b/sync/internal_api/write_transaction.cc
@@ -6,7 +6,7 @@
#include "sync/syncable/write_transaction.h"
-namespace csync {
+namespace syncer {
//////////////////////////////////////////////////////////////////////////
// WriteTransaction member definitions
@@ -26,4 +26,4 @@ syncable::BaseTransaction* WriteTransaction::GetWrappedTrans() const {
return transaction_;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/js/js_arg_list.cc b/sync/js/js_arg_list.cc
index 754a2e4..8eec0aa 100644
--- a/sync/js/js_arg_list.cc
+++ b/sync/js/js_arg_list.cc
@@ -6,7 +6,7 @@
#include "base/json/json_writer.h"
-namespace csync {
+namespace syncer {
JsArgList::JsArgList() {}
@@ -24,4 +24,4 @@ std::string JsArgList::ToString() const {
return str;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/js/js_arg_list.h b/sync/js/js_arg_list.h
index 28244e8..6e38869 100644
--- a/sync/js/js_arg_list.h
+++ b/sync/js/js_arg_list.h
@@ -13,7 +13,7 @@
#include "base/values.h"
#include "sync/internal_api/public/util/immutable.h"
-namespace csync {
+namespace syncer {
// A thin wrapper around Immutable<ListValue>. Used for passing
// around argument lists to different threads.
@@ -39,6 +39,6 @@ class JsArgList {
ImmutableListValue args_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_JS_ARG_LIST_H_
diff --git a/sync/js/js_arg_list_unittest.cc b/sync/js/js_arg_list_unittest.cc
index 55044b7..537012d 100644
--- a/sync/js/js_arg_list_unittest.cc
+++ b/sync/js/js_arg_list_unittest.cc
@@ -7,7 +7,7 @@
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
class JsArgListTest : public testing::Test {};
@@ -37,4 +37,4 @@ TEST_F(JsArgListTest, FromList) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/js/js_backend.h b/sync/js/js_backend.h
index f0febee..960064e 100644
--- a/sync/js/js_backend.h
+++ b/sync/js/js_backend.h
@@ -10,7 +10,7 @@
#include <string>
-namespace csync {
+namespace syncer {
class JsArgList;
class JsEventHandler;
@@ -36,6 +36,6 @@ class JsBackend {
virtual ~JsBackend() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_JS_BACKEND_H_
diff --git a/sync/js/js_controller.h b/sync/js/js_controller.h
index e1a0d8a..359958c 100644
--- a/sync/js/js_controller.h
+++ b/sync/js/js_controller.h
@@ -10,7 +10,7 @@
#include <string>
-namespace csync {
+namespace syncer {
class JsArgList;
class JsEventHandler;
@@ -45,6 +45,6 @@ class JsController {
virtual ~JsController() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_JS_CONTROLLER_H_
diff --git a/sync/js/js_event_details.cc b/sync/js/js_event_details.cc
index c5e3f71..16e4df7 100644
--- a/sync/js/js_event_details.cc
+++ b/sync/js/js_event_details.cc
@@ -6,7 +6,7 @@
#include "base/json/json_writer.h"
-namespace csync {
+namespace syncer {
JsEventDetails::JsEventDetails() {}
@@ -24,4 +24,4 @@ std::string JsEventDetails::ToString() const {
return str;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/js/js_event_details.h b/sync/js/js_event_details.h
index ad93b67..fb3bf39 100644
--- a/sync/js/js_event_details.h
+++ b/sync/js/js_event_details.h
@@ -13,7 +13,7 @@
#include "base/values.h"
#include "sync/internal_api/public/util/immutable.h"
-namespace csync {
+namespace syncer {
// A thin wrapper around Immutable<DictionaryValue>. Used for passing
// around event details to different threads.
@@ -40,6 +40,6 @@ class JsEventDetails {
ImmutableDictionaryValue details_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_JS_EVENT_DETAILS_H_
diff --git a/sync/js/js_event_details_unittest.cc b/sync/js/js_event_details_unittest.cc
index b734ec9..563def7 100644
--- a/sync/js/js_event_details_unittest.cc
+++ b/sync/js/js_event_details_unittest.cc
@@ -7,7 +7,7 @@
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
class JsEventDetailsTest : public testing::Test {};
@@ -33,4 +33,4 @@ TEST_F(JsEventDetailsTest, FromDictionary) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/js/js_event_handler.h b/sync/js/js_event_handler.h
index 9eb73b6..c31c593 100644
--- a/sync/js/js_event_handler.h
+++ b/sync/js/js_event_handler.h
@@ -10,7 +10,7 @@
#include <string>
-namespace csync {
+namespace syncer {
class JsEventDetails;
@@ -25,6 +25,6 @@ class JsEventHandler {
virtual ~JsEventHandler() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_JS_EVENT_HANDLER_H_
diff --git a/sync/js/js_reply_handler.h b/sync/js/js_reply_handler.h
index 9749297..6f793c0 100644
--- a/sync/js/js_reply_handler.h
+++ b/sync/js/js_reply_handler.h
@@ -10,7 +10,7 @@
#include <string>
-namespace csync {
+namespace syncer {
class JsArgList;
@@ -25,6 +25,6 @@ class JsReplyHandler {
virtual ~JsReplyHandler() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_JS_REPLY_HANDLER_H_
diff --git a/sync/js/js_test_util.cc b/sync/js/js_test_util.cc
index d90485b..6d9679f 100644
--- a/sync/js/js_test_util.cc
+++ b/sync/js/js_test_util.cc
@@ -9,7 +9,7 @@
#include "sync/js/js_arg_list.h"
#include "sync/js/js_event_details.h"
-namespace csync {
+namespace syncer {
void PrintTo(const JsArgList& args, ::std::ostream* os) {
*os << args.ToString();
@@ -133,5 +133,5 @@ WeakHandle<JsReplyHandler> MockJsReplyHandler::AsWeakHandle() {
return MakeWeakHandle(AsWeakPtr());
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/js/js_test_util.h b/sync/js/js_test_util.h
index 042019b1..885966d 100644
--- a/sync/js/js_test_util.h
+++ b/sync/js/js_test_util.h
@@ -22,7 +22,7 @@ class DictionaryValue;
class ListValue;
}
-namespace csync {
+namespace syncer {
class JsArgList;
class JsEventDetails;
@@ -104,6 +104,6 @@ class MockJsReplyHandler
void(const ::std::string&, const JsArgList&));
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_JS_TEST_UTIL_H_
diff --git a/sync/js/sync_js_controller.cc b/sync/js/sync_js_controller.cc
index b2f57ea..49f3cc7 100644
--- a/sync/js/sync_js_controller.cc
+++ b/sync/js/sync_js_controller.cc
@@ -8,7 +8,7 @@
#include "sync/js/js_backend.h"
#include "sync/js/js_event_details.h"
-namespace csync {
+namespace syncer {
SyncJsController::PendingJsMessage::PendingJsMessage(
const std::string& name, const JsArgList& args,
@@ -80,4 +80,4 @@ void SyncJsController::UpdateBackendEventHandler() {
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/js/sync_js_controller.h b/sync/js/sync_js_controller.h
index 26ac93ba..9eca80c 100644
--- a/sync/js/sync_js_controller.h
+++ b/sync/js/sync_js_controller.h
@@ -18,7 +18,7 @@
#include "sync/js/js_controller.h"
#include "sync/js/js_event_handler.h"
-namespace csync {
+namespace syncer {
class JsBackend;
@@ -76,6 +76,6 @@ class SyncJsController
DISALLOW_COPY_AND_ASSIGN(SyncJsController);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_JS_SYNC_JS_CONTROLLER_H_
diff --git a/sync/js/sync_js_controller_unittest.cc b/sync/js/sync_js_controller_unittest.cc
index 3a8728f..4a691d9 100644
--- a/sync/js/sync_js_controller_unittest.cc
+++ b/sync/js/sync_js_controller_unittest.cc
@@ -12,7 +12,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
using ::testing::_;
@@ -123,4 +123,4 @@ TEST_F(SyncJsControllerTest, Events) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/chrome_invalidation_client.cc b/sync/notifier/chrome_invalidation_client.cc
index 0c1376e..f80575b 100644
--- a/sync/notifier/chrome_invalidation_client.cc
+++ b/sync/notifier/chrome_invalidation_client.cc
@@ -25,7 +25,7 @@ const char kApplicationName[] = "chrome-sync";
} // namespace
-namespace csync {
+namespace syncer {
ChromeInvalidationClient::Listener::~Listener() {}
@@ -52,7 +52,7 @@ void ChromeInvalidationClient::Start(
const std::string& client_id, const std::string& client_info,
const std::string& state,
const InvalidationVersionMap& initial_max_invalidation_versions,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
Listener* listener) {
DCHECK(CalledOnValidThread());
@@ -359,4 +359,4 @@ void ChromeInvalidationClient::OnIncomingNotification(
// Do nothing, since this is already handled by |invalidation_client_|.
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/chrome_invalidation_client.h b/sync/notifier/chrome_invalidation_client.h
index 8d998c6..747ebae 100644
--- a/sync/notifier/chrome_invalidation_client.h
+++ b/sync/notifier/chrome_invalidation_client.h
@@ -35,7 +35,7 @@ namespace notifier {
class PushClient;
} // namespace notifier
-namespace csync {
+namespace syncer {
using invalidation::InvalidationListener;
@@ -74,7 +74,7 @@ class ChromeInvalidationClient
const std::string& client_id, const std::string& client_info,
const std::string& state,
const InvalidationVersionMap& initial_max_invalidation_versions,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
Listener* listener);
@@ -141,7 +141,7 @@ class ChromeInvalidationClient
notifier::PushClient* const push_client_;
ChromeSystemResources chrome_system_resources_;
InvalidationVersionMap max_invalidation_versions_;
- csync::WeakHandle<InvalidationStateTracker>
+ syncer::WeakHandle<InvalidationStateTracker>
invalidation_state_tracker_;
Listener* listener_;
scoped_ptr<invalidation::InvalidationClient> invalidation_client_;
@@ -160,6 +160,6 @@ class ChromeInvalidationClient
DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
diff --git a/sync/notifier/chrome_invalidation_client_unittest.cc b/sync/notifier/chrome_invalidation_client_unittest.cc
index fae864d..7c93eef 100644
--- a/sync/notifier/chrome_invalidation_client_unittest.cc
+++ b/sync/notifier/chrome_invalidation_client_unittest.cc
@@ -17,7 +17,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
using ::testing::_;
using ::testing::InSequence;
@@ -66,7 +66,7 @@ class ChromeInvalidationClientTest : public testing::Test {
virtual void SetUp() {
client_.Start(kClientId, kClientInfo, kState,
InvalidationVersionMap(),
- csync::MakeWeakHandle(
+ syncer::MakeWeakHandle(
mock_invalidation_state_tracker_.AsWeakPtr()),
&mock_listener_);
}
@@ -345,4 +345,4 @@ TEST_F(ChromeInvalidationClientTest, StateChangesAuthError) {
client_.Ready(NULL);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/chrome_system_resources.cc b/sync/notifier/chrome_system_resources.cc
index 702078b..af4cf9a 100644
--- a/sync/notifier/chrome_system_resources.cc
+++ b/sync/notifier/chrome_system_resources.cc
@@ -19,7 +19,7 @@
#include "jingle/notifier/listener/push_client.h"
#include "sync/notifier/invalidation_util.h"
-namespace csync {
+namespace syncer {
ChromeLogger::ChromeLogger() {}
ChromeLogger::~ChromeLogger() {}
@@ -252,4 +252,4 @@ ChromeScheduler* ChromeSystemResources::listener_scheduler() {
return listener_scheduler_.get();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/chrome_system_resources.h b/sync/notifier/chrome_system_resources.h
index 765d890..8b8b13f 100644
--- a/sync/notifier/chrome_system_resources.h
+++ b/sync/notifier/chrome_system_resources.h
@@ -27,7 +27,7 @@ namespace notifier {
class PushClient;
} // namespace notifier
-namespace csync {
+namespace syncer {
class ChromeLogger : public invalidation::Logger {
public:
@@ -146,6 +146,6 @@ class ChromeSystemResources : public invalidation::SystemResources {
PushClientChannel push_client_channel_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_
diff --git a/sync/notifier/chrome_system_resources_unittest.cc b/sync/notifier/chrome_system_resources_unittest.cc
index 8ec8c8d..7d05db8 100644
--- a/sync/notifier/chrome_system_resources_unittest.cc
+++ b/sync/notifier/chrome_system_resources_unittest.cc
@@ -17,7 +17,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
using ::testing::_;
@@ -174,4 +174,4 @@ TEST_F(ChromeSystemResourcesTest, WriteState) {
}
} // namespace
-} // namespace notifier
+} // namespace syncer
diff --git a/sync/notifier/invalidation_notifier.cc b/sync/notifier/invalidation_notifier.cc
index a57336e..633ce88 100644
--- a/sync/notifier/invalidation_notifier.cc
+++ b/sync/notifier/invalidation_notifier.cc
@@ -14,13 +14,13 @@
#include "talk/xmpp/jid.h"
#include "talk/xmpp/xmppclientsettings.h"
-namespace csync {
+namespace syncer {
InvalidationNotifier::InvalidationNotifier(
scoped_ptr<notifier::PushClient> push_client,
const InvalidationVersionMap& initial_max_invalidation_versions,
const std::string& initial_invalidation_state,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info)
: state_(STOPPED),
@@ -105,7 +105,7 @@ void InvalidationNotifier::OnInvalidate(
FOR_EACH_OBSERVER(
SyncNotifierObserver, observers_,
OnIncomingNotification(type_payloads,
- csync::REMOTE_NOTIFICATION));
+ syncer::REMOTE_NOTIFICATION));
}
void InvalidationNotifier::OnNotificationsEnabled() {
@@ -121,4 +121,4 @@ void InvalidationNotifier::OnNotificationsDisabled(
OnNotificationsDisabled(reason));
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/invalidation_notifier.h b/sync/notifier/invalidation_notifier.h
index b47f76f..fa57651 100644
--- a/sync/notifier/invalidation_notifier.h
+++ b/sync/notifier/invalidation_notifier.h
@@ -30,7 +30,7 @@ namespace notifier {
class PushClient;
} // namespace notifier
-namespace csync {
+namespace syncer {
// This class must live on the IO thread.
class InvalidationNotifier
@@ -43,7 +43,7 @@ class InvalidationNotifier
scoped_ptr<notifier::PushClient> push_client,
const InvalidationVersionMap& initial_max_invalidation_versions,
const std::string& initial_invalidation_state,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info);
@@ -84,7 +84,7 @@ class InvalidationNotifier
const InvalidationVersionMap initial_max_invalidation_versions_;
// Passed to |invalidation_client_|.
- const csync::WeakHandle<InvalidationStateTracker>
+ const syncer::WeakHandle<InvalidationStateTracker>
invalidation_state_tracker_;
// Passed to |invalidation_client_|.
@@ -107,6 +107,6 @@ class InvalidationNotifier
DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_
diff --git a/sync/notifier/invalidation_notifier_unittest.cc b/sync/notifier/invalidation_notifier_unittest.cc
index 4001223..d2de7ba 100644
--- a/sync/notifier/invalidation_notifier_unittest.cc
+++ b/sync/notifier/invalidation_notifier_unittest.cc
@@ -19,7 +19,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -48,7 +48,7 @@ class InvalidationNotifierTest : public testing::Test {
scoped_ptr<notifier::PushClient>(new notifier::FakePushClient()),
InvalidationVersionMap(),
initial_invalidation_state,
- csync::MakeWeakHandle(mock_tracker_.AsWeakPtr()),
+ syncer::MakeWeakHandle(mock_tracker_.AsWeakPtr()),
"fake_client_info"));
invalidation_notifier_->AddObserver(&mock_observer_);
}
@@ -127,4 +127,4 @@ TEST_F(InvalidationNotifierTest, MigrateState) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/invalidation_state_tracker.h b/sync/notifier/invalidation_state_tracker.h
index 9dbc352..8f080fa 100644
--- a/sync/notifier/invalidation_state_tracker.h
+++ b/sync/notifier/invalidation_state_tracker.h
@@ -14,7 +14,7 @@
#include "google/cacheinvalidation/include/types.h"
#include "sync/notifier/invalidation_util.h"
-namespace csync {
+namespace syncer {
typedef std::map<invalidation::ObjectId, int64, ObjectIdLessThan>
InvalidationVersionMap;
@@ -41,6 +41,6 @@ class InvalidationStateTracker {
virtual ~InvalidationStateTracker() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
diff --git a/sync/notifier/invalidation_util.cc b/sync/notifier/invalidation_util.cc
index 3e680ec..0973b7d 100644
--- a/sync/notifier/invalidation_util.cc
+++ b/sync/notifier/invalidation_util.cc
@@ -9,7 +9,7 @@
#include "google/cacheinvalidation/include/types.h"
#include "google/cacheinvalidation/v2/types.pb.h"
-namespace csync {
+namespace syncer {
bool ObjectIdLessThan::operator()(const invalidation::ObjectId& lhs,
const invalidation::ObjectId& rhs) const {
@@ -56,4 +56,4 @@ std::string InvalidationToString(
return ss.str();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/invalidation_util.h b/sync/notifier/invalidation_util.h
index 8a7c931..eaf1ff9 100644
--- a/sync/notifier/invalidation_util.h
+++ b/sync/notifier/invalidation_util.h
@@ -20,7 +20,7 @@ class ObjectId;
} // namespace invalidation
-namespace csync {
+namespace syncer {
struct ObjectIdLessThan {
bool operator()(const invalidation::ObjectId& lhs,
@@ -40,6 +40,6 @@ std::string ObjectIdToString(const invalidation::ObjectId& object_id);
std::string InvalidationToString(
const invalidation::Invalidation& invalidation);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_INVALIDATION_UTIL_H_
diff --git a/sync/notifier/mock_invalidation_state_tracker.cc b/sync/notifier/mock_invalidation_state_tracker.cc
index 2f855ed..37aabb3 100644
--- a/sync/notifier/mock_invalidation_state_tracker.cc
+++ b/sync/notifier/mock_invalidation_state_tracker.cc
@@ -4,9 +4,9 @@
#include "sync/notifier/mock_invalidation_state_tracker.h"
-namespace csync {
+namespace syncer {
MockInvalidationStateTracker::MockInvalidationStateTracker() {}
MockInvalidationStateTracker::~MockInvalidationStateTracker() {}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/mock_invalidation_state_tracker.h b/sync/notifier/mock_invalidation_state_tracker.h
index ac884f5..e6d992d 100644
--- a/sync/notifier/mock_invalidation_state_tracker.h
+++ b/sync/notifier/mock_invalidation_state_tracker.h
@@ -9,7 +9,7 @@
#include "sync/notifier/invalidation_state_tracker.h"
#include "testing/gmock/include/gmock/gmock.h"
-namespace csync {
+namespace syncer {
class MockInvalidationStateTracker
: public InvalidationStateTracker,
@@ -24,6 +24,6 @@ class MockInvalidationStateTracker
MOCK_METHOD1(SetInvalidationState, void(const std::string&));
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_MOCK_INVALIDATION_STATE_TRACKER_H_
diff --git a/sync/notifier/mock_sync_notifier_observer.cc b/sync/notifier/mock_sync_notifier_observer.cc
index 1287a23..d8db8f2 100644
--- a/sync/notifier/mock_sync_notifier_observer.cc
+++ b/sync/notifier/mock_sync_notifier_observer.cc
@@ -4,9 +4,9 @@
#include "sync/notifier/mock_sync_notifier_observer.h"
-namespace csync {
+namespace syncer {
MockSyncNotifierObserver::MockSyncNotifierObserver() {}
MockSyncNotifierObserver::~MockSyncNotifierObserver() {}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/mock_sync_notifier_observer.h b/sync/notifier/mock_sync_notifier_observer.h
index d25c184..315d104 100644
--- a/sync/notifier/mock_sync_notifier_observer.h
+++ b/sync/notifier/mock_sync_notifier_observer.h
@@ -11,7 +11,7 @@
#include "sync/notifier/sync_notifier_observer.h"
#include "testing/gmock/include/gmock/gmock.h"
-namespace csync {
+namespace syncer {
class MockSyncNotifierObserver : public SyncNotifierObserver {
public:
@@ -25,6 +25,6 @@ class MockSyncNotifierObserver : public SyncNotifierObserver {
IncomingNotificationSource));
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_MOCK_SYNC_NOTIFIER_OBSERVER_H_
diff --git a/sync/notifier/non_blocking_invalidation_notifier.cc b/sync/notifier/non_blocking_invalidation_notifier.cc
index 4f3459d..083fcb3 100644
--- a/sync/notifier/non_blocking_invalidation_notifier.cc
+++ b/sync/notifier/non_blocking_invalidation_notifier.cc
@@ -13,7 +13,7 @@
#include "jingle/notifier/listener/push_client.h"
#include "sync/notifier/invalidation_notifier.h"
-namespace csync {
+namespace syncer {
class NonBlockingInvalidationNotifier::Core
: public base::RefCountedThreadSafe<NonBlockingInvalidationNotifier::Core>,
@@ -23,7 +23,7 @@ class NonBlockingInvalidationNotifier::Core
// Called on parent thread. |delegate_observer| should be
// initialized.
explicit Core(
- const csync::WeakHandle<SyncNotifierObserver>&
+ const syncer::WeakHandle<SyncNotifierObserver>&
delegate_observer);
// Helpers called on I/O thread.
@@ -31,7 +31,7 @@ class NonBlockingInvalidationNotifier::Core
const notifier::NotifierOptions& notifier_options,
const InvalidationVersionMap& initial_max_invalidation_versions,
const std::string& initial_invalidation_state,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info);
void Teardown();
@@ -56,7 +56,7 @@ class NonBlockingInvalidationNotifier::Core
~Core();
// The variables below should be used only on the I/O thread.
- const csync::WeakHandle<SyncNotifierObserver> delegate_observer_;
+ const syncer::WeakHandle<SyncNotifierObserver> delegate_observer_;
scoped_ptr<InvalidationNotifier> invalidation_notifier_;
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
@@ -64,7 +64,7 @@ class NonBlockingInvalidationNotifier::Core
};
NonBlockingInvalidationNotifier::Core::Core(
- const csync::WeakHandle<SyncNotifierObserver>&
+ const syncer::WeakHandle<SyncNotifierObserver>&
delegate_observer)
: delegate_observer_(delegate_observer) {
DCHECK(delegate_observer_.IsInitialized());
@@ -77,7 +77,7 @@ void NonBlockingInvalidationNotifier::Core::Initialize(
const notifier::NotifierOptions& notifier_options,
const InvalidationVersionMap& initial_max_invalidation_versions,
const std::string& initial_invalidation_state,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info) {
DCHECK(notifier_options.request_context_getter);
@@ -155,12 +155,12 @@ NonBlockingInvalidationNotifier::NonBlockingInvalidationNotifier(
const notifier::NotifierOptions& notifier_options,
const InvalidationVersionMap& initial_max_invalidation_versions,
const std::string& initial_invalidation_state,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info)
: weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
core_(
- new Core(csync::MakeWeakHandle(
+ new Core(syncer::MakeWeakHandle(
weak_ptr_factory_.GetWeakPtr()))),
parent_task_runner_(
base::ThreadTaskRunnerHandle::Get()),
@@ -275,4 +275,4 @@ void NonBlockingInvalidationNotifier::OnIncomingNotification(
OnIncomingNotification(type_payloads, source));
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/non_blocking_invalidation_notifier.h b/sync/notifier/non_blocking_invalidation_notifier.h
index 0385c72..e953c3c 100644
--- a/sync/notifier/non_blocking_invalidation_notifier.h
+++ b/sync/notifier/non_blocking_invalidation_notifier.h
@@ -26,7 +26,7 @@ namespace base {
class SingleThreadTaskRunner;
} // namespace base
-namespace csync {
+namespace syncer {
class NonBlockingInvalidationNotifier
: public SyncNotifier,
@@ -38,7 +38,7 @@ class NonBlockingInvalidationNotifier
const notifier::NotifierOptions& notifier_options,
const InvalidationVersionMap& initial_max_invalidation_versions,
const std::string& initial_invalidation_state,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info);
@@ -81,6 +81,6 @@ class NonBlockingInvalidationNotifier
DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidationNotifier);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_
diff --git a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
index 2c4cfa7..a321907 100644
--- a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
+++ b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
@@ -18,7 +18,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -43,8 +43,8 @@ class NonBlockingInvalidationNotifierTest : public testing::Test {
notifier_options,
InvalidationVersionMap(),
std::string(), // initial_invalidation_state
- csync::MakeWeakHandle(
- base::WeakPtr<csync::InvalidationStateTracker>()),
+ syncer::MakeWeakHandle(
+ base::WeakPtr<syncer::InvalidationStateTracker>()),
"fake_client_info"));
invalidation_notifier_->AddObserver(&mock_observer_);
}
@@ -99,4 +99,4 @@ TEST_F(NonBlockingInvalidationNotifierTest, Basic) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/notifications_disabled_reason.cc b/sync/notifier/notifications_disabled_reason.cc
index 5636990..89c0a03 100644
--- a/sync/notifier/notifications_disabled_reason.cc
+++ b/sync/notifier/notifications_disabled_reason.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
-namespace csync {
+namespace syncer {
const char* NotificationsDisabledReasonToString(
NotificationsDisabledReason reason) {
@@ -38,4 +38,4 @@ NotificationsDisabledReason FromNotifierReason(
}
}
-} // sync_notifier
+} // namespace syncer
diff --git a/sync/notifier/notifications_disabled_reason.h b/sync/notifier/notifications_disabled_reason.h
index 9ee6f476..52a6a7d 100644
--- a/sync/notifier/notifications_disabled_reason.h
+++ b/sync/notifier/notifications_disabled_reason.h
@@ -8,7 +8,7 @@
#include "jingle/notifier/listener/push_client_observer.h"
-namespace csync {
+namespace syncer {
enum NotificationsDisabledReason {
// There is an underlying transient problem (e.g., network- or
@@ -28,6 +28,6 @@ const char* NotificationsDisabledReasonToString(
NotificationsDisabledReason FromNotifierReason(
notifier::NotificationsDisabledReason reason);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_
diff --git a/sync/notifier/p2p_notifier.cc b/sync/notifier/p2p_notifier.cc
index 548e0f5..f92cd98 100644
--- a/sync/notifier/p2p_notifier.cc
+++ b/sync/notifier/p2p_notifier.cc
@@ -14,7 +14,7 @@
#include "sync/internal_api/public/syncable/model_type_payload_map.h"
#include "sync/notifier/sync_notifier_observer.h"
-namespace csync {
+namespace syncer {
const char* kSyncP2PNotificationChannel = "http://www.google.com/chrome/sync";
@@ -289,4 +289,4 @@ void P2PNotifier::SendNotificationData(
push_client_->SendNotification(notification);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/p2p_notifier.h b/sync/notifier/p2p_notifier.h
index d449952..7ef9238 100644
--- a/sync/notifier/p2p_notifier.h
+++ b/sync/notifier/p2p_notifier.h
@@ -25,7 +25,7 @@ namespace notifier {
class PushClient;
} // namespace notifier
-namespace csync {
+namespace syncer {
// The channel to use for sync notifications.
extern const char* kSyncP2PNotificationChannel;
@@ -137,6 +137,6 @@ class P2PNotifier
syncable::ModelTypeSet enabled_types_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_P2P_NOTIFIER_H_
diff --git a/sync/notifier/p2p_notifier_unittest.cc b/sync/notifier/p2p_notifier_unittest.cc
index 845dc8e..905e688 100644
--- a/sync/notifier/p2p_notifier_unittest.cc
+++ b/sync/notifier/p2p_notifier_unittest.cc
@@ -11,7 +11,7 @@
#include "sync/notifier/mock_sync_notifier_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -288,4 +288,4 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/push_client_channel.cc b/sync/notifier/push_client_channel.cc
index a806b20b..5cfd843 100644
--- a/sync/notifier/push_client_channel.cc
+++ b/sync/notifier/push_client_channel.cc
@@ -8,7 +8,7 @@
#include "google/cacheinvalidation/v2/client_gateway.pb.h"
#include "jingle/notifier/listener/push_client.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -156,4 +156,4 @@ bool PushClientChannel::DecodeMessage(
return true;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/push_client_channel.h b/sync/notifier/push_client_channel.h
index 14d168d..c966b03 100644
--- a/sync/notifier/push_client_channel.h
+++ b/sync/notifier/push_client_channel.h
@@ -19,7 +19,7 @@ namespace notifier {
class PushClient;
} // namespace notifier
-namespace csync {
+namespace syncer {
// A PushClientChannel is an implementation of NetworkChannel that
// routes messages through a PushClient.
@@ -99,6 +99,6 @@ class PushClientChannel
DISALLOW_COPY_AND_ASSIGN(PushClientChannel);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_
diff --git a/sync/notifier/push_client_channel_unittest.cc b/sync/notifier/push_client_channel_unittest.cc
index af59444..4ac0c58 100644
--- a/sync/notifier/push_client_channel_unittest.cc
+++ b/sync/notifier/push_client_channel_unittest.cc
@@ -12,7 +12,7 @@
#include "jingle/notifier/listener/notification_defines.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
class PushClientChannelTest : public ::testing::Test {
@@ -250,4 +250,4 @@ TEST_F(PushClientChannelTest, PersistedMessageState) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/registration_manager.cc b/sync/notifier/registration_manager.cc
index f999a8e..3d20df0 100644
--- a/sync/notifier/registration_manager.cc
+++ b/sync/notifier/registration_manager.cc
@@ -16,7 +16,7 @@
#include "google/cacheinvalidation/include/types.h"
#include "sync/notifier/invalidation_util.h"
-namespace csync {
+namespace syncer {
RegistrationManager::PendingRegistrationInfo::PendingRegistrationInfo() {}
@@ -300,4 +300,4 @@ bool RegistrationManager::IsIdRegistered(
it->second->state == invalidation::InvalidationListener::REGISTERED;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/registration_manager.h b/sync/notifier/registration_manager.h
index cf0144c..8500655 100644
--- a/sync/notifier/registration_manager.h
+++ b/sync/notifier/registration_manager.h
@@ -20,7 +20,7 @@
#include "google/cacheinvalidation/include/types.h"
#include "sync/notifier/invalidation_util.h"
-namespace csync {
+namespace syncer {
using ::invalidation::InvalidationListener;
@@ -181,6 +181,6 @@ class RegistrationManager : public base::NonThreadSafe {
DISALLOW_COPY_AND_ASSIGN(RegistrationManager);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_REGISTRATION_MANAGER_H_
diff --git a/sync/notifier/registration_manager_unittest.cc b/sync/notifier/registration_manager_unittest.cc
index 17f25fe..e2b9b91 100644
--- a/sync/notifier/registration_manager_unittest.cc
+++ b/sync/notifier/registration_manager_unittest.cc
@@ -17,7 +17,7 @@
#include "sync/notifier/invalidation_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
// Fake registration manager that lets you override jitter.
@@ -422,4 +422,4 @@ TEST_F(RegistrationManagerTest, DisableId) {
}
} // namespace
-} // namespace notifier
+} // namespace syncer
diff --git a/sync/notifier/state_writer.h b/sync/notifier/state_writer.h
index f135f15..4fe33cb 100644
--- a/sync/notifier/state_writer.h
+++ b/sync/notifier/state_writer.h
@@ -10,7 +10,7 @@
#include <string>
-namespace csync {
+namespace syncer {
class StateWriter {
public:
@@ -19,6 +19,6 @@ class StateWriter {
virtual void WriteState(const std::string& state) = 0;
};
-} // sync_notifier
+} // namespace syncer
#endif // SYNC_NOTIFIER_STATE_WRITER_H_
diff --git a/sync/notifier/sync_notifier.h b/sync/notifier/sync_notifier.h
index 4f3a430..a92a8a4 100644
--- a/sync/notifier/sync_notifier.h
+++ b/sync/notifier/sync_notifier.h
@@ -13,7 +13,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync {
+namespace syncer {
class SyncNotifierObserver;
class SyncNotifier {
@@ -50,6 +50,6 @@ class SyncNotifier {
virtual void SendNotification(
syncable::ModelTypeSet changed_types) = 0;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_SYNC_NOTIFIER_H_
diff --git a/sync/notifier/sync_notifier_factory.cc b/sync/notifier/sync_notifier_factory.cc
index d528987..66077bd 100644
--- a/sync/notifier/sync_notifier_factory.cc
+++ b/sync/notifier/sync_notifier_factory.cc
@@ -12,14 +12,14 @@
#include "sync/notifier/p2p_notifier.h"
#include "sync/notifier/sync_notifier.h"
-namespace csync {
+namespace syncer {
namespace {
SyncNotifier* CreateDefaultSyncNotifier(
const notifier::NotifierOptions& notifier_options,
const InvalidationVersionMap& initial_max_invalidation_versions,
const std::string& initial_invalidation_state,
- const csync::WeakHandle<InvalidationStateTracker>&
+ const syncer::WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info) {
if (notifier_options.notification_method == notifier::NOTIFICATION_P2P) {
@@ -73,4 +73,4 @@ SyncNotifier* SyncNotifierFactory::CreateSyncNotifier() {
client_info_);
#endif
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/sync_notifier_factory.h b/sync/notifier/sync_notifier_factory.h
index 851db09..1d8dcd1 100644
--- a/sync/notifier/sync_notifier_factory.h
+++ b/sync/notifier/sync_notifier_factory.h
@@ -12,7 +12,7 @@
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/invalidation_state_tracker.h"
-namespace csync {
+namespace syncer {
class SyncNotifier;
@@ -40,10 +40,10 @@ class SyncNotifierFactory {
const std::string client_info_;
const InvalidationVersionMap initial_max_invalidation_versions_;
const std::string initial_invalidation_state_;
- const csync::WeakHandle<InvalidationStateTracker>
+ const syncer::WeakHandle<InvalidationStateTracker>
invalidation_state_tracker_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_SYNC_NOTIFIER_FACTORY_H_
diff --git a/sync/notifier/sync_notifier_factory_unittest.cc b/sync/notifier/sync_notifier_factory_unittest.cc
index bdbc947..629bc23 100644
--- a/sync/notifier/sync_notifier_factory_unittest.cc
+++ b/sync/notifier/sync_notifier_factory_unittest.cc
@@ -22,7 +22,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
using ::testing::Mock;
@@ -54,7 +54,7 @@ TEST_F(SyncNotifierFactoryTest, Basic) {
SyncNotifierFactory factory(
notifier_options_,
"test client info",
- base::WeakPtr<csync::InvalidationStateTracker>());
+ base::WeakPtr<syncer::InvalidationStateTracker>());
scoped_ptr<SyncNotifier> notifier(factory.CreateSyncNotifier());
#if defined(OS_ANDROID)
ASSERT_FALSE(notifier.get());
@@ -71,7 +71,7 @@ TEST_F(SyncNotifierFactoryTest, Basic_P2P) {
SyncNotifierFactory factory(
notifier_options_,
"test client info",
- base::WeakPtr<csync::InvalidationStateTracker>());
+ base::WeakPtr<syncer::InvalidationStateTracker>());
scoped_ptr<SyncNotifier> notifier(factory.CreateSyncNotifier());
#if defined(OS_ANDROID)
ASSERT_FALSE(notifier.get());
@@ -83,4 +83,4 @@ TEST_F(SyncNotifierFactoryTest, Basic_P2P) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/notifier/sync_notifier_observer.h b/sync/notifier/sync_notifier_observer.h
index 1c2f1e8..b09770d 100644
--- a/sync/notifier/sync_notifier_observer.h
+++ b/sync/notifier/sync_notifier_observer.h
@@ -9,7 +9,7 @@
#include "sync/internal_api/public/syncable/model_type_payload_map.h"
#include "sync/notifier/notifications_disabled_reason.h"
-namespace csync {
+namespace syncer {
enum IncomingNotificationSource {
// The server is notifying us that one or more datatypes have stale data.
@@ -38,6 +38,6 @@ class SyncNotifierObserver {
virtual ~SyncNotifierObserver() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_NOTIFIER_SYNC_NOTIFIER_OBSERVER_H_
diff --git a/sync/protocol/proto_enum_conversions.cc b/sync/protocol/proto_enum_conversions.cc
index f8fc148..d80b4e3 100644
--- a/sync/protocol/proto_enum_conversions.cc
+++ b/sync/protocol/proto_enum_conversions.cc
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
-namespace csync {
+namespace syncer {
#define ASSERT_ENUM_BOUNDS(enum_parent, enum_type, enum_min, enum_max) \
COMPILE_ASSERT(enum_parent::enum_type##_MIN == enum_parent::enum_min, \
@@ -170,4 +170,4 @@ const char* GetFaviconTypeString(
#undef ASSERT_ENUM_BOUNDS
#undef ENUM_CASE
-} // namespace
+} // namespace syncer
diff --git a/sync/protocol/proto_enum_conversions.h b/sync/protocol/proto_enum_conversions.h
index f9c07da..377ec0d 100644
--- a/sync/protocol/proto_enum_conversions.h
+++ b/sync/protocol/proto_enum_conversions.h
@@ -14,7 +14,7 @@
// Utility functions to get the string equivalent for some sync proto
// enums.
-namespace csync {
+namespace syncer {
// The returned strings (which don't have to be freed) are in ASCII.
// The result of passing in an invalid enum value is undefined.
@@ -45,6 +45,6 @@ const char* GetDeviceTypeString(
const char* GetFaviconTypeString(
sync_pb::SessionTab::FaviconType favicon_type);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
diff --git a/sync/protocol/proto_enum_conversions_unittest.cc b/sync/protocol/proto_enum_conversions_unittest.cc
index eb69d5a..de208b9 100644
--- a/sync/protocol/proto_enum_conversions_unittest.cc
+++ b/sync/protocol/proto_enum_conversions_unittest.cc
@@ -10,7 +10,7 @@
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
class ProtoEnumConversionsTest : public testing::Test {
@@ -90,4 +90,4 @@ TEST_F(ProtoEnumConversionsTest, GetActionString) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index 8b2e819..cee2139 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -29,7 +29,7 @@
#include "sync/protocol/theme_specifics.pb.h"
#include "sync/protocol/typed_url_specifics.pb.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -593,4 +593,4 @@ DictionaryValue* ClientToServerMessageToValue(
#undef SET_FIELD
-} // namespace csync
+} // namespace syncer
diff --git a/sync/protocol/proto_value_conversions.h b/sync/protocol/proto_value_conversions.h
index 6c61903..4ef2400 100644
--- a/sync/protocol/proto_value_conversions.h
+++ b/sync/protocol/proto_value_conversions.h
@@ -50,7 +50,7 @@ class TypedUrlSpecifics;
//
// TODO(akalin): Improve enum support.
-namespace csync {
+namespace syncer {
// Ownership of all returned DictionaryValues are transferred to the
// caller.
@@ -148,6 +148,6 @@ base::DictionaryValue* ClientToServerResponseToValue(
bool include_specifics);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc
index 6363c736..304a33f 100644
--- a/sync/protocol/proto_value_conversions_unittest.cc
+++ b/sync/protocol/proto_value_conversions_unittest.cc
@@ -27,7 +27,7 @@
#include "sync/protocol/typed_url_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
class ProtoValueConversionsTest : public testing::Test {
@@ -250,4 +250,4 @@ TEST_F(ProtoValueConversionsTest, ClientToServerResponseToValue) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/protocol/sync_protocol_error.cc b/sync/protocol/sync_protocol_error.cc
index 61c0351..52421cd 100644
--- a/sync/protocol/sync_protocol_error.cc
+++ b/sync/protocol/sync_protocol_error.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/values.h"
-namespace csync {
+namespace syncer {
#define ENUM_CASE(x) case x: return #x; break;
const char* GetSyncErrorTypeString(SyncProtocolErrorType type) {
@@ -59,5 +59,5 @@ DictionaryValue* SyncProtocolError::ToValue() const {
return value;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/protocol/sync_protocol_error.h b/sync/protocol/sync_protocol_error.h
index fc83de1..718cc2d 100644
--- a/sync/protocol/sync_protocol_error.h
+++ b/sync/protocol/sync_protocol_error.h
@@ -10,7 +10,7 @@
#include "base/values.h"
#include "sync/internal_api/public/syncable/model_type.h"
-namespace csync{
+namespace syncer{
enum SyncProtocolErrorType {
// Success case.
@@ -76,6 +76,6 @@ struct SyncProtocolError {
const char* GetSyncErrorTypeString(SyncProtocolErrorType type);
const char* GetClientActionString(ClientAction action);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
diff --git a/sync/sessions/debug_info_getter.h b/sync/sessions/debug_info_getter.h
index 3dea807..c434091 100644
--- a/sync/sessions/debug_info_getter.h
+++ b/sync/sessions/debug_info_getter.h
@@ -7,7 +7,7 @@
#include "sync/protocol/sync.pb.h"
-namespace csync {
+namespace syncer {
namespace sessions {
// This is the interface that needs to be implemented by the event listener
@@ -21,7 +21,7 @@ class DebugInfoGetter {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_SESSIONS_DEBUG_INFO_GETTER_H_
diff --git a/sync/sessions/ordered_commit_set.cc b/sync/sessions/ordered_commit_set.cc
index 91bc5e2..1d13c09 100644
--- a/sync/sessions/ordered_commit_set.cc
+++ b/sync/sessions/ordered_commit_set.cc
@@ -8,11 +8,11 @@
#include "base/logging.h"
-namespace csync {
+namespace syncer {
namespace sessions {
OrderedCommitSet::OrderedCommitSet(
- const csync::ModelSafeRoutingInfo& routes)
+ const syncer::ModelSafeRoutingInfo& routes)
: routes_(routes) {
}
@@ -32,7 +32,7 @@ void OrderedCommitSet::AddCommitItem(const int64 metahandle,
}
const OrderedCommitSet::Projection& OrderedCommitSet::GetCommitIdProjection(
- csync::ModelSafeGroup group) const {
+ syncer::ModelSafeGroup group) const {
Projections::const_iterator i = projections_.find(group);
DCHECK(i != projections_.end());
return i->second;
@@ -124,5 +124,5 @@ void OrderedCommitSet::operator=(const OrderedCommitSet& other) {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/ordered_commit_set.h b/sync/sessions/ordered_commit_set.h
index 7c1937e..1fe8d7c 100644
--- a/sync/sessions/ordered_commit_set.h
+++ b/sync/sessions/ordered_commit_set.h
@@ -14,7 +14,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/syncable/syncable_id.h"
-namespace csync {
+namespace syncer {
namespace sessions {
// TODO(ncarter): This code is more generic than just Commit and can
@@ -30,7 +30,7 @@ class OrderedCommitSet {
typedef std::vector<size_t> Projection;
// TODO(chron): Reserve space according to batch size?
- explicit OrderedCommitSet(const csync::ModelSafeRoutingInfo& routes);
+ explicit OrderedCommitSet(const syncer::ModelSafeRoutingInfo& routes);
~OrderedCommitSet();
bool HaveCommitItem(const int64 metahandle) const {
@@ -65,7 +65,7 @@ class OrderedCommitSet {
// response one ModelSafeGroup at a time. See GetCommitIdAt for how the
// indices contained in the returned Projection can be used.
const Projection& GetCommitIdProjection(
- csync::ModelSafeGroup group) const;
+ syncer::ModelSafeGroup group) const;
size_t Size() const {
return commit_ids_.size();
@@ -89,7 +89,7 @@ class OrderedCommitSet {
void operator=(const OrderedCommitSet& other);
private:
// A set of CommitIdProjections associated with particular ModelSafeGroups.
- typedef std::map<csync::ModelSafeGroup, Projection> Projections;
+ typedef std::map<syncer::ModelSafeGroup, Projection> Projections;
// Helper container for return value of GetCommitItemAt.
struct CommitItem {
@@ -115,11 +115,11 @@ class OrderedCommitSet {
// and shouldn't take up too much extra space since commit lists are small.
std::vector<syncable::ModelType> types_;
- csync::ModelSafeRoutingInfo routes_;
+ syncer::ModelSafeRoutingInfo routes_;
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
diff --git a/sync/sessions/ordered_commit_set_unittest.cc b/sync/sessions/ordered_commit_set_unittest.cc
index 85ca08f..fcdc891 100644
--- a/sync/sessions/ordered_commit_set_unittest.cc
+++ b/sync/sessions/ordered_commit_set_unittest.cc
@@ -11,17 +11,17 @@ using std::vector;
class OrderedCommitSetTest : public testing::Test {
public:
OrderedCommitSetTest() {
- routes_[syncable::BOOKMARKS] = csync::GROUP_UI;
- routes_[syncable::PREFERENCES] = csync::GROUP_UI;
- routes_[syncable::AUTOFILL] = csync::GROUP_DB;
- routes_[syncable::TOP_LEVEL_FOLDER] = csync::GROUP_PASSIVE;
+ routes_[syncable::BOOKMARKS] = syncer::GROUP_UI;
+ routes_[syncable::PREFERENCES] = syncer::GROUP_UI;
+ routes_[syncable::AUTOFILL] = syncer::GROUP_DB;
+ routes_[syncable::TOP_LEVEL_FOLDER] = syncer::GROUP_PASSIVE;
}
protected:
- csync::TestIdFactory ids_;
- csync::ModelSafeRoutingInfo routes_;
+ syncer::TestIdFactory ids_;
+ syncer::ModelSafeRoutingInfo routes_;
};
-namespace csync {
+namespace syncer {
namespace sessions {
TEST_F(OrderedCommitSetTest, Projections) {
@@ -128,5 +128,5 @@ TEST_F(OrderedCommitSetTest, AddAndRemoveEntries) {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/session_state.cc b/sync/sessions/session_state.cc
index 6a088d0..cd99800 100644
--- a/sync/sessions/session_state.cc
+++ b/sync/sessions/session_state.cc
@@ -13,7 +13,7 @@
using std::set;
using std::vector;
-namespace csync {
+namespace syncer {
namespace sessions {
ConflictProgress::ConflictProgress()
@@ -139,4 +139,4 @@ PerModelSafeGroupState::~PerModelSafeGroupState() {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/session_state.h b/sync/sessions/session_state.h
index ab35ae8..23f720c 100644
--- a/sync/sessions/session_state.h
+++ b/sync/sessions/session_state.h
@@ -20,7 +20,7 @@
#include "sync/engine/syncproto.h"
#include "sync/syncable/syncable_id.h"
-namespace csync {
+namespace syncer {
namespace sessions {
// Tracks progress of conflicts and their resolutions.
@@ -129,6 +129,6 @@ struct PerModelSafeGroupState {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_SESSIONS_SESSION_STATE_H_
diff --git a/sync/sessions/session_state_unittest.cc b/sync/sessions/session_state_unittest.cc
index 52d7e80..3d1b07c 100644
--- a/sync/sessions/session_state_unittest.cc
+++ b/sync/sessions/session_state_unittest.cc
@@ -15,7 +15,7 @@
#include "sync/internal_api/public/sessions/sync_source_info.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace sessions {
namespace {
@@ -132,4 +132,4 @@ TEST_F(SessionStateTest, SyncSessionSnapshotToValue) {
} // namespace
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/status_controller.cc b/sync/sessions/status_controller.cc
index cab189e..5cca02c 100644
--- a/sync/sessions/status_controller.cc
+++ b/sync/sessions/status_controller.cc
@@ -10,7 +10,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
-namespace csync {
+namespace syncer {
namespace sessions {
using syncable::FIRST_REAL_MODEL_TYPE;
@@ -269,4 +269,4 @@ bool StatusController::debug_info_sent() const {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h
index 7837e90..0780a93 100644
--- a/sync/sessions/status_controller.h
+++ b/sync/sessions/status_controller.h
@@ -43,7 +43,7 @@
#include "sync/sessions/ordered_commit_set.h"
#include "sync/sessions/session_state.h"
-namespace csync {
+namespace syncer {
namespace sessions {
class StatusController {
@@ -234,7 +234,7 @@ class ScopedModelSafeGroupRestriction {
DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction);
};
-}
-}
+} // namespace sessions
+} // namespace syncer
#endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_
diff --git a/sync/sessions/status_controller_unittest.cc b/sync/sessions/status_controller_unittest.cc
index 9037c30..b88ea26 100644
--- a/sync/sessions/status_controller_unittest.cc
+++ b/sync/sessions/status_controller_unittest.cc
@@ -6,7 +6,7 @@
#include "sync/test/engine/test_id_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace sessions {
class StatusControllerTest : public testing::Test {
@@ -128,4 +128,4 @@ TEST_F(StatusControllerTest, Unrestricted) {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc
index 1ef6e40..da73b1a 100644
--- a/sync/sessions/sync_session.cc
+++ b/sync/sessions/sync_session.cc
@@ -11,7 +11,7 @@
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/syncable/directory.h"
-namespace csync {
+namespace syncer {
namespace sessions {
namespace {
@@ -257,4 +257,4 @@ void SyncSession::SetFinished() {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/sync_session.h b/sync/sessions/sync_session.h
index 6ccae9e..e847ddb 100644
--- a/sync/sessions/sync_session.h
+++ b/sync/sessions/sync_session.h
@@ -37,7 +37,7 @@ namespace syncable {
class WriteTransaction;
}
-namespace csync {
+namespace syncer {
class ModelSafeWorker;
namespace sessions {
@@ -247,6 +247,6 @@ class ScopedSetSessionWriteTransaction {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_SESSIONS_SYNC_SESSION_H_
diff --git a/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc
index 22f7582..8edb458 100644
--- a/sync/sessions/sync_session_context.cc
+++ b/sync/sessions/sync_session_context.cc
@@ -8,7 +8,7 @@
#include "sync/sessions/debug_info_getter.h"
#include "sync/util/extensions_activity_monitor.h"
-namespace csync {
+namespace syncer {
namespace sessions {
const unsigned int kMaxMessagesToRecord = 10;
@@ -23,7 +23,7 @@ SyncSessionContext::SyncSessionContext(
ThrottledDataTypeTracker* throttled_data_type_tracker,
const std::vector<SyncEngineEventListener*>& listeners,
DebugInfoGetter* debug_info_getter,
- csync::TrafficRecorder* traffic_recorder)
+ syncer::TrafficRecorder* traffic_recorder)
: resolver_(NULL),
connection_manager_(connection_manager),
directory_(directory),
@@ -44,4 +44,4 @@ SyncSessionContext::~SyncSessionContext() {
}
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
index 20f574c..ab54042 100644
--- a/sync/sessions/sync_session_context.h
+++ b/sync/sessions/sync_session_context.h
@@ -34,7 +34,7 @@ namespace syncable {
class Directory;
}
-namespace csync {
+namespace syncer {
class ConflictResolver;
class ExtensionsActivityMonitor;
@@ -58,7 +58,7 @@ class SyncSessionContext {
ThrottledDataTypeTracker* throttled_data_type_tracker,
const std::vector<SyncEngineEventListener*>& listeners,
DebugInfoGetter* debug_info_getter,
- csync::TrafficRecorder* traffic_recorder);
+ syncer::TrafficRecorder* traffic_recorder);
~SyncSessionContext();
ConflictResolver* resolver() { return resolver_; }
@@ -124,7 +124,7 @@ class SyncSessionContext {
OnSyncEngineEvent(event));
}
- csync::TrafficRecorder* traffic_recorder() {
+ syncer::TrafficRecorder* traffic_recorder() {
return traffic_recorder_;
}
@@ -174,7 +174,7 @@ class SyncSessionContext {
// client behavior on server side.
DebugInfoGetter* const debug_info_getter_;
- csync::TrafficRecorder* traffic_recorder_;
+ syncer::TrafficRecorder* traffic_recorder_;
DISALLOW_COPY_AND_ASSIGN(SyncSessionContext);
};
@@ -203,6 +203,6 @@ class ScopedSessionContextConflictResolver {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc
index c792c9d..fb6c684 100644
--- a/sync/sessions/sync_session_unittest.cc
+++ b/sync/sessions/sync_session_unittest.cc
@@ -23,7 +23,7 @@
using syncable::WriteTransaction;
-namespace csync {
+namespace syncer {
namespace sessions {
namespace {
@@ -536,4 +536,4 @@ TEST_F(SyncSessionTest, CoalescePayloads) {
} // namespace
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/test_util.cc b/sync/sessions/test_util.cc
index d1bd5b7..875d133 100644
--- a/sync/sessions/test_util.cc
+++ b/sync/sessions/test_util.cc
@@ -4,7 +4,7 @@
#include "sync/sessions/test_util.h"
-namespace csync {
+namespace syncer {
namespace sessions {
namespace test_util {
@@ -63,4 +63,4 @@ void SimulateSessionsCommitDelayUpdateImpl(sessions::SyncSession* session,
} // namespace test_util
} // namespace sessions
-} // namespace csync
+} // namespace syncer
diff --git a/sync/sessions/test_util.h b/sync/sessions/test_util.h
index 01fa3aa..c27d752 100644
--- a/sync/sessions/test_util.h
+++ b/sync/sessions/test_util.h
@@ -12,7 +12,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace sessions {
namespace test_util {
@@ -47,6 +47,6 @@ ACTION_P(SimulateSessionsCommitDelayUpdate, poll) {
} // namespace test_util
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_SESSIONS_TEST_UTIL_H_
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index 92ca8fe..1b515f8 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -21,9 +21,9 @@
#include "sync/syncable/syncable_util.h"
#include "sync/syncable/write_transaction.h"
-using csync::Encryptor;
-using csync::ReportUnrecoverableErrorFunction;
-using csync::UnrecoverableErrorHandler;
+using syncer::Encryptor;
+using syncer::ReportUnrecoverableErrorFunction;
+using syncer::UnrecoverableErrorHandler;
using std::string;
namespace syncable {
@@ -113,7 +113,7 @@ const FilePath::CharType Directory::kSyncDatabaseFilename[] =
void Directory::InitKernelForTest(
const std::string& name,
DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer) {
DCHECK(!kernel_);
kernel_ = new Kernel(name, KernelLoadInfo(), delegate, transaction_observer);
@@ -145,7 +145,7 @@ Directory::SaveChangesSnapshot::~SaveChangesSnapshot() {}
Directory::Kernel::Kernel(
const std::string& name,
const KernelLoadInfo& info, DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer)
: next_write_transaction_id(0),
name(name),
@@ -198,7 +198,7 @@ Directory::~Directory() {
DirOpenResult Directory::Open(
const string& name,
DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer) {
TRACE_EVENT0("sync", "SyncDatabaseOpen");
@@ -232,7 +232,7 @@ void Directory::InitializeIndices() {
DirOpenResult Directory::OpenImpl(
const string& name,
DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer) {
KernelLoadInfo info;
@@ -760,7 +760,7 @@ string Directory::cache_guid() const {
return kernel_->cache_guid;
}
-csync::Cryptographer* Directory::GetCryptographer(
+syncer::Cryptographer* Directory::GetCryptographer(
const BaseTransaction* trans) {
DCHECK_EQ(this, trans->directory());
return &cryptographer_;
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index 95b5893..a7f7fe1 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -20,7 +20,7 @@
#include "sync/syncable/scoped_kernel_lock.h"
#include "sync/util/cryptographer.h"
-namespace csync {
+namespace syncer {
class Encryptor;
class UnrecoverableErrorHandler;
}
@@ -202,9 +202,9 @@ class Directory {
// |report_unrecoverable_error_function| may be NULL.
// Takes ownership of |store|.
Directory(
- csync::Encryptor* encryptor,
- csync::UnrecoverableErrorHandler* unrecoverable_error_handler,
- csync::ReportUnrecoverableErrorFunction
+ syncer::Encryptor* encryptor,
+ syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
+ syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function,
DirectoryBackingStore* store);
virtual ~Directory();
@@ -215,7 +215,7 @@ class Directory {
// thread. |transaction_observer| must be initialized.
DirOpenResult Open(const std::string& name,
DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer);
// Stops sending events to the delegate and the transaction
@@ -263,7 +263,7 @@ class Directory {
// Returns a pointer to our cryptographer. Does not transfer ownership. The
// cryptographer is not thread safe; it should not be accessed after the
// transaction has been released.
- csync::Cryptographer* GetCryptographer(const BaseTransaction* trans);
+ syncer::Cryptographer* GetCryptographer(const BaseTransaction* trans);
// Returns true if the directory had encountered an unrecoverable error.
// Note: Any function in |Directory| that can be called without holding a
@@ -309,7 +309,7 @@ class Directory {
DirOpenResult OpenImpl(
const std::string& name,
DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer);
private:
@@ -477,7 +477,7 @@ class Directory {
void InitKernelForTest(
const std::string& name,
DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer);
private:
@@ -486,7 +486,7 @@ class Directory {
// initialized.
Kernel(const std::string& name, const KernelLoadInfo& info,
DirectoryChangeDelegate* delegate,
- const csync::WeakHandle<TransactionObserver>&
+ const syncer::WeakHandle<TransactionObserver>&
transaction_observer);
~Kernel();
@@ -554,7 +554,7 @@ class Directory {
DirectoryChangeDelegate* const delegate;
// The transaction observer.
- const csync::WeakHandle<TransactionObserver> transaction_observer;
+ const syncer::WeakHandle<TransactionObserver> transaction_observer;
};
// Helper method used to do searches on |parent_id_child_index|.
@@ -593,18 +593,18 @@ class Directory {
EntryKernel* GetPossibleLastChildForTest(
const ScopedKernelLock& lock, const Id& parent_id);
- csync::Cryptographer cryptographer_;
+ syncer::Cryptographer cryptographer_;
Kernel* kernel_;
scoped_ptr<DirectoryBackingStore> store_;
- csync::UnrecoverableErrorHandler* const unrecoverable_error_handler_;
- const csync::ReportUnrecoverableErrorFunction
+ syncer::UnrecoverableErrorHandler* const unrecoverable_error_handler_;
+ const syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function_;
bool unrecoverable_error_set_;
};
-} // namespace syncable
+} // namespace syncable
#endif // SYNC_SYNCABLE_DIRECTORY_H_
diff --git a/sync/syncable/directory_backing_store.cc b/sync/syncable/directory_backing_store.cc
index 177f1ec..6813cd7 100644
--- a/sync/syncable/directory_backing_store.cc
+++ b/sync/syncable/directory_backing_store.cc
@@ -50,7 +50,7 @@ void BindFields(const EntryKernel& entry,
}
for ( ; i < TIME_FIELDS_END; ++i) {
statement->BindInt64(index++,
- csync::TimeToProtoTime(
+ syncer::TimeToProtoTime(
entry.ref(static_cast<TimeField>(i))));
}
for ( ; i < ID_FIELDS_END; ++i) {
@@ -80,7 +80,7 @@ EntryKernel* UnpackEntry(sql::Statement* statement) {
}
for ( ; i < TIME_FIELDS_END; ++i) {
kernel->put(static_cast<TimeField>(i),
- csync::ProtoTimeToTime(statement->ColumnInt64(i)));
+ syncer::ProtoTimeToTime(statement->ColumnInt64(i)));
}
for ( ; i < ID_FIELDS_END; ++i) {
kernel->mutable_ref(static_cast<IdField>(i)).s_ =
@@ -996,7 +996,7 @@ bool DirectoryBackingStore::CreateTables() {
{
// Insert the entry for the root into the metas table.
- const int64 now = csync::TimeToProtoTime(base::Time::Now());
+ const int64 now = syncer::TimeToProtoTime(base::Time::Now());
sql::Statement s(db_->GetUniqueStatement(
"INSERT INTO metas "
"( id, metahandle, is_dir, ctime, mtime) "
diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc
index bfb01407..eb892c5 100644
--- a/sync/syncable/directory_backing_store_unittest.cc
+++ b/sync/syncable/directory_backing_store_unittest.cc
@@ -287,7 +287,7 @@ std::map<int64, base::Time> GetExpectedMetaTimes() {
expected_meta_proto_times.begin();
it != expected_meta_proto_times.end(); ++it) {
expected_meta_times[it->first] =
- csync::ProtoTimeToTime(it->second);
+ syncer::ProtoTimeToTime(it->second);
}
return expected_meta_times;
}
@@ -327,8 +327,8 @@ std::map<int64, int64> GetMetaProtoTimes(sql::Connection *db) {
<< t1_expr << " and " << t2_expr
<< " (internal values: " << t1.ToInternalValue()
<< " and " << t2.ToInternalValue()
- << ") (proto time: " << csync::TimeToProtoTime(t1)
- << " and " << csync::TimeToProtoTime(t2)
+ << ") (proto time: " << syncer::TimeToProtoTime(t1)
+ << " and " << syncer::TimeToProtoTime(t2)
<< ") do not match";
}
diff --git a/sync/syncable/entry.cc b/sync/syncable/entry.cc
index b9d05a0..bb57564 100644
--- a/sync/syncable/entry.cc
+++ b/sync/syncable/entry.cc
@@ -110,7 +110,7 @@ std::ostream& operator<<(std::ostream& os, const Entry& entry) {
}
for ( ; i < TIME_FIELDS_END; ++i) {
os << g_metas_columns[i].name << ": "
- << csync::GetTimeDebugString(
+ << syncer::GetTimeDebugString(
kernel->ref(static_cast<TimeField>(i))) << ", ";
}
for ( ; i < ID_FIELDS_END; ++i) {
diff --git a/sync/syncable/entry.h b/sync/syncable/entry.h
index 9ace7ae..374bb36 100644
--- a/sync/syncable/entry.h
+++ b/sync/syncable/entry.h
@@ -8,7 +8,7 @@
#include "sync/syncable/entry_kernel.h"
-namespace csync {
+namespace syncer {
class ReadNode;
}
@@ -141,7 +141,7 @@ class Entry {
private:
friend class Directory;
- friend class csync::ReadNode;
+ friend class syncer::ReadNode;
friend std::ostream& operator << (std::ostream& s, const Entry& e);
DISALLOW_COPY_AND_ASSIGN(Entry);
@@ -149,6 +149,6 @@ class Entry {
std::ostream& operator<<(std::ostream& os, const Entry& entry);
-} // namespace syncable
+} // namespace syncable
#endif // SYNC_SYNCABLE_ENTRY_H_
diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc
index 83fc2c4..99511d9 100644
--- a/sync/syncable/entry_kernel.cc
+++ b/sync/syncable/entry_kernel.cc
@@ -61,7 +61,7 @@ StringValue* Int64ToValue(int64 i) {
}
StringValue* TimeToValue(const base::Time& t) {
- return Value::CreateStringValue(csync::GetTimeDebugString(t));
+ return Value::CreateStringValue(syncer::GetTimeDebugString(t));
}
StringValue* IdToValue(const Id& id) {
@@ -119,7 +119,7 @@ DictionaryValue* EntryKernel::ToValue() const {
// Proto fields.
SetFieldValues(*this, kernel_info,
- &GetProtoFieldString, &csync::EntitySpecificsToValue,
+ &GetProtoFieldString, &syncer::EntitySpecificsToValue,
PROTO_FIELDS_BEGIN, PROTO_FIELDS_END - 1);
// Bit temps.
diff --git a/sync/syncable/entry_kernel.h b/sync/syncable/entry_kernel.h
index 3a4e54c..9314797 100644
--- a/sync/syncable/entry_kernel.h
+++ b/sync/syncable/entry_kernel.h
@@ -216,8 +216,8 @@ struct EntryKernel {
// Round-trip to proto time format and back so that we have
// consistent time resolutions (ms).
time_fields[field - TIME_FIELDS_BEGIN] =
- csync::ProtoTimeToTime(
- csync::TimeToProtoTime(value));
+ syncer::ProtoTimeToTime(
+ syncer::TimeToProtoTime(value));
}
inline void put(IdField field, const Id& value) {
id_fields[field - ID_FIELDS_BEGIN] = value;
@@ -307,7 +307,7 @@ struct EntryKernelMutation {
typedef std::map<int64, EntryKernelMutation> EntryKernelMutationMap;
-typedef csync::Immutable<EntryKernelMutationMap>
+typedef syncer::Immutable<EntryKernelMutationMap>
ImmutableEntryKernelMutationMap;
// Caller owns the return value.
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index 19a1588..1eb4cc0 100644
--- a/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.cc
@@ -146,8 +146,8 @@ int GetSpecificsFieldNumberFromModelType(ModelType model_type) {
// Note: keep this consistent with GetModelType in syncable.cc!
ModelType GetModelType(const sync_pb::SyncEntity& sync_pb_entity) {
- const csync::SyncEntity& sync_entity =
- static_cast<const csync::SyncEntity&>(sync_pb_entity);
+ const syncer::SyncEntity& sync_entity =
+ static_cast<const syncer::SyncEntity&>(sync_pb_entity);
DCHECK(!sync_entity.id().IsRoot()); // Root shouldn't ever go over the wire.
if (sync_entity.deleted())
diff --git a/sync/syncable/mutable_entry.h b/sync/syncable/mutable_entry.h
index 773531b..331ea19 100644
--- a/sync/syncable/mutable_entry.h
+++ b/sync/syncable/mutable_entry.h
@@ -9,7 +9,7 @@
#include "sync/syncable/entry.h"
#include "sync/syncable/metahandle_set.h"
-namespace csync {
+namespace syncer {
class WriteNode;
}
@@ -89,7 +89,7 @@ class MutableEntry : public Entry {
private:
friend class Directory;
friend class WriteTransaction;
- friend class csync::WriteNode;
+ friend class syncer::WriteNode;
// Don't allow creation on heap, except by sync API wrappers.
void* operator new(size_t size) { return (::operator new)(size); }
@@ -114,6 +114,6 @@ class MutableEntry : public Entry {
// This function sets only the flags needed to get this entry to sync.
bool MarkForSyncing(syncable::MutableEntry* e);
-} // namespace syncable
+} // namespace syncable
#endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_
diff --git a/sync/syncable/read_transaction.h b/sync/syncable/read_transaction.h
index b8e34e8..a6c51f5 100644
--- a/sync/syncable/read_transaction.h
+++ b/sync/syncable/read_transaction.h
@@ -8,7 +8,7 @@
#include "sync/syncable/base_transaction.h"
-namespace csync {
+namespace syncer {
class ReadTransaction;
}
@@ -23,12 +23,12 @@ class ReadTransaction : public BaseTransaction {
virtual ~ReadTransaction();
protected: // Don't allow creation on heap, except by sync API wrapper.
- friend class csync::ReadTransaction;
+ friend class syncer::ReadTransaction;
void* operator new(size_t size) { return (::operator new)(size); }
DISALLOW_COPY_AND_ASSIGN(ReadTransaction);
};
-}
+} // namespace syncable
#endif // SYNC_SYNCABLE_READ_TRANSACTION_H_
diff --git a/sync/syncable/syncable_id_unittest.cc b/sync/syncable/syncable_id_unittest.cc
index 605a678..fc774525 100644
--- a/sync/syncable/syncable_id_unittest.cc
+++ b/sync/syncable/syncable_id_unittest.cc
@@ -16,7 +16,7 @@ using std::vector;
namespace syncable {
-using csync::TestIdFactory;
+using syncer::TestIdFactory;
class SyncableIdTest : public testing::Test { };
diff --git a/sync/syncable/syncable_mock.cc b/sync/syncable/syncable_mock.cc
index cbea9ea..950f14e 100644
--- a/sync/syncable/syncable_mock.cc
+++ b/sync/syncable/syncable_mock.cc
@@ -9,7 +9,7 @@
#include "sync/test/null_transaction_observer.h"
-MockDirectory::MockDirectory(csync::UnrecoverableErrorHandler* handler)
+MockDirectory::MockDirectory(syncer::UnrecoverableErrorHandler* handler)
: Directory(&encryptor_, handler, NULL,
new syncable::InMemoryDirectoryBackingStore("store")) {
InitKernelForTest("myk", &delegate_, syncable::NullTransactionObserver());
diff --git a/sync/syncable/syncable_mock.h b/sync/syncable/syncable_mock.h
index a829ad2..82eac1a 100644
--- a/sync/syncable/syncable_mock.h
+++ b/sync/syncable/syncable_mock.h
@@ -20,7 +20,7 @@ using syncable::EntryKernel;
class MockDirectory : public Directory {
public:
- explicit MockDirectory(csync::UnrecoverableErrorHandler* handler);
+ explicit MockDirectory(syncer::UnrecoverableErrorHandler* handler);
virtual ~MockDirectory();
MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64));
@@ -33,7 +33,7 @@ class MockDirectory : public Directory {
MOCK_METHOD1(PurgeEntriesWithTypeIn, void(syncable::ModelTypeSet));
private:
- csync::FakeEncryptor encryptor_;
+ syncer::FakeEncryptor encryptor_;
syncable::NullDirectoryChangeDelegate delegate_;
};
diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc
index a2bf660..be22c0b 100644
--- a/sync/syncable/syncable_unittest.cc
+++ b/sync/syncable/syncable_unittest.cc
@@ -38,9 +38,9 @@
using base::ExpectDictBooleanValue;
using base::ExpectDictStringValue;
-using csync::FakeEncryptor;
-using csync::TestIdFactory;
-using csync::TestUnrecoverableErrorHandler;
+using syncer::FakeEncryptor;
+using syncer::TestIdFactory;
+using syncer::TestUnrecoverableErrorHandler;
namespace syncable {
@@ -1152,14 +1152,14 @@ TEST_F(SyncableDirectoryTest, GetModelType) {
server_item.Put(SERVER_IS_DEL, false);
ASSERT_EQ(datatype, server_item.GetServerModelType());
- csync::SyncEntity folder_entity;
+ syncer::SyncEntity folder_entity;
folder_entity.set_id(id_factory.NewServerId());
folder_entity.set_deleted(false);
folder_entity.set_folder(true);
folder_entity.mutable_specifics()->CopyFrom(specifics);
ASSERT_EQ(datatype, folder_entity.GetModelType());
- csync::SyncEntity item_entity;
+ syncer::SyncEntity item_entity;
item_entity.set_id(id_factory.NewServerId());
item_entity.set_deleted(false);
item_entity.set_folder(false);
diff --git a/sync/syncable/write_transaction_info.h b/sync/syncable/write_transaction_info.h
index b49c376..e8a2eae 100644
--- a/sync/syncable/write_transaction_info.h
+++ b/sync/syncable/write_transaction_info.h
@@ -32,7 +32,7 @@ struct WriteTransactionInfo {
};
typedef
- csync::Immutable<WriteTransactionInfo>
+ syncer::Immutable<WriteTransactionInfo>
ImmutableWriteTransactionInfo;
} // namespace syncable
diff --git a/sync/test/engine/fake_model_worker.cc b/sync/test/engine/fake_model_worker.cc
index f394bc0..dba6fdd 100644
--- a/sync/test/engine/fake_model_worker.cc
+++ b/sync/test/engine/fake_model_worker.cc
@@ -4,7 +4,7 @@
#include "sync/test/engine/fake_model_worker.h"
-namespace csync {
+namespace syncer {
FakeModelWorker::FakeModelWorker(ModelSafeGroup group) : group_(group) {}
@@ -28,4 +28,4 @@ ModelSafeGroup FakeModelWorker::GetModelSafeGroup() {
return group_;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/test/engine/fake_model_worker.h b/sync/test/engine/fake_model_worker.h
index b9ca42d..8b95fc5 100644
--- a/sync/test/engine/fake_model_worker.h
+++ b/sync/test/engine/fake_model_worker.h
@@ -14,7 +14,7 @@
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/util/syncer_error.h"
-namespace csync {
+namespace syncer {
// Fake implementation of ModelSafeWorker that does work on the
// current thread regardless of the group.
@@ -35,7 +35,7 @@ class FakeModelWorker : public ModelSafeWorker, public base::NonThreadSafe {
DISALLOW_COPY_AND_ASSIGN(FakeModelWorker);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
diff --git a/sync/test/engine/mock_connection_manager.cc b/sync/test/engine/mock_connection_manager.cc
index 95c00f6..4683ab7 100644
--- a/sync/test/engine/mock_connection_manager.cc
+++ b/sync/test/engine/mock_connection_manager.cc
@@ -17,12 +17,12 @@
#include "sync/test/engine/test_id_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
-using csync::HttpResponse;
-using csync::ServerConnectionManager;
-using csync::ServerConnectionEventListener;
-using csync::ServerConnectionEvent;
-using csync::SyncerProtoUtil;
-using csync::TestIdFactory;
+using syncer::HttpResponse;
+using syncer::ServerConnectionManager;
+using syncer::ServerConnectionEventListener;
+using syncer::ServerConnectionEvent;
+using syncer::SyncerProtoUtil;
+using syncer::TestIdFactory;
using std::map;
using std::string;
using sync_pb::ClientToServerMessage;
@@ -85,7 +85,7 @@ void MockConnectionManager::SetMidCommitObserver(
bool MockConnectionManager::PostBufferToPath(PostBufferParams* params,
const string& path,
const string& auth_token,
- csync::ScopedServerStatusWatcher* watcher) {
+ syncer::ScopedServerStatusWatcher* watcher) {
ClientToServerMessage post;
CHECK(post.ParseFromString(params->buffer_in));
CHECK(post.has_protocol_version());
diff --git a/sync/test/engine/mock_connection_manager.h b/sync/test/engine/mock_connection_manager.h
index 644ef4e..1fe264e 100644
--- a/sync/test/engine/mock_connection_manager.h
+++ b/sync/test/engine/mock_connection_manager.h
@@ -21,7 +21,7 @@
#include "sync/internal_api/public/syncable/model_type_payload_map.h"
#include "sync/protocol/sync.pb.h"
-class MockConnectionManager : public csync::ServerConnectionManager {
+class MockConnectionManager : public syncer::ServerConnectionManager {
public:
class MidCommitObserver {
public:
@@ -39,7 +39,7 @@ class MockConnectionManager : public csync::ServerConnectionManager {
PostBufferParams*,
const std::string& path,
const std::string& auth_token,
- csync::ScopedServerStatusWatcher* watcher) OVERRIDE;
+ syncer::ScopedServerStatusWatcher* watcher) OVERRIDE;
// Control of commit response.
// NOTE: Commit callback is invoked only once then reset.
diff --git a/sync/test/engine/syncer_command_test.cc b/sync/test/engine/syncer_command_test.cc
index 61313b1..0d215c2 100644
--- a/sync/test/engine/syncer_command_test.cc
+++ b/sync/test/engine/syncer_command_test.cc
@@ -4,7 +4,7 @@
#include "sync/test/engine/syncer_command_test.h"
-namespace csync {
+namespace syncer {
const unsigned int kMaxMessages = 10;
const unsigned int kMaxMessageSize = 5 * 1024;
@@ -63,4 +63,4 @@ Directory* MockDirectorySyncerCommandTest::directory() {
return &mock_directory_;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h
index e519b6b..bcb0846 100644
--- a/sync/test/engine/syncer_command_test.h
+++ b/sync/test/engine/syncer_command_test.h
@@ -30,9 +30,9 @@
using ::testing::NiceMock;
-namespace csync {
+namespace syncer {
-class MockDebugInfoGetter : public csync::sessions::DebugInfoGetter {
+class MockDebugInfoGetter : public syncer::sessions::DebugInfoGetter {
public:
MockDebugInfoGetter();
virtual ~MockDebugInfoGetter();
@@ -233,6 +233,6 @@ class MockDirectorySyncerCommandTest : public SyncerCommandTestBase {
MockDirectory mock_directory_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
diff --git a/sync/test/engine/test_directory_setter_upper.cc b/sync/test/engine/test_directory_setter_upper.cc
index b73b654..e9847bd 100644
--- a/sync/test/engine/test_directory_setter_upper.cc
+++ b/sync/test/engine/test_directory_setter_upper.cc
@@ -17,7 +17,7 @@
using syncable::NullTransactionObserver;
using syncable::ReadTransaction;
-namespace csync {
+namespace syncer {
TestDirectorySetterUpper::TestDirectorySetterUpper() : name_("Test") {}
@@ -59,4 +59,4 @@ void TestDirectorySetterUpper::RunInvariantCheck() {
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/test/engine/test_directory_setter_upper.h b/sync/test/engine/test_directory_setter_upper.h
index 17ce8da..4874440 100644
--- a/sync/test/engine/test_directory_setter_upper.h
+++ b/sync/test/engine/test_directory_setter_upper.h
@@ -45,7 +45,7 @@ namespace syncable {
class Directory;
}
-namespace csync {
+namespace syncer {
class TestDirectorySetterUpper {
public:
@@ -76,6 +76,6 @@ class TestDirectorySetterUpper {
DISALLOW_COPY_AND_ASSIGN(TestDirectorySetterUpper);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
diff --git a/sync/test/engine/test_id_factory.h b/sync/test/engine/test_id_factory.h
index a0163c8..51ffd14 100644
--- a/sync/test/engine/test_id_factory.h
+++ b/sync/test/engine/test_id_factory.h
@@ -13,7 +13,7 @@
#include "base/string_number_conversions.h"
#include "sync/syncable/syncable_id.h"
-namespace csync {
+namespace syncer {
class TestIdFactory {
public:
@@ -67,7 +67,7 @@ class TestIdFactory {
int next_value_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_
diff --git a/sync/test/fake_encryptor.cc b/sync/test/fake_encryptor.cc
index bc7f22d..2a1b58c 100644
--- a/sync/test/fake_encryptor.cc
+++ b/sync/test/fake_encryptor.cc
@@ -6,7 +6,7 @@
#include "base/base64.h"
-namespace csync {
+namespace syncer {
FakeEncryptor::~FakeEncryptor() {}
@@ -20,4 +20,4 @@ bool FakeEncryptor::DecryptString(const std::string& ciphertext,
return base::Base64Decode(ciphertext, plaintext);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/test/fake_encryptor.h b/sync/test/fake_encryptor.h
index 8b83a43..99641c8 100644
--- a/sync/test/fake_encryptor.h
+++ b/sync/test/fake_encryptor.h
@@ -9,7 +9,7 @@
#include "base/compiler_specific.h"
#include "sync/util/encryptor.h"
-namespace csync {
+namespace syncer {
// Encryptor which simply base64-encodes the plaintext to get the
// ciphertext. Obviously, this should be used only for testing.
@@ -24,6 +24,6 @@ class FakeEncryptor : public Encryptor {
std::string* plaintext) OVERRIDE;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_FAKE_ENCRYPTOR_H_
diff --git a/sync/test/fake_extensions_activity_monitor.cc b/sync/test/fake_extensions_activity_monitor.cc
index 2484448..9fb20a6 100644
--- a/sync/test/fake_extensions_activity_monitor.cc
+++ b/sync/test/fake_extensions_activity_monitor.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
-namespace csync {
+namespace syncer {
FakeExtensionsActivityMonitor::FakeExtensionsActivityMonitor() {}
@@ -28,4 +28,4 @@ void FakeExtensionsActivityMonitor::PutRecords(const Records& records) {
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/test/fake_extensions_activity_monitor.h b/sync/test/fake_extensions_activity_monitor.h
index 3ff0ce7..84c38ea 100644
--- a/sync/test/fake_extensions_activity_monitor.h
+++ b/sync/test/fake_extensions_activity_monitor.h
@@ -10,7 +10,7 @@
#include "base/threading/non_thread_safe.h"
#include "sync/util/extensions_activity_monitor.h"
-namespace csync {
+namespace syncer {
// Fake non-thread-safe implementation of ExtensionsActivityMonitor
// suitable to be used in single-threaded sync tests.
@@ -29,6 +29,6 @@ class FakeExtensionsActivityMonitor
Records records_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_
diff --git a/sync/test/null_transaction_observer.cc b/sync/test/null_transaction_observer.cc
index e400fad..657e2a4 100644
--- a/sync/test/null_transaction_observer.cc
+++ b/sync/test/null_transaction_observer.cc
@@ -8,8 +8,8 @@
namespace syncable {
-csync::WeakHandle<TransactionObserver> NullTransactionObserver() {
- return csync::MakeWeakHandle(base::WeakPtr<TransactionObserver>());
+syncer::WeakHandle<TransactionObserver> NullTransactionObserver() {
+ return syncer::MakeWeakHandle(base::WeakPtr<TransactionObserver>());
}
} // namespace syncable
diff --git a/sync/test/null_transaction_observer.h b/sync/test/null_transaction_observer.h
index b84580e..eca3e7f 100644
--- a/sync/test/null_transaction_observer.h
+++ b/sync/test/null_transaction_observer.h
@@ -14,7 +14,7 @@ class TransactionObserver;
// Returns an initialized weak handle to a transaction observer that
// does nothing.
-csync::WeakHandle<TransactionObserver> NullTransactionObserver();
+syncer::WeakHandle<TransactionObserver> NullTransactionObserver();
} // namespace syncable
diff --git a/sync/test/sessions/test_scoped_session_event_listener.h b/sync/test/sessions/test_scoped_session_event_listener.h
index 17fc160..ef46d7b 100644
--- a/sync/test/sessions/test_scoped_session_event_listener.h
+++ b/sync/test/sessions/test_scoped_session_event_listener.h
@@ -8,7 +8,7 @@
#include "sync/sessions/sync_session_context.h"
-namespace csync {
+namespace syncer {
namespace sessions {
// Installs a SyncEventListener to a given session context for the lifetime of
@@ -31,6 +31,6 @@ class TestScopedSessionEventListener {
};
} // namespace sessions
-} // namespace csync
+} // namespace syncer
#endif // SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_
diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc
index 0b0f060..71ea3b5 100644
--- a/sync/tools/sync_listen_notifications.cc
+++ b/sync/tools/sync_listen_notifications.cc
@@ -39,7 +39,7 @@
namespace {
// Class to print received notifications events.
-class NotificationPrinter : public csync::SyncNotifierObserver {
+class NotificationPrinter : public syncer::SyncNotifierObserver {
public:
NotificationPrinter() {}
virtual ~NotificationPrinter() {}
@@ -49,17 +49,17 @@ class NotificationPrinter : public csync::SyncNotifierObserver {
}
virtual void OnNotificationsDisabled(
- csync::NotificationsDisabledReason reason) OVERRIDE {
+ syncer::NotificationsDisabledReason reason) OVERRIDE {
LOG(INFO) << "Notifications disabled with reason "
- << csync::NotificationsDisabledReasonToString(reason);
+ << syncer::NotificationsDisabledReasonToString(reason);
}
virtual void OnIncomingNotification(
const syncable::ModelTypePayloadMap& type_payloads,
- csync::IncomingNotificationSource source) OVERRIDE {
+ syncer::IncomingNotificationSource source) OVERRIDE {
for (syncable::ModelTypePayloadMap::const_iterator it =
type_payloads.begin(); it != type_payloads.end(); ++it) {
- LOG(INFO) << (source == csync::REMOTE_NOTIFICATION ?
+ LOG(INFO) << (source == syncer::REMOTE_NOTIFICATION ?
"Remote" : "Local")
<< " Notification: type = "
<< syncable::ModelTypeToString(it->first)
@@ -73,21 +73,21 @@ class NotificationPrinter : public csync::SyncNotifierObserver {
class NullInvalidationStateTracker
: public base::SupportsWeakPtr<NullInvalidationStateTracker>,
- public csync::InvalidationStateTracker {
+ public syncer::InvalidationStateTracker {
public:
NullInvalidationStateTracker() {}
virtual ~NullInvalidationStateTracker() {}
- virtual csync::InvalidationVersionMap
+ virtual syncer::InvalidationVersionMap
GetAllMaxVersions() const OVERRIDE {
- return csync::InvalidationVersionMap();
+ return syncer::InvalidationVersionMap();
}
virtual void SetMaxVersion(
const invalidation::ObjectId& id,
int64 max_invalidation_version) OVERRIDE {
LOG(INFO) << "Setting max invalidation version for "
- << csync::ObjectIdToString(id) << " to "
+ << syncer::ObjectIdToString(id) << " to "
<< max_invalidation_version;
}
@@ -208,7 +208,7 @@ int main(int argc, char* argv[]) {
"[--%s=host:port] [--%s] [--%s]\n"
"[--%s=(server|p2p)]\n\n"
"Run chrome and set a breakpoint on\n"
- "csync::SyncManager::SyncInternal::UpdateCredentials() "
+ "syncer::SyncManager::SyncInternal::UpdateCredentials() "
"after logging into\n"
"sync to get the token to pass into this utility.\n",
argv[0],
@@ -228,10 +228,10 @@ int main(int argc, char* argv[]) {
new MyTestURLRequestContextGetter(io_thread.message_loop_proxy()));
const char kClientInfo[] = "sync_listen_notifications";
NullInvalidationStateTracker null_invalidation_state_tracker;
- csync::SyncNotifierFactory sync_notifier_factory(
+ syncer::SyncNotifierFactory sync_notifier_factory(
notifier_options, kClientInfo,
null_invalidation_state_tracker.AsWeakPtr());
- scoped_ptr<csync::SyncNotifier> sync_notifier(
+ scoped_ptr<syncer::SyncNotifier> sync_notifier(
sync_notifier_factory.CreateSyncNotifier());
NotificationPrinter notification_printer;
sync_notifier->AddObserver(&notification_printer);
diff --git a/sync/util/cryptographer.cc b/sync/util/cryptographer.cc
index d316149..6cb7fab 100644
--- a/sync/util/cryptographer.cc
+++ b/sync/util/cryptographer.cc
@@ -10,7 +10,7 @@
#include "base/logging.h"
#include "sync/util/encryptor.h"
-namespace csync {
+namespace syncer {
const char kNigoriTag[] = "google_chrome_nigori";
@@ -450,4 +450,4 @@ void Cryptographer::InstallKeyBag(const sync_pb::NigoriKeyBag& bag) {
}
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h
index 24dbf1b..a27fc1d 100644
--- a/sync/util/cryptographer.h
+++ b/sync/util/cryptographer.h
@@ -18,7 +18,7 @@
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/util/nigori.h"
-namespace csync {
+namespace syncer {
class Encryptor;
@@ -248,6 +248,6 @@ class Cryptographer {
DISALLOW_COPY_AND_ASSIGN(Cryptographer);
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_CRYPTOGRAPHER_H_
diff --git a/sync/util/cryptographer_unittest.cc b/sync/util/cryptographer_unittest.cc
index fbb97ff..ca9c48d 100644
--- a/sync/util/cryptographer_unittest.cc
+++ b/sync/util/cryptographer_unittest.cc
@@ -15,7 +15,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -388,4 +388,4 @@ TEST_F(SyncCryptographerTest, UnknownSensitiveTypes) {
cryptographer_.RemoveObserver(&observer);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/data_type_histogram_unittest.cc b/sync/util/data_type_histogram_unittest.cc
index 9b5d0ea..0601d31 100644
--- a/sync/util/data_type_histogram_unittest.cc
+++ b/sync/util/data_type_histogram_unittest.cc
@@ -7,7 +7,7 @@
#include "base/time.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
class DataTypeHistogramTest : public testing::Test {
@@ -60,4 +60,4 @@ TEST(DataTypeHistogramTest, BasicEnum) {
}
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/encryptor.h b/sync/util/encryptor.h
index 415d6b1..48d5d6c 100644
--- a/sync/util/encryptor.h
+++ b/sync/util/encryptor.h
@@ -8,7 +8,7 @@
#include <string>
-namespace csync {
+namespace syncer {
class Encryptor {
public:
@@ -23,6 +23,6 @@ class Encryptor {
virtual ~Encryptor() {}
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_ENCRYPTOR_H_
diff --git a/sync/util/extensions_activity_monitor.cc b/sync/util/extensions_activity_monitor.cc
index 24d3b0f..fabe50b 100644
--- a/sync/util/extensions_activity_monitor.cc
+++ b/sync/util/extensions_activity_monitor.cc
@@ -4,7 +4,7 @@
#include "sync/util/extensions_activity_monitor.h"
-namespace csync {
+namespace syncer {
ExtensionsActivityMonitor::Record::Record()
: bookmark_write_count(0U) {}
@@ -13,4 +13,4 @@ ExtensionsActivityMonitor::Record::~Record() {}
ExtensionsActivityMonitor::~ExtensionsActivityMonitor() {}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/extensions_activity_monitor.h b/sync/util/extensions_activity_monitor.h
index 4533f17..bb476e2e 100644
--- a/sync/util/extensions_activity_monitor.h
+++ b/sync/util/extensions_activity_monitor.h
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
-namespace csync {
+namespace syncer {
// An interface to monitor usage of extensions APIs to send to sync
// servers, with the ability to purge data once sync servers have
@@ -48,6 +48,6 @@ class ExtensionsActivityMonitor {
virtual ~ExtensionsActivityMonitor();
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
diff --git a/sync/util/get_session_name.cc b/sync/util/get_session_name.cc
index cd26bba..99a4ce0 100644
--- a/sync/util/get_session_name.cc
+++ b/sync/util/get_session_name.cc
@@ -23,7 +23,7 @@
#include "sync/util/session_utils_android.h"
#endif
-namespace csync {
+namespace syncer {
namespace {
@@ -85,4 +85,4 @@ std::string GetSessionNameSynchronouslyForTesting() {
return GetSessionNameSynchronously();
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/get_session_name.h b/sync/util/get_session_name.h
index ea84aee..6e1b7dd 100644
--- a/sync/util/get_session_name.h
+++ b/sync/util/get_session_name.h
@@ -15,7 +15,7 @@ namespace base {
class TaskRunner;
} // namespace base
-namespace csync {
+namespace syncer {
void GetSessionName(
const scoped_refptr<base::TaskRunner>& task_runner,
@@ -23,6 +23,6 @@ void GetSessionName(
std::string GetSessionNameSynchronouslyForTesting();
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_GET_SESSION_NAME_H_
diff --git a/sync/util/get_session_name_mac.h b/sync/util/get_session_name_mac.h
index d262f8d..6d5c27c 100644
--- a/sync/util/get_session_name_mac.h
+++ b/sync/util/get_session_name_mac.h
@@ -8,7 +8,7 @@
#include <string>
-namespace csync {
+namespace syncer {
namespace internal {
// Returns the Hardware model name, without trailing numbers, if
@@ -18,6 +18,6 @@ namespace internal {
std::string GetHardwareModelName();
} // namespace internal
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_GET_SESSION_NAME_MAC_H_
diff --git a/sync/util/get_session_name_mac.mm b/sync/util/get_session_name_mac.mm
index 73a77b9..6298604 100644
--- a/sync/util/get_session_name_mac.mm
+++ b/sync/util/get_session_name_mac.mm
@@ -19,7 +19,7 @@
- (NSString*)localizedName;
@end
-namespace csync {
+namespace syncer {
namespace internal {
std::string GetHardwareModelName() {
@@ -48,4 +48,4 @@ std::string GetHardwareModelName() {
}
} // namespace internal
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/get_session_name_unittest.cc b/sync/util/get_session_name_unittest.cc
index 03c9be4..b4922f6 100644
--- a/sync/util/get_session_name_unittest.cc
+++ b/sync/util/get_session_name_unittest.cc
@@ -9,7 +9,7 @@
#include "sync/util/get_session_name.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
@@ -45,4 +45,4 @@ TEST_F(GetSessionNameTest, GetSessionName) {
} // namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/get_session_name_win.cc b/sync/util/get_session_name_win.cc
index c79b7845..101bcd4 100644
--- a/sync/util/get_session_name_win.cc
+++ b/sync/util/get_session_name_win.cc
@@ -6,7 +6,7 @@
#include <windows.h>
-namespace csync {
+namespace syncer {
namespace internal {
std::string GetComputerName() {
@@ -18,4 +18,4 @@ std::string GetComputerName() {
}
} // namespace internal
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/get_session_name_win.h b/sync/util/get_session_name_win.h
index 590e679..68b86f8 100644
--- a/sync/util/get_session_name_win.h
+++ b/sync/util/get_session_name_win.h
@@ -8,12 +8,12 @@
#include <string>
-namespace csync {
+namespace syncer {
namespace internal {
std::string GetComputerName();
} // namespace internal
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_GET_SESSION_NAME_WIN_H_
diff --git a/sync/util/logging.cc b/sync/util/logging.cc
index 9458379..272c72c 100644
--- a/sync/util/logging.cc
+++ b/sync/util/logging.cc
@@ -6,7 +6,7 @@
#include "base/location.h"
-namespace csync {
+namespace syncer {
bool VlogIsOnForLocation(const tracked_objects::Location& from_here,
int verbose_level) {
@@ -15,4 +15,4 @@ bool VlogIsOnForLocation(const tracked_objects::Location& from_here,
from_here.file_name(), ::strlen(from_here.file_name())));
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/logging.h b/sync/util/logging.h
index 97d215b..900c08f 100644
--- a/sync/util/logging.h
+++ b/sync/util/logging.h
@@ -14,12 +14,12 @@ namespace tracked_objects {
class Location;
} // namespace tracked_objects
-namespace csync {
+namespace syncer {
bool VlogIsOnForLocation(const tracked_objects::Location& from_here,
int verbose_level);
-} // namespace csync
+} // namespace syncer
#define VLOG_LOC_STREAM(from_here, verbose_level) \
logging::LogMessage(from_here.file_name(), from_here.line_number(), \
@@ -30,6 +30,6 @@ bool VlogIsOnForLocation(const tracked_objects::Location& from_here,
VLOG_LOC_STREAM(from_here, verbose_level), \
::logging::DEBUG_MODE && \
(VLOG_IS_ON(verbose_level) || \
- ::csync::VlogIsOnForLocation(from_here, verbose_level))) \
+ ::syncer::VlogIsOnForLocation(from_here, verbose_level))) \
#endif // SYNC_UTIL_LOGGING_H_
diff --git a/sync/util/nigori.cc b/sync/util/nigori.cc
index f68956d..f2ee83d 100644
--- a/sync/util/nigori.cc
+++ b/sync/util/nigori.cc
@@ -23,7 +23,7 @@ using crypto::Encryptor;
using crypto::HMAC;
using crypto::SymmetricKey;
-namespace csync {
+namespace syncer {
// NigoriStream simplifies the concatenation operation of the Nigori protocol.
class NigoriStream {
@@ -254,4 +254,4 @@ bool Nigori::ExportKeys(std::string* user_key,
mac_key_->GetRawKey(mac_key);
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/nigori.h b/sync/util/nigori.h
index 1901211..312cfb3 100644
--- a/sync/util/nigori.h
+++ b/sync/util/nigori.h
@@ -14,7 +14,7 @@ namespace crypto {
class SymmetricKey;
} // namespace crypto
-namespace csync {
+namespace syncer {
// A (partial) implementation of Nigori, a protocol to securely store secrets in
// the cloud. This implementation does not support server authentication or
@@ -81,6 +81,6 @@ class Nigori {
scoped_ptr<crypto::SymmetricKey> mac_key_;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_NIGORI_H_
diff --git a/sync/util/nigori_unittest.cc b/sync/util/nigori_unittest.cc
index b014a81..7b6ac16 100644
--- a/sync/util/nigori_unittest.cc
+++ b/sync/util/nigori_unittest.cc
@@ -10,7 +10,7 @@
#include "base/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
namespace {
TEST(SyncNigoriTest, Permute) {
@@ -167,4 +167,4 @@ TEST(SyncNigoriTest, MAYBE_ExportImport) {
}
} // anonymous namespace
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/session_utils_android.cc b/sync/util/session_utils_android.cc
index a4f4400..676fdde 100644
--- a/sync/util/session_utils_android.cc
+++ b/sync/util/session_utils_android.cc
@@ -51,7 +51,7 @@ ScopedJavaLocalRef<jobject> GetContentResolver(JNIEnv* env) {
}
-namespace csync {
+namespace syncer {
namespace internal {
std::string GetAndroidId() {
@@ -73,4 +73,4 @@ bool IsTabletUi() {
}
} // namespace internal
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/session_utils_android.h b/sync/util/session_utils_android.h
index 4da0ea9..412fab7 100644
--- a/sync/util/session_utils_android.h
+++ b/sync/util/session_utils_android.h
@@ -8,7 +8,7 @@
#include <string>
-namespace csync {
+namespace syncer {
namespace internal {
// Return the unique identifier of this device.
@@ -21,6 +21,6 @@ std::string GetModel();
bool IsTabletUi();
} // namespace internal
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_SESSION_UTILS_ANDROID_H_
diff --git a/sync/util/test_unrecoverable_error_handler.cc b/sync/util/test_unrecoverable_error_handler.cc
index 07367c3..4bdbf3d 100644
--- a/sync/util/test_unrecoverable_error_handler.cc
+++ b/sync/util/test_unrecoverable_error_handler.cc
@@ -6,7 +6,7 @@
#include "testing/gtest/include/gtest/gtest.h"
-namespace csync {
+namespace syncer {
TestUnrecoverableErrorHandler::TestUnrecoverableErrorHandler() {}
@@ -19,5 +19,5 @@ void TestUnrecoverableErrorHandler::OnUnrecoverableError(
<< from_here.function_name() << ": " << message;
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/test_unrecoverable_error_handler.h b/sync/util/test_unrecoverable_error_handler.h
index 758ba79..bec0fc7 100644
--- a/sync/util/test_unrecoverable_error_handler.h
+++ b/sync/util/test_unrecoverable_error_handler.h
@@ -9,7 +9,7 @@
#include "base/compiler_specific.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
-namespace csync {
+namespace syncer {
// Implementation of UnrecoverableErrorHandler that simply adds a
// gtest failure.
@@ -22,7 +22,7 @@ class TestUnrecoverableErrorHandler : public UnrecoverableErrorHandler {
const std::string& message) OVERRIDE;
};
-} // namespace csync
+} // namespace syncer
#endif // SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
diff --git a/sync/util/time.cc b/sync/util/time.cc
index 47e6af4..a921f07 100644
--- a/sync/util/time.cc
+++ b/sync/util/time.cc
@@ -7,7 +7,7 @@
#include "base/i18n/time_formatting.h"
#include "base/utf_string_conversions.h"
-namespace csync {
+namespace syncer {
int64 TimeToProtoTime(const base::Time& t) {
return (t - base::Time::UnixEpoch()).InMilliseconds();
@@ -21,4 +21,4 @@ std::string GetTimeDebugString(const base::Time& t) {
return UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime(t));
}
-} // namespace csync
+} // namespace syncer
diff --git a/sync/util/time.h b/sync/util/time.h
index 2c8a9cf..1044a5b 100644
--- a/sync/util/time.h
+++ b/sync/util/time.h
@@ -13,7 +13,7 @@
#include "base/basictypes.h"
#include "base/time.h"
-namespace csync {
+namespace syncer {
// Converts a time object to the format used in sync protobufs (ms
// since the Unix epoch).
@@ -24,6 +24,6 @@ base::Time ProtoTimeToTime(int64 proto_t);
std::string GetTimeDebugString(const base::Time& t);
-} // namespace csync
+} // namespace syncer
#endif // SYNC_UTIL_TIME_H_
diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt
index 3623975..37168d3 100644
--- a/tools/heapcheck/suppressions.txt
+++ b/tools/heapcheck/suppressions.txt
@@ -998,8 +998,8 @@
fun:TestURLRequestContextGetter::GetURLRequestContext
fun:*SingleLoginAttempt
fun:notifier::Login::StartConnection
- fun:csync::InvalidationNotifier::UpdateCredentials
- fun:csync::NonBlockingInvalidationNotifier::Core::UpdateCredentials
+ fun:syncer::InvalidationNotifier::UpdateCredentials
+ fun:syncer::NonBlockingInvalidationNotifier::Core::UpdateCredentials
fun:void DispatchToMethod
}
{
@@ -1345,8 +1345,8 @@
fun:TestURLRequestContextGetter::GetURLRequestContext
...
fun:notifier::Login::StartConnection
- fun:csync::InvalidationNotifier::UpdateCredentials
- fun:csync::NonBlockingInvalidationNotifier::Core::UpdateCredentials
+ fun:syncer::InvalidationNotifier::UpdateCredentials
+ fun:syncer::NonBlockingInvalidationNotifier::Core::UpdateCredentials
}
{
bug_124758
diff --git a/tools/valgrind/drmemory/suppressions_full.txt b/tools/valgrind/drmemory/suppressions_full.txt
index 5cfbc69..ee80dd4 100644
--- a/tools/valgrind/drmemory/suppressions_full.txt
+++ b/tools/valgrind/drmemory/suppressions_full.txt
@@ -1039,8 +1039,8 @@ name=http://crbug.com/79933 (2)
*!TestURLRequestContextGetter::GetURLRequestContext
*!notifier::SingleLoginAttempt::SingleLoginAttempt
*!notifier::Login::StartConnection
-*!csync::InvalidationNotifier::UpdateCredentials
-*!csync::NonBlockingInvalidationNotifier::Core::UpdateCredentials
+*!syncer::InvalidationNotifier::UpdateCredentials
+*!syncer::NonBlockingInvalidationNotifier::Core::UpdateCredentials
LEAK
name=http://crbug.com/79933 (3)
@@ -1201,7 +1201,7 @@ name=http://crbug.com/91465
*!operator new
*!browser_sync::internal::WeakHandleCore<browser_sync::JsBackend>::*
*!browser_sync::WeakHandle<browser_sync::JsBackend>::*
-*!csync::SyncManager::SyncInternal::Init
+*!syncer::SyncManager::SyncInternal::Init
LEAK
name=http://crbug.com/91491
diff --git a/tools/valgrind/tsan/suppressions.txt b/tools/valgrind/tsan/suppressions.txt
index ed451b0..a494ac7 100644
--- a/tools/valgrind/tsan/suppressions.txt
+++ b/tools/valgrind/tsan/suppressions.txt
@@ -781,8 +781,8 @@
bug_107903_b
ThreadSanitizer:Race
...
- fun:csync::SyncManager::SyncInternal::ShutdownOnSyncThread
- fun:csync::SyncManager::ShutdownOnSyncThread
+ fun:syncer::SyncManager::SyncInternal::ShutdownOnSyncThread
+ fun:syncer::SyncManager::ShutdownOnSyncThread
fun:browser_sync::SyncBackendHost::Core::DoShutdown
fun:base::internal::RunnableAdapter::Run
}
@@ -790,8 +790,8 @@
bug_107903_c
ThreadSanitizer:Race
fun:syncable::DirectoryChangeDelegate::~DirectoryChangeDelegate
- fun:csync::SyncManager::SyncInternal::~SyncInternal
- fun:csync::SyncManager::~SyncManager
+ fun:syncer::SyncManager::SyncInternal::~SyncInternal
+ fun:syncer::SyncManager::~SyncManager
fun:scoped_ptr::reset
fun:browser_sync::SyncBackendHost::Core::DoShutdown
fun:base::internal::RunnableAdapter::Run