summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/all.gyp1
-rw-r--r--chrome/browser/autofill/DEPS2
-rw-r--r--chrome/browser/autofill/autofill_ie_toolbar_import_win.cc4
-rw-r--r--chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc4
-rw-r--r--chrome/browser/sync/DEPS14
-rw-r--r--chrome/browser/sync/abstract_profile_sync_service_test.cc6
-rw-r--r--chrome/browser/sync/abstract_profile_sync_service_test.h2
-rw-r--r--chrome/browser/sync/api/DEPS6
-rw-r--r--chrome/browser/sync/api/sync_change_unittest.cc2
-rw-r--r--chrome/browser/sync/api/sync_data.cc4
-rw-r--r--chrome/browser/sync/api/sync_data.h6
-rw-r--r--chrome/browser/sync/api/sync_error.cc4
-rw-r--r--chrome/browser/sync/api/sync_error.h4
-rw-r--r--chrome/browser/sync/api/syncable_service.h4
-rw-r--r--chrome/browser/sync/backend_migrator.cc2
-rw-r--r--chrome/browser/sync/backend_migrator.h4
-rw-r--r--chrome/browser/sync/backend_migrator_unittest.cc4
-rw-r--r--chrome/browser/sync/backend_unrecoverable_error_handler.h6
-rw-r--r--chrome/browser/sync/engine/DEPS17
-rw-r--r--chrome/browser/sync/glue/DEPS25
-rw-r--r--chrome/browser/sync/glue/backend_data_type_configurer.h2
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.cc2
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.h2
-rw-r--r--chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/browser_thread_model_worker.h4
-rw-r--r--chrome/browser/sync/glue/change_processor_mock.h4
-rw-r--r--chrome/browser/sync/glue/chrome_encryptor.h2
-rw-r--r--chrome/browser/sync/glue/chrome_extensions_activity_monitor.h2
-rw-r--r--chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc6
-rw-r--r--chrome/browser/sync/glue/data_type_controller.cc2
-rw-r--r--chrome/browser/sync/glue/data_type_controller.h6
-rw-r--r--chrome/browser/sync/glue/data_type_error_handler.h2
-rw-r--r--chrome/browser/sync/glue/data_type_manager.h2
-rw-r--r--chrome/browser/sync/glue/data_type_manager_impl_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/frontend_data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/generic_change_processor.cc2
-rw-r--r--chrome/browser/sync/glue/history_model_worker.h2
-rw-r--r--chrome/browser/sync/glue/model_associator.h2
-rw-r--r--chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc2
-rw-r--r--chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/non_frontend_data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/password_model_worker.h2
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc4
-rw-r--r--chrome/browser/sync/glue/session_model_associator.h2
-rw-r--r--chrome/browser/sync/glue/shared_change_processor.h2
-rw-r--r--chrome/browser/sync/glue/shared_change_processor_mock.h2
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.h12
-rw-r--r--chrome/browser/sync/glue/sync_backend_host_unittest.cc8
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar.cc2
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar.h6
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/theme_change_processor.cc2
-rw-r--r--chrome/browser/sync/glue/theme_model_associator.h4
-rw-r--r--chrome/browser/sync/glue/ui_data_type_controller.cc4
-rw-r--r--chrome/browser/sync/glue/ui_model_worker.h4
-rw-r--r--chrome/browser/sync/internal_api/DEPS8
-rw-r--r--chrome/browser/sync/internal_api/all_status.cc (renamed from chrome/browser/sync/engine/all_status.cc)10
-rw-r--r--chrome/browser/sync/internal_api/all_status.h (renamed from chrome/browser/sync/engine/all_status.h)10
-rw-r--r--chrome/browser/sync/internal_api/base_node.cc8
-rw-r--r--chrome/browser/sync/internal_api/base_node.h2
-rw-r--r--chrome/browser/sync/internal_api/base_transaction.cc6
-rw-r--r--chrome/browser/sync/internal_api/base_transaction.h2
-rw-r--r--chrome/browser/sync/internal_api/change_record.cc4
-rw-r--r--chrome/browser/sync/internal_api/change_record.h2
-rw-r--r--chrome/browser/sync/internal_api/change_record_unittest.cc2
-rw-r--r--chrome/browser/sync/internal_api/change_reorder_buffer.cc6
-rw-r--r--chrome/browser/sync/internal_api/debug_info_event_listener.h8
-rw-r--r--chrome/browser/sync/internal_api/js_mutation_event_observer.cc (renamed from chrome/browser/sync/js/js_mutation_event_observer.cc)8
-rw-r--r--chrome/browser/sync/internal_api/js_mutation_event_observer.h (renamed from chrome/browser/sync/js/js_mutation_event_observer.h)12
-rw-r--r--chrome/browser/sync/internal_api/js_mutation_event_observer_unittest.cc (renamed from chrome/browser/sync/js/js_mutation_event_observer_unittest.cc)12
-rw-r--r--chrome/browser/sync/internal_api/js_sync_manager_observer.cc (renamed from chrome/browser/sync/js/js_sync_manager_observer.cc)12
-rw-r--r--chrome/browser/sync/internal_api/js_sync_manager_observer.h (renamed from chrome/browser/sync/js/js_sync_manager_observer.h)10
-rw-r--r--chrome/browser/sync/internal_api/js_sync_manager_observer_unittest.cc (renamed from chrome/browser/sync/js/js_sync_manager_observer_unittest.cc)14
-rw-r--r--chrome/browser/sync/internal_api/read_node.cc4
-rw-r--r--chrome/browser/sync/internal_api/read_node.h4
-rw-r--r--chrome/browser/sync/internal_api/read_transaction.cc2
-rw-r--r--chrome/browser/sync/internal_api/sync_manager.cc44
-rw-r--r--chrome/browser/sync/internal_api/sync_manager.h12
-rw-r--r--chrome/browser/sync/internal_api/syncapi_internal.cc (renamed from chrome/browser/sync/engine/syncapi_internal.cc)4
-rw-r--r--chrome/browser/sync/internal_api/syncapi_internal.h (renamed from chrome/browser/sync/engine/syncapi_internal.h)8
-rw-r--r--chrome/browser/sync/internal_api/syncapi_mock.h27
-rw-r--r--chrome/browser/sync/internal_api/syncapi_server_connection_manager.h4
-rw-r--r--chrome/browser/sync/internal_api/syncapi_unittest.cc40
-rw-r--r--chrome/browser/sync/internal_api/user_share.cc2
-rw-r--r--chrome/browser/sync/internal_api/write_node.cc98
-rw-r--r--chrome/browser/sync/internal_api/write_node.h12
-rw-r--r--chrome/browser/sync/internal_api/write_transaction.cc2
-rw-r--r--chrome/browser/sync/js/DEPS19
-rw-r--r--chrome/browser/sync/notifier/DEPS11
-rw-r--r--chrome/browser/sync/notifier/chrome_invalidation_client.cc2
-rw-r--r--chrome/browser/sync/notifier/chrome_invalidation_client.h6
-rw-r--r--chrome/browser/sync/notifier/chrome_invalidation_client_unittest.cc6
-rw-r--r--chrome/browser/sync/notifier/invalidation_notifier.cc4
-rw-r--r--chrome/browser/sync/notifier/invalidation_notifier.h6
-rw-r--r--chrome/browser/sync/notifier/invalidation_notifier_unittest.cc6
-rw-r--r--chrome/browser/sync/notifier/invalidation_util.h2
-rw-r--r--chrome/browser/sync/notifier/invalidation_version_tracker.h4
-rw-r--r--chrome/browser/sync/notifier/non_blocking_invalidation_notifier.h2
-rw-r--r--chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc6
-rw-r--r--chrome/browser/sync/notifier/p2p_notifier.cc8
-rw-r--r--chrome/browser/sync/notifier/p2p_notifier.h4
-rw-r--r--chrome/browser/sync/notifier/p2p_notifier_unittest.cc2
-rw-r--r--chrome/browser/sync/notifier/registration_manager.cc2
-rw-r--r--chrome/browser/sync/notifier/registration_manager.h3
-rw-r--r--chrome/browser/sync/notifier/registration_manager_unittest.cc2
-rw-r--r--chrome/browser/sync/notifier/sync_notifier.h4
-rw-r--r--chrome/browser/sync/notifier/sync_notifier_factory.h2
-rw-r--r--chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc4
-rw-r--r--chrome/browser/sync/notifier/sync_notifier_observer.h2
-rw-r--r--chrome/browser/sync/profile_sync_components_factory.h2
-rw-r--r--chrome/browser/sync/profile_sync_service.cc8
-rw-r--r--chrome/browser/sync/profile_sync_service.h8
-rw-r--r--chrome/browser/sync/profile_sync_service_autofill_unittest.cc8
-rw-r--r--chrome/browser/sync/profile_sync_service_bookmark_unittest.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.h2
-rw-r--r--chrome/browser/sync/profile_sync_service_mock.h4
-rw-r--r--chrome/browser/sync/profile_sync_service_password_unittest.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service_preference_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_session_unittest.cc8
-rw-r--r--chrome/browser/sync/profile_sync_service_typed_url_unittest.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc6
-rw-r--r--chrome/browser/sync/protocol/DEPS8
-rw-r--r--chrome/browser/sync/retry_verifier.cc6
-rw-r--r--chrome/browser/sync/sessions/DEPS14
-rw-r--r--chrome/browser/sync/sync_prefs.h2
-rw-r--r--chrome/browser/sync/sync_prefs_unittest.cc2
-rw-r--r--chrome/browser/sync/sync_setup_flow.cc2
-rw-r--r--chrome/browser/sync/sync_setup_flow.h2
-rw-r--r--chrome/browser/sync/sync_ui_util.cc8
-rw-r--r--chrome/browser/sync/syncable/DEPS19
-rw-r--r--chrome/browser/sync/test/engine/test_user_share.h2
-rw-r--r--chrome/browser/sync/test/integration/DEPS4
-rw-r--r--chrome/browser/sync/test/integration/enable_disable_test.cc4
-rw-r--r--chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/sessions_helper.h4
-rw-r--r--chrome/browser/sync/test/integration/sync_errors_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/sync_test.h4
-rw-r--r--chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc6
-rw-r--r--chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc4
-rw-r--r--chrome/browser/sync/test_profile_sync_service.cc6
-rw-r--r--chrome/browser/sync/test_profile_sync_service.h2
-rw-r--r--chrome/browser/sync/tools/sync_listen_notifications.cc4
-rw-r--r--chrome/browser/sync/util/DEPS12
-rw-r--r--chrome/browser/sync/util/user_settings.h112
-rw-r--r--chrome/browser/ui/webui/DEPS3
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui.cc8
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui.h6
-rw-r--r--chrome/browser/ui/webui/sync_internals_ui_unittest.cc8
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler.cc2
-rw-r--r--chrome/browser/webdata/DEPS3
-rw-r--r--chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc4
-rw-r--r--chrome/chrome.gyp222
-rw-r--r--chrome/chrome_tests.gypi166
-rw-r--r--sync/DEPS13
-rw-r--r--sync/engine/DEPS8
-rw-r--r--sync/engine/apply_updates_command.cc (renamed from chrome/browser/sync/engine/apply_updates_command.cc)8
-rw-r--r--sync/engine/apply_updates_command.h (renamed from chrome/browser/sync/engine/apply_updates_command.h)8
-rw-r--r--sync/engine/apply_updates_command_unittest.cc (renamed from chrome/browser/sync/engine/apply_updates_command_unittest.cc)24
-rw-r--r--sync/engine/build_commit_command.cc (renamed from chrome/browser/sync/engine/build_commit_command.cc)12
-rw-r--r--sync/engine/build_commit_command.h (renamed from chrome/browser/sync/engine/build_commit_command.h)12
-rw-r--r--sync/engine/build_commit_command_unittest.cc (renamed from chrome/browser/sync/engine/build_commit_command_unittest.cc)6
-rw-r--r--sync/engine/cleanup_disabled_types_command.cc (renamed from chrome/browser/sync/engine/cleanup_disabled_types_command.cc)10
-rw-r--r--sync/engine/cleanup_disabled_types_command.h (renamed from chrome/browser/sync/engine/cleanup_disabled_types_command.h)8
-rw-r--r--sync/engine/cleanup_disabled_types_command_unittest.cc (renamed from chrome/browser/sync/engine/cleanup_disabled_types_command_unittest.cc)10
-rw-r--r--sync/engine/clear_data_command.cc (renamed from chrome/browser/sync/engine/clear_data_command.cc)10
-rw-r--r--sync/engine/clear_data_command.h (renamed from chrome/browser/sync/engine/clear_data_command.h)12
-rw-r--r--sync/engine/clear_data_command_unittest.cc (renamed from chrome/browser/sync/engine/clear_data_command_unittest.cc)6
-rw-r--r--sync/engine/conflict_resolver.cc (renamed from chrome/browser/sync/engine/conflict_resolver.cc)14
-rw-r--r--sync/engine/conflict_resolver.h (renamed from chrome/browser/sync/engine/conflict_resolver.h)8
-rw-r--r--sync/engine/download_updates_command.cc (renamed from chrome/browser/sync/engine/download_updates_command.cc)12
-rw-r--r--sync/engine/download_updates_command.h (renamed from chrome/browser/sync/engine/download_updates_command.h)12
-rw-r--r--sync/engine/download_updates_command_unittest.cc (renamed from chrome/browser/sync/engine/download_updates_command_unittest.cc)6
-rw-r--r--sync/engine/get_commit_ids_command.cc (renamed from chrome/browser/sync/engine/get_commit_ids_command.cc)10
-rw-r--r--sync/engine/get_commit_ids_command.h (renamed from chrome/browser/sync/engine/get_commit_ids_command.h)14
-rw-r--r--sync/engine/model_changing_syncer_command.cc (renamed from chrome/browser/sync/engine/model_changing_syncer_command.cc)6
-rw-r--r--sync/engine/model_changing_syncer_command.h (renamed from chrome/browser/sync/engine/model_changing_syncer_command.h)10
-rw-r--r--sync/engine/model_changing_syncer_command_unittest.cc (renamed from chrome/browser/sync/engine/model_changing_syncer_command_unittest.cc)10
-rw-r--r--sync/engine/model_safe_worker.cc (renamed from chrome/browser/sync/engine/model_safe_worker.cc)2
-rw-r--r--sync/engine/model_safe_worker.h (renamed from chrome/browser/sync/engine/model_safe_worker.h)10
-rw-r--r--sync/engine/model_safe_worker_unittest.cc (renamed from chrome/browser/sync/engine/model_safe_worker_unittest.cc)4
-rw-r--r--sync/engine/net/DEPS3
-rw-r--r--sync/engine/net/server_connection_manager.cc (renamed from chrome/browser/sync/engine/net/server_connection_manager.cc)8
-rw-r--r--sync/engine/net/server_connection_manager.h (renamed from chrome/browser/sync/engine/net/server_connection_manager.h)10
-rw-r--r--sync/engine/net/url_translator.cc (renamed from chrome/browser/sync/engine/net/url_translator.cc)4
-rw-r--r--sync/engine/net/url_translator.h (renamed from chrome/browser/sync/engine/net/url_translator.h)8
-rw-r--r--sync/engine/nigori_util.cc (renamed from chrome/browser/sync/engine/nigori_util.cc)103
-rw-r--r--sync/engine/nigori_util.h (renamed from chrome/browser/sync/engine/nigori_util.h)17
-rw-r--r--sync/engine/nigori_util_unittest.cc (renamed from chrome/browser/sync/engine/nigori_util_unittest.cc)4
-rw-r--r--sync/engine/nudge_source.cc (renamed from chrome/browser/sync/engine/nudge_source.cc)2
-rw-r--r--sync/engine/nudge_source.h (renamed from chrome/browser/sync/engine/nudge_source.h)6
-rw-r--r--sync/engine/passive_model_worker.cc (renamed from chrome/browser/sync/engine/passive_model_worker.cc)2
-rw-r--r--sync/engine/passive_model_worker.h (renamed from chrome/browser/sync/engine/passive_model_worker.h)10
-rw-r--r--sync/engine/polling_constants.cc (renamed from chrome/browser/sync/engine/polling_constants.cc)4
-rw-r--r--sync/engine/polling_constants.h (renamed from chrome/browser/sync/engine/polling_constants.h)8
-rw-r--r--sync/engine/post_commit_message_command.cc (renamed from chrome/browser/sync/engine/post_commit_message_command.cc)8
-rw-r--r--sync/engine/post_commit_message_command.h (renamed from chrome/browser/sync/engine/post_commit_message_command.h)8
-rw-r--r--sync/engine/process_commit_response_command.cc (renamed from chrome/browser/sync/engine/process_commit_response_command.cc)14
-rw-r--r--sync/engine/process_commit_response_command.h (renamed from chrome/browser/sync/engine/process_commit_response_command.h)10
-rw-r--r--sync/engine/process_commit_response_command_unittest.cc (renamed from chrome/browser/sync/engine/process_commit_response_command_unittest.cc)14
-rw-r--r--sync/engine/process_updates_command.cc (renamed from chrome/browser/sync/engine/process_updates_command.cc)16
-rw-r--r--sync/engine/process_updates_command.h (renamed from chrome/browser/sync/engine/process_updates_command.h)10
-rw-r--r--sync/engine/process_updates_command_unittest.cc (renamed from chrome/browser/sync/engine/process_updates_command_unittest.cc)16
-rw-r--r--sync/engine/resolve_conflicts_command.cc (renamed from chrome/browser/sync/engine/resolve_conflicts_command.cc)10
-rw-r--r--sync/engine/resolve_conflicts_command.h (renamed from chrome/browser/sync/engine/resolve_conflicts_command.h)8
-rw-r--r--sync/engine/resolve_conflicts_command_unittest.cc (renamed from chrome/browser/sync/engine/resolve_conflicts_command_unittest.cc)12
-rw-r--r--sync/engine/store_timestamps_command.cc (renamed from chrome/browser/sync/engine/store_timestamps_command.cc)10
-rw-r--r--sync/engine/store_timestamps_command.h (renamed from chrome/browser/sync/engine/store_timestamps_command.h)10
-rw-r--r--sync/engine/sync_scheduler.cc (renamed from chrome/browser/sync/engine/sync_scheduler.cc)10
-rw-r--r--sync/engine/sync_scheduler.h (renamed from chrome/browser/sync/engine/sync_scheduler.h)22
-rw-r--r--sync/engine/sync_scheduler_unittest.cc (renamed from chrome/browser/sync/engine/sync_scheduler_unittest.cc)16
-rw-r--r--sync/engine/sync_scheduler_whitebox_unittest.cc (renamed from chrome/browser/sync/engine/sync_scheduler_whitebox_unittest.cc)14
-rw-r--r--sync/engine/syncer.cc (renamed from chrome/browser/sync/engine/syncer.cc)38
-rw-r--r--sync/engine/syncer.h (renamed from chrome/browser/sync/engine/syncer.h)18
-rw-r--r--sync/engine/syncer_command.cc (renamed from chrome/browser/sync/engine/syncer_command.cc)6
-rw-r--r--sync/engine/syncer_command.h (renamed from chrome/browser/sync/engine/syncer_command.h)8
-rw-r--r--sync/engine/syncer_proto_util.cc (renamed from chrome/browser/sync/engine/syncer_proto_util.cc)22
-rw-r--r--sync/engine/syncer_proto_util.h (renamed from chrome/browser/sync/engine/syncer_proto_util.h)14
-rw-r--r--sync/engine/syncer_proto_util_unittest.cc (renamed from chrome/browser/sync/engine/syncer_proto_util_unittest.cc)18
-rw-r--r--sync/engine/syncer_types.cc (renamed from chrome/browser/sync/engine/syncer_types.cc)4
-rw-r--r--sync/engine/syncer_types.h (renamed from chrome/browser/sync/engine/syncer_types.h)8
-rw-r--r--sync/engine/syncer_unittest.cc (renamed from chrome/browser/sync/engine/syncer_unittest.cc)78
-rw-r--r--sync/engine/syncer_util.cc (renamed from chrome/browser/sync/engine/syncer_util.cc)22
-rw-r--r--sync/engine/syncer_util.h (renamed from chrome/browser/sync/engine/syncer_util.h)14
-rw-r--r--sync/engine/syncproto.h (renamed from chrome/browser/sync/engine/syncproto.h)10
-rw-r--r--sync/engine/syncproto_unittest.cc (renamed from chrome/browser/sync/engine/syncproto_unittest.cc)4
-rw-r--r--sync/engine/update_applicator.cc (renamed from chrome/browser/sync/engine/update_applicator.cc)10
-rw-r--r--sync/engine/update_applicator.h (renamed from chrome/browser/sync/engine/update_applicator.h)10
-rw-r--r--sync/engine/verify_updates_command.cc (renamed from chrome/browser/sync/engine/verify_updates_command.cc)14
-rw-r--r--sync/engine/verify_updates_command.h (renamed from chrome/browser/sync/engine/verify_updates_command.h)14
-rw-r--r--sync/engine/verify_updates_command_unittest.cc (renamed from chrome/browser/sync/engine/verify_updates_command_unittest.cc)14
-rw-r--r--sync/js/DEPS3
-rw-r--r--sync/js/README.js (renamed from chrome/browser/sync/README.js)0
-rw-r--r--sync/js/js_arg_list.cc (renamed from chrome/browser/sync/js/js_arg_list.cc)4
-rw-r--r--sync/js/js_arg_list.h (renamed from chrome/browser/sync/js/js_arg_list.h)10
-rw-r--r--sync/js/js_arg_list_unittest.cc (renamed from chrome/browser/sync/js/js_arg_list_unittest.cc)4
-rw-r--r--sync/js/js_backend.h (renamed from chrome/browser/sync/js/js_backend.h)8
-rw-r--r--sync/js/js_controller.h (renamed from chrome/browser/sync/js/js_controller.h)8
-rw-r--r--sync/js/js_event_details.cc (renamed from chrome/browser/sync/js/js_event_details.cc)4
-rw-r--r--sync/js/js_event_details.h (renamed from chrome/browser/sync/js/js_event_details.h)10
-rw-r--r--sync/js/js_event_details_unittest.cc (renamed from chrome/browser/sync/js/js_event_details_unittest.cc)4
-rw-r--r--sync/js/js_event_handler.h (renamed from chrome/browser/sync/js/js_event_handler.h)8
-rw-r--r--sync/js/js_reply_handler.h (renamed from chrome/browser/sync/js/js_reply_handler.h)8
-rw-r--r--sync/js/js_test_util.cc (renamed from chrome/browser/sync/js/js_test_util.cc)8
-rw-r--r--sync/js/js_test_util.h (renamed from chrome/browser/sync/js/js_test_util.h)18
-rw-r--r--sync/js/sync_js_controller.cc (renamed from chrome/browser/sync/sync_js_controller.cc)8
-rw-r--r--sync/js/sync_js_controller.h (renamed from chrome/browser/sync/sync_js_controller.h)16
-rw-r--r--sync/js/sync_js_controller_unittest.cc (renamed from chrome/browser/sync/sync_js_controller_unittest.cc)10
-rw-r--r--sync/protocol/DEPS3
-rw-r--r--sync/protocol/proto_enum_conversions.cc (renamed from chrome/browser/sync/protocol/proto_enum_conversions.cc)2
-rw-r--r--sync/protocol/proto_enum_conversions.h (renamed from chrome/browser/sync/protocol/proto_enum_conversions.h)6
-rw-r--r--sync/protocol/proto_enum_conversions_unittest.cc (renamed from chrome/browser/sync/protocol/proto_enum_conversions_unittest.cc)4
-rw-r--r--sync/protocol/proto_value_conversions.cc (renamed from chrome/browser/sync/protocol/proto_value_conversions.cc)4
-rw-r--r--sync/protocol/proto_value_conversions.h (renamed from chrome/browser/sync/protocol/proto_value_conversions.h)6
-rw-r--r--sync/protocol/proto_value_conversions_unittest.cc (renamed from chrome/browser/sync/protocol/proto_value_conversions_unittest.cc)4
-rw-r--r--sync/protocol/service_constants.h (renamed from chrome/browser/sync/protocol/service_constants.h)8
-rw-r--r--sync/protocol/sync_protocol_error.cc (renamed from chrome/browser/sync/protocol/sync_protocol_error.cc)4
-rw-r--r--sync/protocol/sync_protocol_error.h (renamed from chrome/browser/sync/protocol/sync_protocol_error.h)10
-rw-r--r--sync/sessions/DEPS7
-rw-r--r--sync/sessions/debug_info_getter.h (renamed from chrome/browser/sync/sessions/debug_info_getter.h)6
-rw-r--r--sync/sessions/ordered_commit_set.cc (renamed from chrome/browser/sync/sessions/ordered_commit_set.cc)2
-rw-r--r--sync/sessions/ordered_commit_set.h (renamed from chrome/browser/sync/sessions/ordered_commit_set.h)12
-rw-r--r--sync/sessions/ordered_commit_set_unittest.cc (renamed from chrome/browser/sync/sessions/ordered_commit_set_unittest.cc)6
-rw-r--r--sync/sessions/session_state.cc (renamed from chrome/browser/sync/sessions/session_state.cc)4
-rw-r--r--sync/sessions/session_state.h (renamed from chrome/browser/sync/sessions/session_state.h)20
-rw-r--r--sync/sessions/session_state_unittest.cc (renamed from chrome/browser/sync/sessions/session_state_unittest.cc)2
-rw-r--r--sync/sessions/status_controller.cc (renamed from chrome/browser/sync/sessions/status_controller.cc)6
-rw-r--r--sync/sessions/status_controller.h (renamed from chrome/browser/sync/sessions/status_controller.h)12
-rw-r--r--sync/sessions/status_controller_unittest.cc (renamed from chrome/browser/sync/sessions/status_controller_unittest.cc)4
-rw-r--r--sync/sessions/sync_session.cc (renamed from chrome/browser/sync/sessions/sync_session.cc)6
-rw-r--r--sync/sessions/sync_session.h (renamed from chrome/browser/sync/sessions/sync_session.h)20
-rw-r--r--sync/sessions/sync_session_context.cc (renamed from chrome/browser/sync/sessions/sync_session_context.cc)8
-rw-r--r--sync/sessions/sync_session_context.h (renamed from chrome/browser/sync/sessions/sync_session_context.h)12
-rw-r--r--sync/sessions/sync_session_context_unittest.cc (renamed from chrome/browser/sync/sessions/sync_session_context_unittest.cc)6
-rw-r--r--sync/sessions/sync_session_unittest.cc (renamed from chrome/browser/sync/sessions/sync_session_unittest.cc)22
-rw-r--r--sync/sessions/test_util.cc (renamed from chrome/browser/sync/sessions/test_util.cc)2
-rw-r--r--sync/sessions/test_util.h (renamed from chrome/browser/sync/sessions/test_util.h)14
-rw-r--r--sync/sync.gyp351
-rw-r--r--sync/syncable/DEPS13
-rw-r--r--sync/syncable/blob.h (renamed from chrome/browser/sync/syncable/blob.h)8
-rw-r--r--sync/syncable/dir_open_result.h (renamed from chrome/browser/sync/syncable/dir_open_result.h)8
-rw-r--r--sync/syncable/directory_backing_store.cc (renamed from chrome/browser/sync/syncable/directory_backing_store.cc)14
-rw-r--r--sync/syncable/directory_backing_store.h (renamed from chrome/browser/sync/syncable/directory_backing_store.h)12
-rw-r--r--sync/syncable/directory_backing_store_unittest.cc (renamed from chrome/browser/sync/syncable/directory_backing_store_unittest.cc)12
-rw-r--r--sync/syncable/directory_change_delegate.h (renamed from chrome/browser/sync/syncable/directory_change_delegate.h)12
-rw-r--r--sync/syncable/in_memory_directory_backing_store.cc (renamed from chrome/browser/sync/syncable/in_memory_directory_backing_store.cc)2
-rw-r--r--sync/syncable/in_memory_directory_backing_store.h (renamed from chrome/browser/sync/syncable/in_memory_directory_backing_store.h)8
-rw-r--r--sync/syncable/model_type.cc (renamed from chrome/browser/sync/syncable/model_type.cc)4
-rw-r--r--sync/syncable/model_type.h (renamed from chrome/browser/sync/syncable/model_type.h)8
-rw-r--r--sync/syncable/model_type_payload_map.cc (renamed from chrome/browser/sync/syncable/model_type_payload_map.cc)4
-rw-r--r--sync/syncable/model_type_payload_map.h (renamed from chrome/browser/sync/syncable/model_type_payload_map.h)12
-rw-r--r--sync/syncable/model_type_payload_map_unittest.cc (renamed from chrome/browser/sync/syncable/model_type_payload_map_unittest.cc)2
-rw-r--r--sync/syncable/model_type_test_util.cc (renamed from chrome/browser/sync/syncable/model_type_test_util.cc)4
-rw-r--r--sync/syncable/model_type_test_util.h (renamed from chrome/browser/sync/syncable/model_type_test_util.h)10
-rw-r--r--sync/syncable/model_type_unittest.cc (renamed from chrome/browser/sync/syncable/model_type_unittest.cc)2
-rw-r--r--sync/syncable/on_disk_directory_backing_store.cc (renamed from chrome/browser/sync/syncable/on_disk_directory_backing_store.cc)2
-rw-r--r--sync/syncable/on_disk_directory_backing_store.h (renamed from chrome/browser/sync/syncable/on_disk_directory_backing_store.h)8
-rw-r--r--sync/syncable/syncable-inl.h (renamed from chrome/browser/sync/syncable/syncable-inl.h)8
-rw-r--r--sync/syncable/syncable.cc (renamed from chrome/browser/sync/syncable/syncable.cc)30
-rw-r--r--sync/syncable/syncable.h (renamed from chrome/browser/sync/syncable/syncable.h)26
-rw-r--r--sync/syncable/syncable_changes_version.h (renamed from chrome/browser/sync/syncable/syncable_changes_version.h)8
-rw-r--r--sync/syncable/syncable_columns.h (renamed from chrome/browser/sync/syncable/syncable_columns.h)12
-rw-r--r--sync/syncable/syncable_enum_conversions.cc (renamed from chrome/browser/sync/syncable/syncable_enum_conversions.cc)4
-rw-r--r--sync/syncable/syncable_enum_conversions.h (renamed from chrome/browser/sync/syncable/syncable_enum_conversions.h)10
-rw-r--r--sync/syncable/syncable_enum_conversions_unittest.cc (renamed from chrome/browser/sync/syncable/syncable_enum_conversions_unittest.cc)4
-rw-r--r--sync/syncable/syncable_id.cc (renamed from chrome/browser/sync/syncable/syncable_id.cc)4
-rw-r--r--sync/syncable/syncable_id.h (renamed from chrome/browser/sync/syncable/syncable_id.h)6
-rw-r--r--sync/syncable/syncable_id_unittest.cc (renamed from chrome/browser/sync/syncable/syncable_id_unittest.cc)4
-rw-r--r--sync/syncable/syncable_mock.cc (renamed from chrome/browser/sync/syncable/syncable_mock.cc)4
-rw-r--r--sync/syncable/syncable_mock.h (renamed from chrome/browser/sync/syncable/syncable_mock.h)12
-rw-r--r--sync/syncable/syncable_unittest.cc (renamed from chrome/browser/sync/syncable/syncable_unittest.cc)34
-rw-r--r--sync/syncable/transaction_observer.h (renamed from chrome/browser/sync/syncable/transaction_observer.h)12
-rw-r--r--sync/test/DEPS4
-rw-r--r--sync/test/engine/fake_model_safe_worker_registrar.cc (renamed from chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.cc)6
-rw-r--r--sync/test/engine/fake_model_safe_worker_registrar.h (renamed from chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.h)10
-rw-r--r--sync/test/engine/fake_model_worker.cc (renamed from chrome/browser/sync/test/engine/fake_model_worker.cc)2
-rw-r--r--sync/test/engine/fake_model_worker.h (renamed from chrome/browser/sync/test/engine/fake_model_worker.h)10
-rw-r--r--sync/test/engine/mock_connection_manager.cc (renamed from chrome/browser/sync/test/engine/mock_connection_manager.cc)6
-rw-r--r--sync/test/engine/mock_connection_manager.h (renamed from chrome/browser/sync/test/engine/mock_connection_manager.h)12
-rw-r--r--sync/test/engine/syncer_command_test.cc (renamed from chrome/browser/sync/test/engine/syncer_command_test.cc)2
-rw-r--r--sync/test/engine/syncer_command_test.h (renamed from chrome/browser/sync/test/engine/syncer_command_test.h)26
-rw-r--r--sync/test/engine/test_directory_setter_upper.cc (renamed from chrome/browser/sync/test/engine/test_directory_setter_upper.cc)6
-rw-r--r--sync/test/engine/test_directory_setter_upper.h (renamed from chrome/browser/sync/test/engine/test_directory_setter_upper.h)14
-rw-r--r--sync/test/engine/test_id_factory.h (renamed from chrome/browser/sync/test/engine/test_id_factory.h)10
-rw-r--r--sync/test/engine/test_syncable_utils.cc (renamed from chrome/browser/sync/test/engine/test_syncable_utils.cc)6
-rw-r--r--sync/test/engine/test_syncable_utils.h (renamed from chrome/browser/sync/test/engine/test_syncable_utils.h)10
-rw-r--r--sync/test/fake_encryptor.cc (renamed from chrome/browser/sync/test/fake_encryptor.cc)2
-rw-r--r--sync/test/fake_encryptor.h (renamed from chrome/browser/sync/test/fake_encryptor.h)8
-rw-r--r--sync/test/fake_extensions_activity_monitor.cc (renamed from chrome/browser/sync/test/fake_extensions_activity_monitor.cc)2
-rw-r--r--sync/test/fake_extensions_activity_monitor.h (renamed from chrome/browser/sync/test/fake_extensions_activity_monitor.h)8
-rw-r--r--sync/test/null_directory_change_delegate.cc (renamed from chrome/browser/sync/test/null_directory_change_delegate.cc)4
-rw-r--r--sync/test/null_directory_change_delegate.h (renamed from chrome/browser/sync/test/null_directory_change_delegate.h)10
-rw-r--r--sync/test/null_transaction_observer.cc (renamed from chrome/browser/sync/test/null_transaction_observer.cc)4
-rw-r--r--sync/test/null_transaction_observer.h (renamed from chrome/browser/sync/test/null_transaction_observer.h)10
-rw-r--r--sync/test/sessions/test_scoped_session_event_listener.h (renamed from chrome/browser/sync/test/sessions/test_scoped_session_event_listener.h)10
-rw-r--r--sync/test/test_directory_backing_store.cc (renamed from chrome/browser/sync/test/test_directory_backing_store.cc)2
-rw-r--r--sync/test/test_directory_backing_store.h (renamed from chrome/browser/sync/test/test_directory_backing_store.h)8
-rw-r--r--sync/util/DEPS7
-rw-r--r--sync/util/cryptographer.cc (renamed from chrome/browser/sync/util/cryptographer.cc)5
-rw-r--r--sync/util/cryptographer.h (renamed from chrome/browser/sync/util/cryptographer.h)10
-rw-r--r--sync/util/cryptographer_unittest.cc (renamed from chrome/browser/sync/util/cryptographer_unittest.cc)6
-rw-r--r--sync/util/data_encryption_win.cc (renamed from chrome/browser/sync/util/data_encryption.cc)10
-rw-r--r--sync/util/data_encryption_win.h (renamed from chrome/browser/sync/util/data_encryption.h)8
-rw-r--r--sync/util/data_encryption_win_unittest.cc (renamed from chrome/browser/sync/util/data_encryption_unittest.cc)2
-rw-r--r--sync/util/data_type_histogram.h (renamed from chrome/browser/sync/util/data_type_histogram.h)8
-rw-r--r--sync/util/data_type_histogram_unittest.cc (renamed from chrome/browser/sync/util/data_type_histogram_unittest.cc)2
-rw-r--r--sync/util/encryptor.h (renamed from chrome/browser/sync/util/encryptor.h)6
-rw-r--r--sync/util/enum_set.h (renamed from chrome/browser/sync/util/enum_set.h)8
-rw-r--r--sync/util/enum_set_unittest.cc (renamed from chrome/browser/sync/util/enum_set_unittest.cc)4
-rw-r--r--sync/util/extensions_activity_monitor.cc (renamed from chrome/browser/sync/util/extensions_activity_monitor.cc)2
-rw-r--r--sync/util/extensions_activity_monitor.h (renamed from chrome/browser/sync/util/extensions_activity_monitor.h)6
-rw-r--r--sync/util/get_session_name.cc (renamed from chrome/browser/sync/util/get_session_name.cc)6
-rw-r--r--sync/util/get_session_name.h (renamed from chrome/browser/sync/util/get_session_name.h)6
-rw-r--r--sync/util/get_session_name_mac.h (renamed from chrome/browser/sync/util/get_session_name_mac.h)6
-rw-r--r--sync/util/get_session_name_mac.mm (renamed from chrome/browser/sync/util/get_session_name_mac.mm)2
-rw-r--r--sync/util/get_session_name_unittest.cc (renamed from chrome/browser/sync/util/get_session_name_unittest.cc)2
-rw-r--r--sync/util/get_session_name_win.cc (renamed from chrome/browser/sync/util/get_session_name_win.cc)2
-rw-r--r--sync/util/get_session_name_win.h (renamed from chrome/browser/sync/util/get_session_name_win.h)6
-rw-r--r--sync/util/immutable.h (renamed from chrome/browser/sync/util/immutable.h)8
-rw-r--r--sync/util/immutable_unittest.cc (renamed from chrome/browser/sync/util/immutable_unittest.cc)4
-rw-r--r--sync/util/logging.cc (renamed from chrome/browser/sync/util/logging.cc)4
-rw-r--r--sync/util/logging.h (renamed from chrome/browser/sync/util/logging.h)8
-rw-r--r--sync/util/nigori.cc (renamed from chrome/browser/sync/util/nigori.cc)4
-rw-r--r--sync/util/nigori.h (renamed from chrome/browser/sync/util/nigori.h)8
-rw-r--r--sync/util/nigori_unittest.cc (renamed from chrome/browser/sync/util/nigori_unittest.cc)2
-rw-r--r--sync/util/protobuf_unittest.cc (renamed from chrome/browser/sync/util/protobuf_unittest.cc)0
-rw-r--r--sync/util/report_unrecoverable_error_function.h (renamed from chrome/browser/sync/internal_api/includes/report_unrecoverable_error_function.h)6
-rw-r--r--sync/util/syncer_error.cc (renamed from chrome/browser/sync/internal_api/includes/syncer_error.cc)2
-rw-r--r--sync/util/syncer_error.h (renamed from chrome/browser/sync/internal_api/includes/syncer_error.h)6
-rw-r--r--sync/util/test_unrecoverable_error_handler.cc (renamed from chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.cc)2
-rw-r--r--sync/util/test_unrecoverable_error_handler.h (renamed from chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h)8
-rw-r--r--sync/util/time.cc (renamed from chrome/browser/sync/util/time.cc)4
-rw-r--r--sync/util/time.h (renamed from chrome/browser/sync/util/time.h)8
-rw-r--r--sync/util/unrecoverable_error_handler.h (renamed from chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h)8
-rw-r--r--sync/util/unrecoverable_error_info.cc (renamed from chrome/browser/sync/util/unrecoverable_error_info.cc)4
-rw-r--r--sync/util/unrecoverable_error_info.h (renamed from chrome/browser/sync/util/unrecoverable_error_info.h)8
-rw-r--r--sync/util/weak_handle.cc (renamed from chrome/browser/sync/util/weak_handle.cc)4
-rw-r--r--sync/util/weak_handle.h (renamed from chrome/browser/sync/util/weak_handle.h)8
-rw-r--r--sync/util/weak_handle_unittest.cc (renamed from chrome/browser/sync/util/weak_handle_unittest.cc)4
382 files changed, 1885 insertions, 2014 deletions
diff --git a/build/all.gyp b/build/all.gyp
index 737f048..5984b98 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -28,6 +28,7 @@
'../sdch/sdch.gyp:*',
'../skia/skia.gyp:*',
'../sql/sql.gyp:*',
+ '../sync/sync.gyp:*',
'../testing/gmock.gyp:*',
'../testing/gtest.gyp:*',
'../third_party/bzip2/bzip2.gyp:*',
diff --git a/chrome/browser/autofill/DEPS b/chrome/browser/autofill/DEPS
index c975cbe..e82cbe8 100644
--- a/chrome/browser/autofill/DEPS
+++ b/chrome/browser/autofill/DEPS
@@ -1,3 +1,5 @@
include_rules = [
+ # TODO(akalin): Remove this dependency.
+ "+sync/util/data_encryption_win.h",
"+third_party/libphonenumber", # For phone number i18n.
]
diff --git a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
index 562eb23..41da6c0 100644
--- a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
+++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,7 +23,7 @@
#include "chrome/browser/autofill/personal_data_manager_observer.h"
#include "chrome/browser/autofill/phone_number.h"
#include "chrome/browser/autofill/phone_number_i18n.h"
-#include "chrome/browser/sync/util/data_encryption.h"
+#include "sync/util/data_encryption_win.h"
using base::win::RegKey;
diff --git a/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc b/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc
index d4c1731..7662202 100644
--- a/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc
+++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,7 +10,7 @@
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/autofill/field_types.h"
-#include "chrome/browser/sync/util/data_encryption.h"
+#include "sync/util/data_encryption_win.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::win::RegKey;
diff --git a/chrome/browser/sync/DEPS b/chrome/browser/sync/DEPS
index 570fa48..6128ec6 100644
--- a/chrome/browser/sync/DEPS
+++ b/chrome/browser/sync/DEPS
@@ -1,5 +1,17 @@
include_rules = [
# sync_notifier depends on the common jingle notifier classes.
"+jingle/notifier",
-]
+ # For files not in a subdirectory (what a mess!).
+ "+sync/js",
+ "+sync/engine/model_changing_syncer_command.h",
+ "+sync/engine/model_safe_worker.h",
+ "+sync/engine/polling_constants.h",
+ "+sync/sessions/session_state.h",
+ "+sync/syncable/model_type.h",
+ "+sync/syncable/model_type_payload_map.h",
+ "+sync/syncable/model_type_test_util.h",
+ "+sync/syncable/syncable.h",
+ "+sync/test",
+ "+sync/util",
+]
diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.cc b/chrome/browser/sync/abstract_profile_sync_service_test.cc
index 6797dbf..e7e3ddf 100644
--- a/chrome/browser/sync/abstract_profile_sync_service_test.cc
+++ b/chrome/browser/sync/abstract_profile_sync_service_test.cc
@@ -8,11 +8,11 @@
#include "base/bind_helpers.h"
#include "base/location.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
-#include "chrome/browser/sync/util/cryptographer.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/engine/test_id_factory.h"
+#include "sync/util/cryptographer.h"
using browser_sync::TestIdFactory;
using content::BrowserThread;
diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.h b/chrome/browser/sync/abstract_profile_sync_service_test.h
index bca5b81..1df23f6 100644
--- a/chrome/browser/sync/abstract_profile_sync_service_test.h
+++ b/chrome/browser/sync/abstract_profile_sync_service_test.h
@@ -15,8 +15,8 @@
#include "chrome/browser/signin/token_service.h"
#include "chrome/browser/sync/internal_api/change_record.h"
#include "chrome/browser/sync/profile_sync_components_factory_mock.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "content/test/test_browser_thread.h"
+#include "sync/syncable/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
class ProfileSyncService;
diff --git a/chrome/browser/sync/api/DEPS b/chrome/browser/sync/api/DEPS
index 0c52517..c7a8609 100644
--- a/chrome/browser/sync/api/DEPS
+++ b/chrome/browser/sync/api/DEPS
@@ -3,8 +3,8 @@ include_rules = [
"+chrome/browser/sync/api",
"+chrome/browser/sync/internal_api/base_node.h",
- "+chrome/browser/sync/protocol",
- "+chrome/browser/sync/syncable/model_type.h",
- "+chrome/browser/sync/util/immutable.h",
+ "+sync/protocol",
+ "+sync/syncable/model_type.h",
+ "+sync/util/immutable.h",
]
diff --git a/chrome/browser/sync/api/sync_change_unittest.cc b/chrome/browser/sync/api/sync_change_unittest.cc
index cdcd518..2480ffe 100644
--- a/chrome/browser/sync/api/sync_change_unittest.cc
+++ b/chrome/browser/sync/api/sync_change_unittest.cc
@@ -8,8 +8,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
#include "sync/protocol/preference_specifics.pb.h"
+#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/api/sync_data.cc b/chrome/browser/sync/api/sync_data.cc
index faf6694..3bd271d 100644
--- a/chrome/browser/sync/api/sync_data.cc
+++ b/chrome/browser/sync/api/sync_data.cc
@@ -11,9 +11,9 @@
#include "base/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/sync/internal_api/base_node.h"
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/model_type.h"
void SyncData::ImmutableSyncEntityTraits::InitializeWrapper(
Wrapper* wrapper) {
diff --git a/chrome/browser/sync/api/sync_data.h b/chrome/browser/sync/api/sync_data.h
index 563f3096..3fcc738 100644
--- a/chrome/browser/sync/api/sync_data.h
+++ b/chrome/browser/sync/api/sync_data.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,8 +11,8 @@
#include <vector>
#include "base/basictypes.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/immutable.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/immutable.h"
namespace sync_pb {
class EntitySpecifics;
diff --git a/chrome/browser/sync/api/sync_error.cc b/chrome/browser/sync/api/sync_error.cc
index 79ee2b3..b48e5bc 100644
--- a/chrome/browser/sync/api/sync_error.cc
+++ b/chrome/browser/sync/api/sync_error.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include "base/location.h"
#include "base/logging.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
SyncError::SyncError() {
Clear();
diff --git a/chrome/browser/sync/api/sync_error.h b/chrome/browser/sync/api/sync_error.h
index ff8fa16..95a2206 100644
--- a/chrome/browser/sync/api/sync_error.h
+++ b/chrome/browser/sync/api/sync_error.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,7 +10,7 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace tracked_objects {
class Location;
diff --git a/chrome/browser/sync/api/syncable_service.h b/chrome/browser/sync/api/syncable_service.h
index a2b0213..6b5152b 100644
--- a/chrome/browser/sync/api/syncable_service.h
+++ b/chrome/browser/sync/api/syncable_service.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,10 +10,10 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/api/sync_change_processor.h"
#include "chrome/browser/sync/api/sync_data.h"
#include "chrome/browser/sync/api/sync_error.h"
+#include "sync/syncable/model_type.h"
class SyncData;
diff --git a/chrome/browser/sync/backend_migrator.cc b/chrome/browser/sync/backend_migrator.cc
index 28cc2c9..f17ee99 100644
--- a/chrome/browser/sync/backend_migrator.cc
+++ b/chrome/browser/sync/backend_migrator.cc
@@ -10,11 +10,11 @@
#include "chrome/browser/sync/internal_api/configure_reason.h"
#include "chrome/browser/sync/internal_api/read_transaction.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/sessions/session_state.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/sessions/session_state.h"
using syncable::ModelTypeSet;
diff --git a/chrome/browser/sync/backend_migrator.h b/chrome/browser/sync/backend_migrator.h
index f178930..4688ce6 100644
--- a/chrome/browser/sync/backend_migrator.h
+++ b/chrome/browser/sync/backend_migrator.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,9 +9,9 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "chrome/browser/sync/glue/data_type_manager.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "sync/syncable/model_type.h"
class ProfileSyncService;
diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc
index 0c53bde..3dd8cbf 100644
--- a/chrome/browser/sync/backend_migrator_unittest.cc
+++ b/chrome/browser/sync/backend_migrator_unittest.cc
@@ -9,11 +9,11 @@
#include "chrome/browser/sync/glue/data_type_manager_mock.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
#include "chrome/browser/sync/profile_sync_service_mock.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/syncable/model_type_test_util.h"
#include "chrome/browser/sync/test/engine/test_user_share.h"
#include "chrome/common/chrome_notification_types.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/sessions/session_state.h"
+#include "sync/syncable/model_type_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/backend_unrecoverable_error_handler.h b/chrome/browser/sync/backend_unrecoverable_error_handler.h
index d03426c..b9f8d18 100644
--- a/chrome/browser/sync/backend_unrecoverable_error_handler.h
+++ b/chrome/browser/sync/backend_unrecoverable_error_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,8 +11,8 @@
#include "base/location.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/util/unrecoverable_error_handler.h"
+#include "sync/util/weak_handle.h"
class ProfileSyncService;
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/DEPS b/chrome/browser/sync/engine/DEPS
deleted file mode 100644
index 4ddf242..0000000
--- a/chrome/browser/sync/engine/DEPS
+++ /dev/null
@@ -1,17 +0,0 @@
-include_rules = [
- "-chrome",
- "+chrome/test/base",
-
- "+chrome/browser/sync/engine",
- "+chrome/browser/sync/js",
- "+chrome/browser/sync/notifier",
- "+chrome/browser/sync/protocol",
- "+chrome/browser/sync/sessions",
- "+chrome/browser/sync/syncable",
- "+chrome/browser/sync/test",
- "+chrome/browser/sync/util",
-
- # TODO(rlarocque) 19878: Move remaining syncapi-related headers to
- # internal_api/, then remove this DEPS rule.
- "+chrome/browser/sync/internal_api",
-]
diff --git a/chrome/browser/sync/glue/DEPS b/chrome/browser/sync/glue/DEPS
index fecb67e..95408b3 100644
--- a/chrome/browser/sync/glue/DEPS
+++ b/chrome/browser/sync/glue/DEPS
@@ -1,5 +1,5 @@
include_rules = [
- "-chrome/browser/sync/engine",
+ "-sync/engine",
"-chrome/browser/sync/notifier",
"-chrome/browser/sync/sessions",
"-chrome/browser/sync/syncable",
@@ -9,28 +9,27 @@ include_rules = [
# Should these live in their own "includes" (e.g) directory(ies)?
# Bug 19878.
- "+chrome/browser/sync/engine/model_safe_worker.h",
- "+chrome/browser/sync/engine/passive_model_worker.h",
+ "+sync/engine/model_safe_worker.h",
+ "+sync/engine/passive_model_worker.h",
"+chrome/browser/sync/notifier/sync_notifier.h",
"+chrome/browser/sync/notifier/sync_notifier_factory.h",
"+chrome/browser/sync/notifier/sync_notifier_observer.h",
- "+chrome/browser/sync/syncable/model_type.h",
- "+chrome/browser/sync/syncable/model_type_payload_map.h",
- "+chrome/browser/sync/sessions/session_state.h",
+ "+sync/syncable/model_type.h",
+ "+sync/syncable/model_type_payload_map.h",
+ "+sync/sessions/session_state.h",
# Mocks/tests.
- "+chrome/browser/sync/engine/read_node_mock.h",
- "+chrome/browser/sync/engine/syncapi_mock.h",
+ "+sync/engine/read_node_mock.h",
+ "+sync/engine/syncapi_mock.h",
"+chrome/browser/sync/notifier/mock_sync_notifier_observer.h",
- "+chrome/browser/sync/syncable/model_type_test_util.h",
- "+chrome/browser/sync/syncable/syncable_mock.h",
+ "+sync/syncable/model_type_test_util.h",
+ "+sync/syncable/syncable_mock.h",
# TODO(zea): SessionModelAssociator shouldn't need this.
- "+chrome/browser/sync/syncable/syncable.h",
+ "+sync/syncable/syncable.h",
# TODO(tim): This shouldn't be needed.
- "+chrome/browser/sync/syncable/directory_manager.h",
- "+chrome/browser/sync/util/cryptographer.h"
+ "+sync/util/cryptographer.h"
]
diff --git a/chrome/browser/sync/glue/backend_data_type_configurer.h b/chrome/browser/sync/glue/backend_data_type_configurer.h
index 74d8a18..2b77a3b 100644
--- a/chrome/browser/sync/glue/backend_data_type_configurer.h
+++ b/chrome/browser/sync/glue/backend_data_type_configurer.h
@@ -8,7 +8,7 @@
#include "base/callback.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index 42c730b..5d38bac 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -20,8 +20,8 @@
#include "chrome/browser/sync/internal_api/read_transaction.h"
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/util/cryptographer.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/util/cryptographer.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.h b/chrome/browser/sync/glue/bookmark_model_associator.h
index 34fa2c8..f3b75bb 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.h
+++ b/chrome/browser/sync/glue/bookmark_model_associator.h
@@ -13,10 +13,10 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/glue/data_type_error_handler.h"
#include "chrome/browser/sync/glue/model_associator.h"
+#include "sync/util/unrecoverable_error_handler.h"
class BookmarkModel;
class BookmarkNode;
diff --git a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
index 42a2ec1..361864e 100644
--- a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
+++ b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
@@ -12,10 +12,10 @@
#include "chrome/browser/sync/glue/chrome_sync_notification_bridge.h"
#include "chrome/browser/sync/notifier/mock_sync_notifier_observer.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_test_util.h"
#include "chrome/test/base/profile_mock.h"
#include "content/test/test_browser_thread.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/glue/browser_thread_model_worker.h b/chrome/browser/sync/glue/browser_thread_model_worker.h
index b053fa6..53ca156 100644
--- a/chrome/browser/sync/glue/browser_thread_model_worker.h
+++ b/chrome/browser/sync/glue/browser_thread_model_worker.h
@@ -9,9 +9,9 @@
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/internal_api/includes/syncer_error.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/util/syncer_error.h"
namespace base {
class WaitableEvent;
diff --git a/chrome/browser/sync/glue/change_processor_mock.h b/chrome/browser/sync/glue/change_processor_mock.h
index 9261b0d..b1a36b2 100644
--- a/chrome/browser/sync/glue/change_processor_mock.h
+++ b/chrome/browser/sync/glue/change_processor_mock.h
@@ -7,8 +7,8 @@
#pragma once
#include "chrome/browser/sync/glue/change_processor.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/unrecoverable_error_handler.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/chrome_encryptor.h b/chrome/browser/sync/glue/chrome_encryptor.h
index a0f2a50..a97dccb 100644
--- a/chrome/browser/sync/glue/chrome_encryptor.h
+++ b/chrome/browser/sync/glue/chrome_encryptor.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/util/encryptor.h"
+#include "sync/util/encryptor.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h b/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h
index c92d31a..057b480 100644
--- a/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h
+++ b/chrome/browser/sync/glue/chrome_extensions_activity_monitor.h
@@ -8,9 +8,9 @@
#include "base/compiler_specific.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "sync/util/extensions_activity_monitor.h"
namespace browser_sync {
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 abd2c7b..b2ec1ee 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
@@ -10,15 +10,15 @@
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
#include "chrome/browser/sync/notifier/mock_sync_notifier_observer.h"
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/profile_mock.h"
-#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_service.h"
#include "content/test/test_browser_thread.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/glue/data_type_controller.cc b/chrome/browser/sync/glue/data_type_controller.cc
index a647854..0eb5ec6 100644
--- a/chrome/browser/sync/glue/data_type_controller.cc
+++ b/chrome/browser/sync/glue/data_type_controller.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
-#include "chrome/browser/sync/util/data_type_histogram.h"
+#include "sync/util/data_type_histogram.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/data_type_controller.h b/chrome/browser/sync/glue/data_type_controller.h
index d39bdcd..3d451b2 100644
--- a/chrome/browser/sync/glue/data_type_controller.h
+++ b/chrome/browser/sync/glue/data_type_controller.h
@@ -12,11 +12,11 @@
#include "base/callback.h"
#include "base/location.h"
#include "base/message_loop_helpers.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/glue/data_type_error_handler.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/unrecoverable_error_handler.h"
class SyncError;
diff --git a/chrome/browser/sync/glue/data_type_error_handler.h b/chrome/browser/sync/glue/data_type_error_handler.h
index 97cb247..06821e7 100644
--- a/chrome/browser/sync/glue/data_type_error_handler.h
+++ b/chrome/browser/sync/glue/data_type_error_handler.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/location.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
+#include "sync/util/unrecoverable_error_handler.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/data_type_manager.h b/chrome/browser/sync/glue/data_type_manager.h
index 45dcaae..f491900 100644
--- a/chrome/browser/sync/glue/data_type_manager.h
+++ b/chrome/browser/sync/glue/data_type_manager.h
@@ -14,7 +14,7 @@
#include "chrome/browser/sync/api/sync_error.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
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 a136e48..6459664 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
@@ -9,13 +9,13 @@
#include "chrome/browser/sync/glue/backend_data_type_configurer.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "content/test/notification_observer_mock.h"
#include "content/test/test_browser_thread.h"
+#include "sync/syncable/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/glue/frontend_data_type_controller.cc b/chrome/browser/sync/glue/frontend_data_type_controller.cc
index 69a0fac..fca7a1b 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/frontend_data_type_controller.cc
@@ -12,9 +12,9 @@
#include "chrome/browser/sync/glue/model_associator.h"
#include "chrome/browser/sync/profile_sync_components_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/data_type_histogram.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/data_type_histogram.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/generic_change_processor.cc b/chrome/browser/sync/glue/generic_change_processor.cc
index 8f294fb..afa29d4 100644
--- a/chrome/browser/sync/glue/generic_change_processor.cc
+++ b/chrome/browser/sync/glue/generic_change_processor.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/sync/api/sync_change.h"
#include "chrome/browser/sync/api/sync_error.h"
#include "chrome/browser/sync/api/syncable_service.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
#include "chrome/browser/sync/internal_api/base_node.h"
#include "chrome/browser/sync/internal_api/change_record.h"
#include "chrome/browser/sync/internal_api/read_node.h"
@@ -18,6 +17,7 @@
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/util/unrecoverable_error_handler.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/history_model_worker.h b/chrome/browser/sync/glue/history_model_worker.h
index 9dc81b5..f4784c3 100644
--- a/chrome/browser/sync/glue/history_model_worker.h
+++ b/chrome/browser/sync/glue/history_model_worker.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_SYNC_GLUE_HISTORY_MODEL_WORKER_H_
#pragma once
-#include "chrome/browser/sync/engine/model_safe_worker.h"
+#include "sync/engine/model_safe_worker.h"
#include "base/basictypes.h"
#include "base/callback_forward.h"
diff --git a/chrome/browser/sync/glue/model_associator.h b/chrome/browser/sync/glue/model_associator.h
index ea1e13f..891f3ff 100644
--- a/chrome/browser/sync/glue/model_associator.h
+++ b/chrome/browser/sync/glue/model_associator.h
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
class SyncError;
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 8661739..add06f8 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
@@ -10,8 +10,8 @@
#include "chrome/browser/sync/glue/shared_change_processor_ref.h"
#include "chrome/browser/sync/profile_sync_components_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/syncable/model_type.h"
using content::BrowserThread;
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 01db139..59f7cc7 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
@@ -14,7 +14,6 @@
#include "base/test/test_timeouts.h"
#include "base/tracked_objects.h"
#include "chrome/browser/sync/api/syncable_service_mock.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/glue/data_type_controller_mock.h"
#include "chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h"
#include "chrome/browser/sync/glue/shared_change_processor_mock.h"
@@ -22,6 +21,7 @@
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/test/base/profile_mock.h"
#include "content/test/test_browser_thread.h"
+#include "sync/engine/model_safe_worker.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
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 afd9e98..8768fff 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
@@ -14,9 +14,9 @@
#include "chrome/browser/sync/glue/model_associator.h"
#include "chrome/browser/sync/profile_sync_components_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/data_type_histogram.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/data_type_histogram.h"
using content::BrowserThread;
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 e60a4bc..abdff77 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
@@ -13,7 +13,6 @@
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
#include "base/tracked_objects.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/glue/change_processor_mock.h"
#include "chrome/browser/sync/glue/data_type_controller_mock.h"
#include "chrome/browser/sync/glue/model_associator_mock.h"
@@ -23,6 +22,7 @@
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/test/base/profile_mock.h"
#include "content/test/test_browser_thread.h"
+#include "sync/engine/model_safe_worker.h"
using base::WaitableEvent;
using browser_sync::ChangeProcessorMock;
diff --git a/chrome/browser/sync/glue/password_model_worker.h b/chrome/browser/sync/glue/password_model_worker.h
index 92740c7..2e10a8c 100644
--- a/chrome/browser/sync/glue/password_model_worker.h
+++ b/chrome/browser/sync/glue/password_model_worker.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_SYNC_GLUE_PASSWORD_MODEL_WORKER_H_
#pragma once
-#include "chrome/browser/sync/engine/model_safe_worker.h"
+#include "sync/engine/model_safe_worker.h"
#include "base/basictypes.h"
#include "base/callback_forward.h"
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 2ec8336..bbd6ef8 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -26,14 +26,14 @@
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/get_session_name.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "sync/protocol/session_specifics.pb.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/get_session_name.h"
#if defined(OS_LINUX)
#include "base/linux_util.h"
#elif defined(OS_WIN)
diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h
index 267d91d..9110066 100644
--- a/chrome/browser/sync/glue/session_model_associator.h
+++ b/chrome/browser/sync/glue/session_model_associator.h
@@ -26,7 +26,7 @@
#include "chrome/browser/sync/glue/synced_session_tracker.h"
#include "chrome/browser/sync/glue/synced_tab_delegate.h"
#include "chrome/browser/sync/glue/synced_window_delegate.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
class Profile;
class ProfileSyncService;
diff --git a/chrome/browser/sync/glue/shared_change_processor.h b/chrome/browser/sync/glue/shared_change_processor.h
index cdfe32a..b87e1f9 100644
--- a/chrome/browser/sync/glue/shared_change_processor.h
+++ b/chrome/browser/sync/glue/shared_change_processor.h
@@ -13,8 +13,8 @@
#include "base/synchronization/lock.h"
#include "chrome/browser/sync/api/sync_change_processor.h"
#include "chrome/browser/sync/api/sync_error.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/glue/data_type_error_handler.h"
+#include "sync/engine/model_safe_worker.h"
class ProfileSyncComponentsFactory;
class ProfileSyncService;
diff --git a/chrome/browser/sync/glue/shared_change_processor_mock.h b/chrome/browser/sync/glue/shared_change_processor_mock.h
index e7eaf26..b373364 100644
--- a/chrome/browser/sync/glue/shared_change_processor_mock.h
+++ b/chrome/browser/sync/glue/shared_change_processor_mock.h
@@ -8,7 +8,7 @@
#include "chrome/browser/sync/api/sync_change.h"
#include "chrome/browser/sync/glue/shared_change_processor.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
+#include "sync/util/unrecoverable_error_handler.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index c6b9a17a..204e4ba0 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -30,9 +30,7 @@
#include "chrome/browser/sync/internal_api/base_transaction.h"
#include "chrome/browser/sync/internal_api/read_transaction.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
-#include "chrome/browser/sync/sessions/session_state.h"
#include "chrome/browser/sync/sync_prefs.h"
-#include "chrome/browser/sync/util/nigori.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
@@ -46,6 +44,8 @@
#include "net/url_request/url_request_context_getter.h"
#include "sync/protocol/encryption.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/sessions/session_state.h"
+#include "sync/util/nigori.h"
static const int kSaveChangesIntervalSeconds = 10;
static const FilePath::CharType kSyncDataFolderName[] =
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index 00fb58f..5d886d1 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -15,21 +15,21 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/glue/backend_data_type_configurer.h"
#include "chrome/browser/sync/glue/chrome_extensions_activity_monitor.h"
#include "chrome/browser/sync/glue/chrome_sync_notification_bridge.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
-#include "chrome/browser/sync/internal_api/includes/report_unrecoverable_error_function.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
#include "chrome/browser/sync/notifier/sync_notifier_factory.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "googleurl/src/gurl.h"
+#include "sync/engine/model_safe_worker.h"
#include "sync/protocol/encryption.pb.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/report_unrecoverable_error_function.h"
+#include "sync/util/unrecoverable_error_handler.h"
+#include "sync/util/weak_handle.h"
class MessageLoop;
class Profile;
diff --git a/chrome/browser/sync/glue/sync_backend_host_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
index 1a60396..09e3d1a 100644
--- a/chrome/browser/sync/glue/sync_backend_host_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
@@ -8,16 +8,16 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
#include "chrome/browser/sync/sync_prefs.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/test/base/testing_profile.h"
#include "content/test/test_browser_thread.h"
#include "content/test/test_url_fetcher_factory.h"
#include "googleurl/src/gurl.h"
+#include "sync/engine/model_safe_worker.h"
#include "sync/protocol/encryption.pb.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/test_unrecoverable_error_handler.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/glue/sync_backend_registrar.cc b/chrome/browser/sync/glue/sync_backend_registrar.cc
index bc54887..e3e5164 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar.cc
@@ -11,13 +11,13 @@
#include "base/message_loop.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/engine/passive_model_worker.h"
#include "chrome/browser/sync/glue/browser_thread_model_worker.h"
#include "chrome/browser/sync/glue/change_processor.h"
#include "chrome/browser/sync/glue/history_model_worker.h"
#include "chrome/browser/sync/glue/password_model_worker.h"
#include "chrome/browser/sync/glue/ui_model_worker.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/engine/passive_model_worker.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/sync_backend_registrar.h b/chrome/browser/sync/glue/sync_backend_registrar.h
index 22cfd8d..9e636af 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar.h
+++ b/chrome/browser/sync/glue/sync_backend_registrar.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,9 +13,9 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/syncable/model_type.h"
class MessageLoop;
class Profile;
diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
index 06739ad..e5ec7d4 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,10 +6,10 @@
#include "chrome/browser/sync/glue/change_processor_mock.h"
#include "chrome/browser/sync/glue/ui_model_worker.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/test/engine/test_user_share.h"
#include "chrome/test/base/testing_profile.h"
#include "content/test/test_browser_thread.h"
+#include "sync/syncable/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/glue/theme_change_processor.cc b/chrome/browser/sync/glue/theme_change_processor.cc
index 7368281..11872eb 100644
--- a/chrome/browser/sync/glue/theme_change_processor.cc
+++ b/chrome/browser/sync/glue/theme_change_processor.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/glue/theme_util.h"
#include "chrome/browser/sync/internal_api/change_record.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
#include "chrome/browser/sync/internal_api/read_node.h"
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
@@ -21,6 +20,7 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "sync/protocol/theme_specifics.pb.h"
+#include "sync/util/unrecoverable_error_handler.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/theme_model_associator.h b/chrome/browser/sync/glue/theme_model_associator.h
index 9f54d5a..1eecaf3 100644
--- a/chrome/browser/sync/glue/theme_model_associator.h
+++ b/chrome/browser/sync/glue/theme_model_associator.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/sync/glue/model_associator.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
class ProfileSyncService;
diff --git a/chrome/browser/sync/glue/ui_data_type_controller.cc b/chrome/browser/sync/glue/ui_data_type_controller.cc
index d48fdda..e4475db 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller.cc
+++ b/chrome/browser/sync/glue/ui_data_type_controller.cc
@@ -11,9 +11,9 @@
#include "chrome/browser/sync/glue/generic_change_processor.h"
#include "chrome/browser/sync/profile_sync_components_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/data_type_histogram.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/data_type_histogram.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h
index 5d012ba..af94de5 100644
--- a/chrome/browser/sync/glue/ui_model_worker.h
+++ b/chrome/browser/sync/glue/ui_model_worker.h
@@ -10,8 +10,8 @@
#include "base/compiler_specific.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/util/unrecoverable_error_info.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/util/unrecoverable_error_info.h"
class MessageLoop;
diff --git a/chrome/browser/sync/internal_api/DEPS b/chrome/browser/sync/internal_api/DEPS
index fb0d2e5..5f69c7a 100644
--- a/chrome/browser/sync/internal_api/DEPS
+++ b/chrome/browser/sync/internal_api/DEPS
@@ -7,11 +7,5 @@ include_rules = [
"-chrome/browser/sync/api",
"-chrome/browser/sync/glue",
- # Some functionality depends on command-line swithces
- "+chrome/common/chrome_switches.h",
-
- # We store the Chrome version in the nigori node.
- "+chrome/common/chrome_version_info.h",
-
- "+chrome/common/net/gaia/google_service_auth_error.h",
+ "+sync",
]
diff --git a/chrome/browser/sync/engine/all_status.cc b/chrome/browser/sync/internal_api/all_status.cc
index a32c72d..6276b6c 100644
--- a/chrome/browser/sync/engine/all_status.cc
+++ b/chrome/browser/sync/internal_api/all_status.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/all_status.h"
+#include "chrome/browser/sync/internal_api/all_status.h"
#include <algorithm>
#include "base/logging.h"
#include "base/port.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/protocol/service_constants.h"
+#include "sync/sessions/session_state.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/all_status.h b/chrome/browser/sync/internal_api/all_status.h
index aa234be..7ba2a93 100644
--- a/chrome/browser/sync/engine/all_status.h
+++ b/chrome/browser/sync/internal_api/all_status.h
@@ -5,8 +5,8 @@
// The AllStatus object watches various sync engine components and aggregates
// the status of all of them into one place.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_
-#define CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_
+#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_ALL_STATUS_H_
+#define CHROME_BROWSER_SYNC_INTERNAL_API_ALL_STATUS_H_
#pragma once
#include <map>
@@ -14,9 +14,9 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
@@ -83,4 +83,4 @@ class ScopedStatusLock {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_
+#endif // CHROME_BROWSER_SYNC_INTERNAL_API_ALL_STATUS_H_
diff --git a/chrome/browser/sync/internal_api/base_node.cc b/chrome/browser/sync/internal_api/base_node.cc
index 7ce674a..bd766be 100644
--- a/chrome/browser/sync/internal_api/base_node.cc
+++ b/chrome/browser/sync/internal_api/base_node.cc
@@ -9,11 +9,8 @@
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/syncapi_internal.h"
+#include "chrome/browser/sync/internal_api/syncapi_internal.h"
#include "chrome/browser/sync/internal_api/base_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/util/time.h"
#include "sync/protocol/app_specifics.pb.h"
#include "sync/protocol/autofill_specifics.pb.h"
#include "sync/protocol/bookmark_specifics.pb.h"
@@ -23,6 +20,9 @@
#include "sync/protocol/session_specifics.pb.h"
#include "sync/protocol/theme_specifics.pb.h"
#include "sync/protocol/typed_url_specifics.pb.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/util/time.h"
using syncable::SPECIFICS;
using sync_pb::AutofillProfileSpecifics;
diff --git a/chrome/browser/sync/internal_api/base_node.h b/chrome/browser/sync/internal_api/base_node.h
index 4159fde..9aaeaec 100644
--- a/chrome/browser/sync/internal_api/base_node.h
+++ b/chrome/browser/sync/internal_api/base_node.h
@@ -12,9 +12,9 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "googleurl/src/gurl.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/model_type.h"
// Forward declarations of internal class types so that sync API objects
// may have opaque pointers to these types.
diff --git a/chrome/browser/sync/internal_api/base_transaction.cc b/chrome/browser/sync/internal_api/base_transaction.cc
index 58751c6..d14384e 100644
--- a/chrome/browser/sync/internal_api/base_transaction.cc
+++ b/chrome/browser/sync/internal_api/base_transaction.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base_transaction.h"
+#include "chrome/browser/sync/internal_api/base_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/cryptographer.h"
using browser_sync::Cryptographer;
diff --git a/chrome/browser/sync/internal_api/base_transaction.h b/chrome/browser/sync/internal_api/base_transaction.h
index c678162..bf3fa9c 100644
--- a/chrome/browser/sync/internal_api/base_transaction.h
+++ b/chrome/browser/sync/internal_api/base_transaction.h
@@ -8,7 +8,7 @@
#include "chrome/browser/sync/internal_api/user_share.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/util/cryptographer.h"
namespace syncable {
class BaseTransaction;
diff --git a/chrome/browser/sync/internal_api/change_record.cc b/chrome/browser/sync/internal_api/change_record.cc
index 5552f99..f130203 100644
--- a/chrome/browser/sync/internal_api/change_record.cc
+++ b/chrome/browser/sync/internal_api/change_record.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include "base/values.h"
#include "chrome/browser/sync/internal_api/base_node.h"
#include "chrome/browser/sync/internal_api/read_node.h"
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
+#include "sync/protocol/proto_value_conversions.h"
namespace sync_api {
diff --git a/chrome/browser/sync/internal_api/change_record.h b/chrome/browser/sync/internal_api/change_record.h
index 45dc7db..4d0b527 100644
--- a/chrome/browser/sync/internal_api/change_record.h
+++ b/chrome/browser/sync/internal_api/change_record.h
@@ -9,9 +9,9 @@
#include "base/basictypes.h"
#include "base/memory/linked_ptr.h"
-#include "chrome/browser/sync/util/immutable.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/util/immutable.h"
namespace base {
class DictionaryValue;
diff --git a/chrome/browser/sync/internal_api/change_record_unittest.cc b/chrome/browser/sync/internal_api/change_record_unittest.cc
index 00105147..ac99510 100644
--- a/chrome/browser/sync/internal_api/change_record_unittest.cc
+++ b/chrome/browser/sync/internal_api/change_record_unittest.cc
@@ -8,8 +8,8 @@
#include "base/string_number_conversions.h"
#include "base/test/values_test_util.h"
#include "base/values.h"
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
#include "sync/protocol/extension_specifics.pb.h"
+#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/internal_api/change_reorder_buffer.cc b/chrome/browser/sync/internal_api/change_reorder_buffer.cc
index 090f744..04c0955 100644
--- a/chrome/browser/sync/internal_api/change_reorder_buffer.cc
+++ b/chrome/browser/sync/internal_api/change_reorder_buffer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,8 +11,8 @@
#include <vector>
#include "chrome/browser/sync/internal_api/read_node.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
using std::numeric_limits;
using std::pair;
diff --git a/chrome/browser/sync/internal_api/debug_info_event_listener.h b/chrome/browser/sync/internal_api/debug_info_event_listener.h
index c1f0ce7..7a0568f 100644
--- a/chrome/browser/sync/internal_api/debug_info_event_listener.h
+++ b/chrome/browser/sync/internal_api/debug_info_event_listener.h
@@ -10,11 +10,11 @@
#include "base/compiler_specific.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
-#include "chrome/browser/sync/js/js_backend.h"
-#include "chrome/browser/sync/sessions/debug_info_getter.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/js/js_backend.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/sessions/debug_info_getter.h"
+#include "sync/sessions/session_state.h"
+#include "sync/util/weak_handle.h"
namespace sync_api {
diff --git a/chrome/browser/sync/js/js_mutation_event_observer.cc b/chrome/browser/sync/internal_api/js_mutation_event_observer.cc
index d54ddd7..2a630800 100644
--- a/chrome/browser/sync/js/js_mutation_event_observer.cc
+++ b/chrome/browser/sync/internal_api/js_mutation_event_observer.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_mutation_event_observer.h"
+#include "chrome/browser/sync/internal_api/js_mutation_event_observer.h"
#include <string>
@@ -10,8 +10,8 @@
#include "base/logging.h"
#include "base/string_number_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_event_handler.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_event_handler.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/js/js_mutation_event_observer.h b/chrome/browser/sync/internal_api/js_mutation_event_observer.h
index a0e347b..850fe75 100644
--- a/chrome/browser/sync/js/js_mutation_event_observer.h
+++ b/chrome/browser/sync/internal_api/js_mutation_event_observer.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_MUTATION_EVENT_OBSERVER_H_
-#define CHROME_BROWSER_SYNC_JS_JS_MUTATION_EVENT_OBSERVER_H_
+#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_
+#define CHROME_BROWSER_SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_
#pragma once
#include <string>
@@ -13,8 +13,8 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
-#include "chrome/browser/sync/syncable/transaction_observer.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/syncable/transaction_observer.h"
+#include "sync/util/weak_handle.h"
namespace tracked_objects {
class Location;
@@ -67,4 +67,4 @@ class JsMutationEventObserver
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_MUTATION_EVENT_OBSERVER_H_
+#endif // CHROME_BROWSER_SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_
diff --git a/chrome/browser/sync/js/js_mutation_event_observer_unittest.cc b/chrome/browser/sync/internal_api/js_mutation_event_observer_unittest.cc
index 4a211f3..89ef5cb 100644
--- a/chrome/browser/sync/js/js_mutation_event_observer_unittest.cc
+++ b/chrome/browser/sync/internal_api/js_mutation_event_observer_unittest.cc
@@ -1,16 +1,16 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_mutation_event_observer.h"
+#include "chrome/browser/sync/internal_api/js_mutation_event_observer.h"
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "base/values.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_test_util.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_test_util.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/weak_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/js/js_sync_manager_observer.cc b/chrome/browser/sync/internal_api/js_sync_manager_observer.cc
index 8ad75ff..6aa236c 100644
--- a/chrome/browser/sync/js/js_sync_manager_observer.cc
+++ b/chrome/browser/sync/internal_api/js_sync_manager_observer.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_sync_manager_observer.h"
+#include "chrome/browser/sync/internal_api/js_sync_manager_observer.h"
#include <cstddef>
@@ -11,11 +11,11 @@
#include "base/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/sync/internal_api/change_record.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_event_handler.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_event_handler.h"
+#include "sync/sessions/session_state.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/js/js_sync_manager_observer.h b/chrome/browser/sync/internal_api/js_sync_manager_observer.h
index aa622a3..de7ec6b 100644
--- a/chrome/browser/sync/js/js_sync_manager_observer.h
+++ b/chrome/browser/sync/internal_api/js_sync_manager_observer.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_SYNC_MANAGER_OBSERVER_H_
-#define CHROME_BROWSER_SYNC_JS_JS_SYNC_MANAGER_OBSERVER_H_
+#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_
+#define CHROME_BROWSER_SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_
#pragma once
#include <string>
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/util/weak_handle.h"
namespace tracked_objects {
class Location;
@@ -66,4 +66,4 @@ class JsSyncManagerObserver : public sync_api::SyncManager::Observer {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_SYNC_MANAGER_OBSERVER_H_
+#endif // CHROME_BROWSER_SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_
diff --git a/chrome/browser/sync/js/js_sync_manager_observer_unittest.cc b/chrome/browser/sync/internal_api/js_sync_manager_observer_unittest.cc
index 10a6496..7637ea7 100644
--- a/chrome/browser/sync/js/js_sync_manager_observer_unittest.cc
+++ b/chrome/browser/sync/internal_api/js_sync_manager_observer_unittest.cc
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_sync_manager_observer.h"
+#include "chrome/browser/sync/internal_api/js_sync_manager_observer.h"
#include "base/basictypes.h"
#include "base/location.h"
#include "base/message_loop.h"
#include "base/values.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_test_util.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_test_util.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/sessions/session_state.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/weak_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/internal_api/read_node.cc b/chrome/browser/sync/internal_api/read_node.cc
index 73e0b29..73f2389 100644
--- a/chrome/browser/sync/internal_api/read_node.cc
+++ b/chrome/browser/sync/internal_api/read_node.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "chrome/browser/sync/internal_api/base_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
namespace sync_api {
diff --git a/chrome/browser/sync/internal_api/read_node.h b/chrome/browser/sync/internal_api/read_node.h
index 5e716d3..2dd90a5 100644
--- a/chrome/browser/sync/internal_api/read_node.h
+++ b/chrome/browser/sync/internal_api/read_node.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/sync/internal_api/base_node.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace sync_api {
diff --git a/chrome/browser/sync/internal_api/read_transaction.cc b/chrome/browser/sync/internal_api/read_transaction.cc
index e52c0b7..a3991ba 100644
--- a/chrome/browser/sync/internal_api/read_transaction.cc
+++ b/chrome/browser/sync/internal_api/read_transaction.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/sync/internal_api/read_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
namespace sync_api {
diff --git a/chrome/browser/sync/internal_api/sync_manager.cc b/chrome/browser/sync/internal_api/sync_manager.cc
index 466025e..d2265f0 100644
--- a/chrome/browser/sync/internal_api/sync_manager.cc
+++ b/chrome/browser/sync/internal_api/sync_manager.cc
@@ -16,13 +16,8 @@
#include "base/observer_list.h"
#include "base/string_number_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/all_status.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/engine/polling_constants.h"
-#include "chrome/browser/sync/engine/sync_scheduler.h"
-#include "chrome/browser/sync/engine/syncapi_internal.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
+#include "chrome/browser/sync/internal_api/all_status.h"
+#include "chrome/browser/sync/internal_api/syncapi_internal.h"
#include "chrome/browser/sync/internal_api/base_node.h"
#include "chrome/browser/sync/internal_api/change_reorder_buffer.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
@@ -33,26 +28,31 @@
#include "chrome/browser/sync/internal_api/user_share.h"
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_backend.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_event_handler.h"
-#include "chrome/browser/sync/js/js_mutation_event_observer.h"
-#include "chrome/browser/sync/js/js_reply_handler.h"
-#include "chrome/browser/sync/js/js_sync_manager_observer.h"
+#include "chrome/browser/sync/internal_api/js_mutation_event_observer.h"
+#include "chrome/browser/sync/internal_api/js_sync_manager_observer.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
-#include "chrome/browser/sync/syncable/directory_change_delegate.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
-#include "chrome/browser/sync/util/get_session_name.h"
-#include "chrome/browser/sync/util/time.h"
#include "net/base/network_change_notifier.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/engine/nigori_util.h"
+#include "sync/engine/polling_constants.h"
+#include "sync/engine/sync_scheduler.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_backend.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_event_handler.h"
+#include "sync/js/js_reply_handler.h"
#include "sync/protocol/encryption.pb.h"
+#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/directory_change_delegate.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/cryptographer.h"
+#include "sync/util/get_session_name.h"
+#include "sync/util/time.h"
using base::TimeDelta;
using browser_sync::AllStatus;
diff --git a/chrome/browser/sync/internal_api/sync_manager.h b/chrome/browser/sync/internal_api/sync_manager.h
index a09b346..ecf9fc1 100644
--- a/chrome/browser/sync/internal_api/sync_manager.h
+++ b/chrome/browser/sync/internal_api/sync_manager.h
@@ -13,15 +13,15 @@
#include "base/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/task_runner.h"
-#include "base/time.h"
#include "base/threading/thread_checker.h"
-#include "chrome/browser/sync/internal_api/includes/report_unrecoverable_error_function.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
+#include "base/time.h"
#include "chrome/browser/sync/internal_api/change_record.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/report_unrecoverable_error_function.h"
+#include "sync/util/unrecoverable_error_handler.h"
+#include "sync/util/weak_handle.h"
namespace browser_sync {
class Encryptor;
diff --git a/chrome/browser/sync/engine/syncapi_internal.cc b/chrome/browser/sync/internal_api/syncapi_internal.cc
index ab90c1c..57279f8 100644
--- a/chrome/browser/sync/engine/syncapi_internal.cc
+++ b/chrome/browser/sync/internal_api/syncapi_internal.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncapi_internal.h"
+#include "chrome/browser/sync/internal_api/syncapi_internal.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/sync/util/cryptographer.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/util/cryptographer.h"
using browser_sync::Cryptographer;
diff --git a/chrome/browser/sync/engine/syncapi_internal.h b/chrome/browser/sync/internal_api/syncapi_internal.h
index 4cbb5f3..ffd2d4e 100644
--- a/chrome/browser/sync/engine/syncapi_internal.h
+++ b/chrome/browser/sync/internal_api/syncapi_internal.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_INTERNAL_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_INTERNAL_H_
+#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_
+#define CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_
// The functions defined are shared among some of the classes that implement
// the internal sync_api. They are not to be used by clients of the API.
@@ -34,4 +34,4 @@ bool AreSpecificsEqual(const browser_sync::Cryptographer* cryptographer,
const sync_pb::EntitySpecifics& right);
}
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_INTERNAL_H_
+#endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_
diff --git a/chrome/browser/sync/internal_api/syncapi_mock.h b/chrome/browser/sync/internal_api/syncapi_mock.h
deleted file mode 100644
index dd56d7a..0000000
--- a/chrome/browser/sync/internal_api/syncapi_mock.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_MOCK_H_
-#define CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_MOCK_H_
-#pragma once
-
-#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_mock.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using sync_api::WriteTransaction;
-
-class MockWriteTransaction : public sync_api::WriteTransaction {
- public:
- MockWriteTransaction(const tracked_objects::Location& from_here,
- Directory* directory)
- : sync_api::WriteTransaction() {
- SetTransaction(new MockSyncableWriteTransaction(from_here, directory));
- }
-};
-
-#endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNCAPI_MOCK_H_
-
diff --git a/chrome/browser/sync/internal_api/syncapi_server_connection_manager.h b/chrome/browser/sync/internal_api/syncapi_server_connection_manager.h
index bfa6931..181b0b2 100644
--- a/chrome/browser/sync/internal_api/syncapi_server_connection_manager.h
+++ b/chrome/browser/sync/internal_api/syncapi_server_connection_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
+#include "sync/engine/net/server_connection_manager.h"
namespace sync_api {
diff --git a/chrome/browser/sync/internal_api/syncapi_unittest.cc b/chrome/browser/sync/internal_api/syncapi_unittest.cc
index 29a94f0..d59d8ef 100644
--- a/chrome/browser/sync/internal_api/syncapi_unittest.cc
+++ b/chrome/browser/sync/internal_api/syncapi_unittest.cc
@@ -23,43 +23,43 @@
#include "base/test/values_test_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/engine/polling_constants.h"
-#include "chrome/browser/sync/engine/syncapi_internal.h"
+#include "chrome/browser/sync/internal_api/syncapi_internal.h"
#include "chrome/browser/sync/internal_api/change_record.h"
#include "chrome/browser/sync/internal_api/http_post_provider_factory.h"
#include "chrome/browser/sync/internal_api/http_post_provider_interface.h"
-#include "chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h"
#include "chrome/browser/sync/internal_api/read_node.h"
#include "chrome/browser/sync/internal_api/read_transaction.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_backend.h"
-#include "chrome/browser/sync/js/js_event_handler.h"
-#include "chrome/browser/sync/js/js_reply_handler.h"
-#include "chrome/browser/sync/js/js_test_util.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type_test_util.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
#include "chrome/browser/sync/test/engine/test_user_share.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
-#include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
-#include "chrome/browser/sync/util/cryptographer.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
-#include "chrome/browser/sync/util/time.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/engine/nigori_util.h"
+#include "sync/engine/polling_constants.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_backend.h"
+#include "sync/js/js_event_handler.h"
+#include "sync/js/js_reply_handler.h"
+#include "sync/js/js_test_util.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/encryption.pb.h"
#include "sync/protocol/extension_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/protocol/preference_specifics.pb.h"
+#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type_test_util.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/test/fake_encryptor.h"
+#include "sync/test/fake_extensions_activity_monitor.h"
+#include "sync/util/cryptographer.h"
+#include "sync/util/extensions_activity_monitor.h"
+#include "sync/util/test_unrecoverable_error_handler.h"
+#include "sync/util/time.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/internal_api/user_share.cc b/chrome/browser/sync/internal_api/user_share.cc
index 102c379..4bdacc1 100644
--- a/chrome/browser/sync/internal_api/user_share.cc
+++ b/chrome/browser/sync/internal_api/user_share.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/sync/internal_api/user_share.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
namespace sync_api {
diff --git a/chrome/browser/sync/internal_api/write_node.cc b/chrome/browser/sync/internal_api/write_node.cc
index 8bfcc86..84d0f79 100644
--- a/chrome/browser/sync/internal_api/write_node.cc
+++ b/chrome/browser/sync/internal_api/write_node.cc
@@ -4,15 +4,12 @@
#include "chrome/browser/sync/internal_api/write_node.h"
-#include "base/json/json_writer.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/engine/syncapi_internal.h"
+#include "chrome/browser/sync/internal_api/syncapi_internal.h"
#include "chrome/browser/sync/internal_api/base_transaction.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/engine/nigori_util.h"
#include "sync/protocol/app_specifics.pb.h"
#include "sync/protocol/autofill_specifics.pb.h"
#include "sync/protocol/bookmark_specifics.pb.h"
@@ -21,6 +18,8 @@
#include "sync/protocol/session_specifics.pb.h"
#include "sync/protocol/theme_specifics.pb.h"
#include "sync/protocol/typed_url_specifics.pb.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/cryptographer.h"
using browser_sync::Cryptographer;
using std::string;
@@ -32,95 +31,6 @@ namespace sync_api {
static const char kDefaultNameForNewNodes[] = " ";
-bool WriteNode::UpdateEntryWithEncryption(
- browser_sync::Cryptographer* cryptographer,
- const sync_pb::EntitySpecifics& new_specifics,
- syncable::MutableEntry* entry) {
- syncable::ModelType type = syncable::GetModelTypeFromSpecifics(new_specifics);
- DCHECK_GE(type, syncable::FIRST_REAL_MODEL_TYPE);
- const sync_pb::EntitySpecifics& old_specifics = entry->Get(SPECIFICS);
- const syncable::ModelTypeSet encrypted_types =
- cryptographer->GetEncryptedTypes();
- // It's possible the nigori lost the set of encrypted types. If the current
- // specifics are already encrypted, we want to ensure we continue encrypting.
- bool was_encrypted = old_specifics.has_encrypted();
- sync_pb::EntitySpecifics generated_specifics;
- if (new_specifics.has_encrypted()) {
- NOTREACHED() << "New specifics already has an encrypted blob.";
- return false;
- }
- if ((!SpecificsNeedsEncryption(encrypted_types, new_specifics) &&
- !was_encrypted) ||
- !cryptographer->is_initialized()) {
- // No encryption required or we are unable to encrypt.
- generated_specifics.CopyFrom(new_specifics);
- } else {
- // Encrypt new_specifics into generated_specifics.
- if (VLOG_IS_ON(2)) {
- scoped_ptr<DictionaryValue> value(entry->ToValue());
- std::string info;
- base::JSONWriter::Write(value.get(), true, &info);
- DVLOG(2) << "Encrypting specifics of type "
- << syncable::ModelTypeToString(type)
- << " with content: "
- << info;
- }
- // Only copy over the old specifics if it is of the right type and already
- // encrypted. The first time we encrypt a node we start from scratch, hence
- // removing all the unencrypted data, but from then on we only want to
- // update the node if the data changes or the encryption key changes.
- if (syncable::GetModelTypeFromSpecifics(old_specifics) == type &&
- was_encrypted) {
- generated_specifics.CopyFrom(old_specifics);
- } else {
- syncable::AddDefaultFieldValue(type, &generated_specifics);
- }
- // Does not change anything if underlying encrypted blob was already up
- // to date and encrypted with the default key.
- if (!cryptographer->Encrypt(new_specifics,
- generated_specifics.mutable_encrypted())) {
- NOTREACHED() << "Could not encrypt data for node of type "
- << syncable::ModelTypeToString(type);
- return false;
- }
- }
-
- // It's possible this entry was encrypted but didn't properly overwrite the
- // non_unique_name (see crbug.com/96314).
- bool encrypted_without_overwriting_name = (was_encrypted &&
- entry->Get(syncable::NON_UNIQUE_NAME) != kEncryptedString);
-
- // If we're encrypted but the name wasn't overwritten properly we still want
- // to rewrite the entry, irrespective of whether the specifics match.
- if (!encrypted_without_overwriting_name &&
- old_specifics.SerializeAsString() ==
- generated_specifics.SerializeAsString()) {
- DVLOG(2) << "Specifics of type " << syncable::ModelTypeToString(type)
- << " already match, dropping change.";
- return true;
- }
-
- if (generated_specifics.has_encrypted()) {
- // Overwrite the possibly sensitive non-specifics data.
- entry->Put(syncable::NON_UNIQUE_NAME, kEncryptedString);
- // For bookmarks we actually put bogus data into the unencrypted specifics,
- // else the server will try to do it for us.
- if (type == syncable::BOOKMARKS) {
- sync_pb::BookmarkSpecifics* bookmark_specifics =
- generated_specifics.mutable_bookmark();
- if (!entry->Get(syncable::IS_DIR))
- bookmark_specifics->set_url(kEncryptedString);
- bookmark_specifics->set_title(kEncryptedString);
- }
- }
- entry->Put(syncable::SPECIFICS, generated_specifics);
- DVLOG(1) << "Overwriting specifics of type "
- << syncable::ModelTypeToString(type)
- << " and marking for syncing.";
- syncable::MarkForSyncing(entry);
- return true;
-}
-
void WriteNode::SetIsFolder(bool folder) {
if (entry_->Get(syncable::IS_DIR) == folder)
return; // Skip redundant changes.
diff --git a/chrome/browser/sync/internal_api/write_node.h b/chrome/browser/sync/internal_api/write_node.h
index 487e5be..ddca68c 100644
--- a/chrome/browser/sync/internal_api/write_node.h
+++ b/chrome/browser/sync/internal_api/write_node.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/sync/internal_api/base_node.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
class Cryptographer;
@@ -154,14 +154,6 @@ class WriteNode : public BaseNode {
// Should only be called if GetModelType() == SESSIONS.
void SetSessionSpecifics(const sync_pb::SessionSpecifics& specifics);
- // Stores |new_specifics| into |entry|, encrypting if necessary.
- // Returns false if an error encrypting occurred (does not modify |entry|).
- // Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS).
- static bool UpdateEntryWithEncryption(
- browser_sync::Cryptographer* cryptographer,
- const sync_pb::EntitySpecifics& new_specifics,
- syncable::MutableEntry* entry);
-
// Implementation of BaseNode's abstract virtual accessors.
virtual const syncable::Entry* GetEntry() const OVERRIDE;
diff --git a/chrome/browser/sync/internal_api/write_transaction.cc b/chrome/browser/sync/internal_api/write_transaction.cc
index f3c7f0a..6ce4cbb 100644
--- a/chrome/browser/sync/internal_api/write_transaction.cc
+++ b/chrome/browser/sync/internal_api/write_transaction.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
namespace sync_api {
diff --git a/chrome/browser/sync/js/DEPS b/chrome/browser/sync/js/DEPS
deleted file mode 100644
index 1067158..0000000
--- a/chrome/browser/sync/js/DEPS
+++ /dev/null
@@ -1,19 +0,0 @@
-include_rules = [
- "-chrome",
-
- "+chrome/browser/sync/js",
-
- "+chrome/browser/sync/internal_api",
- "+chrome/browser/sync/sessions/session_state.h",
- "+chrome/browser/sync/syncable/model_type.h",
- "+chrome/browser/sync/protocol/sync_protocol_error.h",
- "+chrome/browser/sync/syncable/transaction_observer.h",
- "+chrome/browser/sync/test",
- "+chrome/browser/sync/util",
-
- # TODO(akalin): this should be in base.
- "+chrome/browser/sync/weak_handle.h",
- "+chrome/browser/sync/shared_value.h",
-
-]
-
diff --git a/chrome/browser/sync/notifier/DEPS b/chrome/browser/sync/notifier/DEPS
index 7376cba..f856e1e 100644
--- a/chrome/browser/sync/notifier/DEPS
+++ b/chrome/browser/sync/notifier/DEPS
@@ -2,16 +2,17 @@ include_rules = [
"-chrome",
"+chrome/browser/sync/notifier",
- "+chrome/browser/sync/syncable/model_type.h",
- "+chrome/browser/sync/syncable/model_type_payload_map.h",
- "+chrome/browser/sync/syncable/model_type_test_util.h",
- "+chrome/browser/sync/protocol/service_constants.h",
- "+chrome/browser/sync/util",
"+chrome/common/chrome_switches.h",
"+google/cacheinvalidation",
"+jingle/notifier",
+ "+sync/syncable/model_type.h",
+ "+sync/syncable/model_type_payload_map.h",
+ "+sync/syncable/model_type_test_util.h",
+ "+sync/protocol/service_constants.h",
+ "+sync/util",
+
# unit tests depend on talk/base.
"+talk/base",
# sync_notifier depends on the xmpp part of libjingle.
diff --git a/chrome/browser/sync/notifier/chrome_invalidation_client.cc b/chrome/browser/sync/notifier/chrome_invalidation_client.cc
index ece8e97..b4b499b 100644
--- a/chrome/browser/sync/notifier/chrome_invalidation_client.cc
+++ b/chrome/browser/sync/notifier/chrome_invalidation_client.cc
@@ -13,11 +13,11 @@
#include "chrome/browser/sync/notifier/cache_invalidation_packet_handler.h"
#include "chrome/browser/sync/notifier/invalidation_util.h"
#include "chrome/browser/sync/notifier/registration_manager.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "google/cacheinvalidation/include/invalidation-client-factory.h"
#include "google/cacheinvalidation/include/invalidation-client.h"
#include "google/cacheinvalidation/include/types.h"
#include "google/cacheinvalidation/v2/types.pb.h"
+#include "sync/syncable/model_type.h"
namespace {
diff --git a/chrome/browser/sync/notifier/chrome_invalidation_client.h b/chrome/browser/sync/notifier/chrome_invalidation_client.h
index 74622fd..3d103b0 100644
--- a/chrome/browser/sync/notifier/chrome_invalidation_client.h
+++ b/chrome/browser/sync/notifier/chrome_invalidation_client.h
@@ -19,10 +19,10 @@
#include "chrome/browser/sync/notifier/chrome_system_resources.h"
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
#include "chrome/browser/sync/notifier/state_writer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "google/cacheinvalidation/include/invalidation-listener.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/util/weak_handle.h"
// TODO(akalin): Move invalidation::InvalidationListener into its own
// file and include that instead of invalidation-client.h (which
diff --git a/chrome/browser/sync/notifier/chrome_invalidation_client_unittest.cc b/chrome/browser/sync/notifier/chrome_invalidation_client_unittest.cc
index 403e3f8..09de60a 100644
--- a/chrome/browser/sync/notifier/chrome_invalidation_client_unittest.cc
+++ b/chrome/browser/sync/notifier/chrome_invalidation_client_unittest.cc
@@ -7,13 +7,13 @@
#include "base/message_loop.h"
#include "chrome/browser/sync/notifier/chrome_invalidation_client.h"
#include "chrome/browser/sync/notifier/state_writer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "google/cacheinvalidation/include/invalidation-client.h"
#include "google/cacheinvalidation/include/types.h"
#include "google/cacheinvalidation/v2/types.pb.h"
#include "jingle/notifier/base/fake_base_task.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/util/weak_handle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/notifier/invalidation_notifier.cc b/chrome/browser/sync/notifier/invalidation_notifier.cc
index be7acb9..ea2560d 100644
--- a/chrome/browser/sync/notifier/invalidation_notifier.cc
+++ b/chrome/browser/sync/notifier/invalidation_notifier.cc
@@ -7,13 +7,13 @@
#include "base/logging.h"
#include "base/message_loop_proxy.h"
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
#include "jingle/notifier/base/const_communicator.h"
#include "jingle/notifier/base/notifier_options_util.h"
#include "jingle/notifier/communicator/connection_options.h"
#include "net/base/host_port_pair.h"
#include "net/url_request/url_request_context.h"
+#include "sync/protocol/service_constants.h"
+#include "sync/syncable/model_type_payload_map.h"
#include "talk/xmpp/jid.h"
#include "talk/xmpp/xmppclientsettings.h"
diff --git a/chrome/browser/sync/notifier/invalidation_notifier.h b/chrome/browser/sync/notifier/invalidation_notifier.h
index ff6fe92..ee5e4b1 100644
--- a/chrome/browser/sync/notifier/invalidation_notifier.h
+++ b/chrome/browser/sync/notifier/invalidation_notifier.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -24,10 +24,10 @@
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
#include "chrome/browser/sync/notifier/state_writer.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "jingle/notifier/base/notifier_options.h"
#include "jingle/notifier/communicator/login.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/weak_handle.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc b/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc
index 227d455..a8b2be4 100644
--- a/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc
+++ b/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc
@@ -8,14 +8,14 @@
#include "base/message_loop.h"
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
#include "chrome/browser/sync/notifier/mock_sync_notifier_observer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "jingle/notifier/base/fake_base_task.h"
#include "jingle/notifier/base/notifier_options.h"
#include "net/base/cert_verifier.h"
#include "net/base/host_resolver.h"
#include "net/url_request/url_request_test_util.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/util/weak_handle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/notifier/invalidation_util.h b/chrome/browser/sync/notifier/invalidation_util.h
index f1cdca5..7a14586 100644
--- a/chrome/browser/sync/notifier/invalidation_util.h
+++ b/chrome/browser/sync/notifier/invalidation_util.h
@@ -10,8 +10,8 @@
#include <string>
-#include "chrome/browser/sync/syncable/model_type.h"
#include "google/cacheinvalidation/deps/callback.h"
+#include "sync/syncable/model_type.h"
namespace invalidation {
diff --git a/chrome/browser/sync/notifier/invalidation_version_tracker.h b/chrome/browser/sync/notifier/invalidation_version_tracker.h
index fe7d545..17d89f3 100644
--- a/chrome/browser/sync/notifier/invalidation_version_tracker.h
+++ b/chrome/browser/sync/notifier/invalidation_version_tracker.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -11,7 +11,7 @@
#include <map>
#include "base/basictypes.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier.h b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier.h
index 7fa736d..c260dc0 100644
--- a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier.h
+++ b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier.h
@@ -19,8 +19,8 @@
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "jingle/notifier/base/notifier_options.h"
+#include "sync/util/weak_handle.h"
namespace base {
class MessageLoopProxy;
diff --git a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
index 822a01c..b67adf3 100644
--- a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
+++ b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
@@ -10,11 +10,11 @@
#include "base/threading/thread.h"
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
#include "chrome/browser/sync/notifier/mock_sync_notifier_observer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "jingle/notifier/base/fake_base_task.h"
#include "net/url_request/url_request_test_util.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/util/weak_handle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/notifier/p2p_notifier.cc b/chrome/browser/sync/notifier/p2p_notifier.cc
index 1cc50ca..a8aecb5 100644
--- a/chrome/browser/sync/notifier/p2p_notifier.cc
+++ b/chrome/browser/sync/notifier/p2p_notifier.cc
@@ -6,14 +6,14 @@
#include <algorithm>
-#include "base/logging.h"
-#include "base/message_loop_proxy.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
+#include "base/logging.h"
+#include "base/message_loop_proxy.h"
#include "base/values.h"
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
+#include "sync/protocol/service_constants.h"
+#include "sync/syncable/model_type_payload_map.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/notifier/p2p_notifier.h b/chrome/browser/sync/notifier/p2p_notifier.h
index 6ff0053..b861c99 100644
--- a/chrome/browser/sync/notifier/p2p_notifier.h
+++ b/chrome/browser/sync/notifier/p2p_notifier.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -15,8 +15,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "jingle/notifier/listener/talk_mediator.h"
+#include "sync/syncable/model_type.h"
namespace base {
class MessageLoopProxy;
diff --git a/chrome/browser/sync/notifier/p2p_notifier_unittest.cc b/chrome/browser/sync/notifier/p2p_notifier_unittest.cc
index a7c8ad0..8045198 100644
--- a/chrome/browser/sync/notifier/p2p_notifier_unittest.cc
+++ b/chrome/browser/sync/notifier/p2p_notifier_unittest.cc
@@ -10,7 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "chrome/browser/sync/notifier/mock_sync_notifier_observer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/notifier/registration_manager.cc b/chrome/browser/sync/notifier/registration_manager.cc
index cd2fc86..90a15d4 100644
--- a/chrome/browser/sync/notifier/registration_manager.cc
+++ b/chrome/browser/sync/notifier/registration_manager.cc
@@ -10,9 +10,9 @@
#include "base/rand_util.h"
#include "chrome/browser/sync/notifier/invalidation_util.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "google/cacheinvalidation/include/invalidation-client.h"
#include "google/cacheinvalidation/include/types.h"
+#include "sync/syncable/model_type.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/notifier/registration_manager.h b/chrome/browser/sync/notifier/registration_manager.h
index 796d6c4c..49ebd47 100644
--- a/chrome/browser/sync/notifier/registration_manager.h
+++ b/chrome/browser/sync/notifier/registration_manager.h
@@ -13,9 +13,10 @@
#include "base/basictypes.h"
#include "base/threading/non_thread_safe.h"
+#include "base/threading/non_thread_safe.h"
#include "base/time.h"
#include "base/timer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
// For invalidation::InvalidationListener::RegistrationState.
#include "google/cacheinvalidation/include/invalidation-listener.h"
diff --git a/chrome/browser/sync/notifier/registration_manager_unittest.cc b/chrome/browser/sync/notifier/registration_manager_unittest.cc
index baf5cb4..7f7abd5 100644
--- a/chrome/browser/sync/notifier/registration_manager_unittest.cc
+++ b/chrome/browser/sync/notifier/registration_manager_unittest.cc
@@ -13,8 +13,8 @@
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "chrome/browser/sync/notifier/invalidation_util.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "google/cacheinvalidation/include/invalidation-client.h"
+#include "sync/syncable/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/notifier/sync_notifier.h b/chrome/browser/sync/notifier/sync_notifier.h
index a4f535e..8980146 100644
--- a/chrome/browser/sync/notifier/sync_notifier.h
+++ b/chrome/browser/sync/notifier/sync_notifier.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -11,7 +11,7 @@
#include <string>
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace sync_notifier {
class SyncNotifierObserver;
diff --git a/chrome/browser/sync/notifier/sync_notifier_factory.h b/chrome/browser/sync/notifier/sync_notifier_factory.h
index d763d1a..a99a707 100644
--- a/chrome/browser/sync/notifier/sync_notifier_factory.h
+++ b/chrome/browser/sync/notifier/sync_notifier_factory.h
@@ -9,8 +9,8 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "jingle/notifier/base/notifier_options.h"
+#include "sync/util/weak_handle.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc b/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc
index 516b389..a001c6b 100644
--- a/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc
+++ b/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc
@@ -14,11 +14,11 @@
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
#include "chrome/browser/sync/notifier/mock_sync_notifier_observer.h"
#include "chrome/browser/sync/notifier/sync_notifier.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
#include "jingle/notifier/base/notification_method.h"
#include "jingle/notifier/base/notifier_options.h"
#include "net/url_request/url_request_test_util.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/notifier/sync_notifier_observer.h b/chrome/browser/sync/notifier/sync_notifier_observer.h
index 103655c2..627595b 100644
--- a/chrome/browser/sync/notifier/sync_notifier_observer.h
+++ b/chrome/browser/sync/notifier/sync_notifier_observer.h
@@ -8,7 +8,7 @@
#include <string>
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
+#include "sync/syncable/model_type_payload_map.h"
namespace sync_notifier {
diff --git a/chrome/browser/sync/profile_sync_components_factory.h b/chrome/browser/sync/profile_sync_components_factory.h
index 042b05d..2d79ad7 100644
--- a/chrome/browser/sync/profile_sync_components_factory.h
+++ b/chrome/browser/sync/profile_sync_components_factory.h
@@ -11,7 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/glue/data_type_error_handler.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
+#include "sync/util/unrecoverable_error_handler.h"
class PasswordStore;
class ProfileSyncService;
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index dae8f40..e9f8ed0 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -23,8 +23,8 @@
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/about_flags.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/defaults.h"
+#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/signin/signin_manager_factory.h"
@@ -40,11 +40,8 @@
#include "chrome/browser/sync/glue/typed_url_data_type_controller.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_event_details.h"
#include "chrome/browser/sync/profile_sync_components_factory_impl.h"
#include "chrome/browser/sync/sync_global_error.h"
-#include "chrome/browser/sync/util/cryptographer.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
@@ -62,6 +59,9 @@
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
#include "net/base/cookie_monster.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_event_details.h"
+#include "sync/util/cryptographer.h"
#include "ui/base/l10n/l10n_util.h"
using browser_sync::ChangeProcessor;
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index c4a1ae4..6aa03b7 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -21,16 +21,12 @@
#include "base/timer.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/sync/backend_unrecoverable_error_handler.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/failed_datatypes_handler.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/glue/data_type_manager.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
#include "chrome/browser/sync/internal_api/sync_manager.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/sync_js_controller.h"
#include "chrome/browser/sync/sync_prefs.h"
#include "chrome/browser/sync/sync_setup_wizard.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
@@ -38,6 +34,10 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/js/sync_js_controller.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/unrecoverable_error_handler.h"
class Profile;
class ProfileSyncComponentsFactory;
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index d46093b..1c53525 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -27,7 +27,6 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/token_service_factory.h"
#include "chrome/browser/sync/abstract_profile_sync_service_test.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
#include "chrome/browser/sync/glue/autofill_data_type_controller.h"
#include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
@@ -40,9 +39,6 @@
#include "chrome/browser/sync/profile_sync_components_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/browser/webdata/autocomplete_syncable_service.h"
#include "chrome/browser/webdata/autofill_change.h"
@@ -54,7 +50,11 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/public/browser/notification_source.h"
#include "content/test/test_browser_thread.h"
+#include "sync/engine/model_changing_syncer_command.h"
#include "sync/protocol/autofill_specifics.pb.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
using base::Time;
diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
index 7186678..76aebc3 100644
--- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
@@ -19,8 +19,8 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
+#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/sync/abstract_profile_sync_service_test.h"
#include "chrome/browser/sync/api/sync_error.h"
#include "chrome/browser/sync/glue/bookmark_change_processor.h"
@@ -32,11 +32,11 @@
#include "chrome/browser/sync/internal_api/read_transaction.h"
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/browser/sync/test/engine/test_user_share.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/testing_profile.h"
#include "content/test/test_browser_thread.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index a835fa3..1f6042d 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -23,8 +23,8 @@
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
-#include "chrome/browser/sync/sessions/session_state.h"
#include "chrome/browser/sync/sync_ui_util.h"
+#include "sync/sessions/session_state.h"
using browser_sync::sessions::SyncSessionSnapshot;
diff --git a/chrome/browser/sync/profile_sync_service_harness.h b/chrome/browser/sync/profile_sync_service_harness.h
index 8aba89e..00267e9 100644
--- a/chrome/browser/sync/profile_sync_service_harness.h
+++ b/chrome/browser/sync/profile_sync_service_harness.h
@@ -15,7 +15,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
#include "chrome/browser/sync/retry_verifier.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
class Profile;
diff --git a/chrome/browser/sync/profile_sync_service_mock.h b/chrome/browser/sync/profile_sync_service_mock.h
index d03528b..dd019a4 100644
--- a/chrome/browser/sync/profile_sync_service_mock.h
+++ b/chrome/browser/sync/profile_sync_service_mock.h
@@ -13,10 +13,10 @@
#include "chrome/browser/sync/glue/change_processor.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/test/base/testing_profile.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/syncable/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
class ProfileSyncServiceMock : public ProfileSyncService {
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index 0cc5152..0acf315 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -31,8 +31,6 @@
#include "chrome/browser/sync/profile_sync_components_factory_mock.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/net/gaia/gaia_constants.h"
@@ -42,6 +40,8 @@
#include "content/test/notification_observer_mock.h"
#include "content/test/test_browser_thread.h"
#include "sync/protocol/password_specifics.pb.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "webkit/forms/password_form.h"
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
index 52cc152..e72818d 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -29,13 +29,13 @@
#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
#include "sync/protocol/preference_specifics.pb.h"
+#include "sync/syncable/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc
index 0ca2da8..17742baf 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -25,15 +25,12 @@
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/internal_api/change_record.h"
#include "chrome/browser/sync/internal_api/read_node.h"
-#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/read_transaction.h"
+#include "chrome/browser/sync/internal_api/write_node.h"
#include "chrome/browser/sync/internal_api/write_transaction.h"
#include "chrome/browser/sync/profile_sync_components_factory_mock.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/net/gaia/gaia_constants.h"
@@ -48,6 +45,9 @@
#include "googleurl/src/gurl.h"
#include "sync/protocol/session_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ui_base_types.h"
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 f04e813..9bde4e6 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -34,8 +34,6 @@
#include "chrome/browser/sync/profile_sync_components_factory_mock.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/net/gaia/gaia_constants.h"
@@ -44,6 +42,8 @@
#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "sync/protocol/typed_url_specifics.pb.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
using base::Time;
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index 0d96ae7..57b30b8 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -12,9 +12,6 @@
#include "chrome/browser/signin/token_service_factory.h"
#include "chrome/browser/sync/glue/bookmark_data_type_controller.h"
#include "chrome/browser/sync/glue/data_type_controller.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_test_util.h"
#include "chrome/browser/sync/profile_sync_components_factory_mock.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/common/chrome_version_info.h"
@@ -23,6 +20,9 @@
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
#include "content/test/test_browser_thread.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/user_agent.h"
diff --git a/chrome/browser/sync/protocol/DEPS b/chrome/browser/sync/protocol/DEPS
deleted file mode 100644
index fdf9fa3..0000000
--- a/chrome/browser/sync/protocol/DEPS
+++ /dev/null
@@ -1,8 +0,0 @@
-include_rules = [
- "-chrome",
- "+chrome/browser/sync/protocol",
- "+chrome/browser/sync/syncable/model_type.h",
-
- "-chrome/browser/sync/internal_api",
-]
-
diff --git a/chrome/browser/sync/retry_verifier.cc b/chrome/browser/sync/retry_verifier.cc
index 51ed003..0fa3843 100644
--- a/chrome/browser/sync/retry_verifier.cc
+++ b/chrome/browser/sync/retry_verifier.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,8 +7,8 @@
#include <algorithm>
#include "base/logging.h"
-#include "chrome/browser/sync/engine/polling_constants.h"
-#include "chrome/browser/sync/sessions/session_state.h"
+#include "sync/engine/polling_constants.h"
+#include "sync/sessions/session_state.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/sessions/DEPS b/chrome/browser/sync/sessions/DEPS
deleted file mode 100644
index 2a4b7d8..0000000
--- a/chrome/browser/sync/sessions/DEPS
+++ /dev/null
@@ -1,14 +0,0 @@
-include_rules = [
- "-chrome",
- "+chrome/test/base",
-
- "+chrome/browser/sync/engine",
- "+chrome/browser/sync/protocol",
- "+chrome/browser/sync/sessions",
- "+chrome/browser/sync/syncable",
- "+chrome/browser/sync/test",
- "+chrome/browser/sync/util",
-
- "-chrome/browser/sync/internal_api",
-]
-
diff --git a/chrome/browser/sync/sync_prefs.h b/chrome/browser/sync/sync_prefs.h
index fd32118..b6bdfc1 100644
--- a/chrome/browser/sync/sync_prefs.h
+++ b/chrome/browser/sync/sync_prefs.h
@@ -14,8 +14,8 @@
#include "base/time.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/sync/notifier/invalidation_version_tracker.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "content/public/browser/notification_observer.h"
+#include "sync/syncable/model_type.h"
class PrefService;
diff --git a/chrome/browser/sync/sync_prefs_unittest.cc b/chrome/browser/sync/sync_prefs_unittest.cc
index 916c515..a52432e 100644
--- a/chrome/browser/sync/sync_prefs_unittest.cc
+++ b/chrome/browser/sync/sync_prefs_unittest.cc
@@ -6,8 +6,8 @@
#include "base/message_loop.h"
#include "base/time.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/test/base/testing_pref_service.h"
+#include "sync/syncable/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index 40356bc..ea6ad19 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/sync_setup_flow_handler.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/user_selectable_sync_type.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_switches.h"
@@ -27,6 +26,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
+#include "sync/syncable/model_type.h"
namespace {
diff --git a/chrome/browser/sync/sync_setup_flow.h b/chrome/browser/sync/sync_setup_flow.h
index c38db7e..af6bc78 100644
--- a/chrome/browser/sync/sync_setup_flow.h
+++ b/chrome/browser/sync/sync_setup_flow.h
@@ -13,8 +13,8 @@
#include "base/time.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/sync_setup_wizard.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/ui/webui/html_dialog_ui.h"
+#include "sync/syncable/model_type.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/native_widget_types.h"
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 6728529..b569a7d 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -13,10 +13,6 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
-#include "chrome/browser/sync/protocol/proto_enum_conversions.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/sessions/session_state.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
@@ -30,6 +26,10 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "sync/protocol/proto_enum_conversions.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/sessions/session_state.h"
+#include "sync/syncable/model_type.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/sync/syncable/DEPS b/chrome/browser/sync/syncable/DEPS
deleted file mode 100644
index bca9e7e..0000000
--- a/chrome/browser/sync/syncable/DEPS
+++ /dev/null
@@ -1,19 +0,0 @@
-include_rules = [
- "-chrome",
- "+chrome/test/base",
-
- "+chrome/browser/sync/protocol",
- "+chrome/browser/sync/sessions",
- "+chrome/browser/sync/syncable",
- "+chrome/browser/sync/test",
- "+chrome/browser/sync/util",
-
- # this file is weird.
- "+chrome/browser/sync/engine/syncproto.h",
-
- # maybe this file should live in syncable?
- "+chrome/browser/sync/engine/model_safe_worker.h",
-
- "-chrome/browser/sync/internal_api",
- "+chrome/browser/sync/internal_api/includes",
-]
diff --git a/chrome/browser/sync/test/engine/test_user_share.h b/chrome/browser/sync/test/engine/test_user_share.h
index eccfd7f..dc16c2b 100644
--- a/chrome/browser/sync/test/engine/test_user_share.h
+++ b/chrome/browser/sync/test/engine/test_user_share.h
@@ -33,7 +33,7 @@
#include "base/basictypes.h"
#include "chrome/browser/sync/internal_api/user_share.h"
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/test/integration/DEPS b/chrome/browser/sync/test/integration/DEPS
new file mode 100644
index 0000000..aba01a7
--- /dev/null
+++ b/chrome/browser/sync/test/integration/DEPS
@@ -0,0 +1,4 @@
+include_rules = [
+ # TODO(akalin): Figure out finer-grained dependencies.
+ "+sync",
+] \ No newline at end of file
diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc
index 68b78f38..100dea7 100644
--- a/chrome/browser/sync/test/integration/enable_disable_test.cc
+++ b/chrome/browser/sync/test/integration/enable_disable_test.cc
@@ -4,10 +4,10 @@
#include "chrome/browser/sync/test/integration/sync_test.h"
-#include "chrome/browser/sync/profile_sync_service_harness.h"
#include "chrome/browser/sync/internal_api/read_node.h"
#include "chrome/browser/sync/internal_api/read_transaction.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "chrome/browser/sync/profile_sync_service_harness.h"
+#include "sync/syncable/model_type.h"
// This file contains tests that exercise enabling and disabling data
// types.
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 0cc896a..58b3d76 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
@@ -5,10 +5,10 @@
#include "base/basictypes.h"
#include "base/stringprintf.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
#include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/typed_urls_helper.h"
+#include "sync/sessions/sync_session_context.h"
using typed_urls_helper::AddUrlToHistory;
using typed_urls_helper::AssertAllProfilesHaveSameURLsAsVerifier;
diff --git a/chrome/browser/sync/test/integration/sessions_helper.h b/chrome/browser/sync/test/integration/sessions_helper.h
index 263f61d..94a3108 100644
--- a/chrome/browser/sync/test/integration/sessions_helper.h
+++ b/chrome/browser/sync/test/integration/sessions_helper.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/sync/glue/synced_session.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
+#include "sync/engine/nigori_util.h"
class GURL;
diff --git a/chrome/browser/sync/test/integration/sync_errors_test.cc b/chrome/browser/sync/test/integration/sync_errors_test.cc
index 4f4fe58..3c9dc55 100644
--- a/chrome/browser/sync/test/integration/sync_errors_test.cc
+++ b/chrome/browser/sync/test/integration/sync_errors_test.cc
@@ -6,12 +6,12 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/passwords_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/pref_names.h"
+#include "sync/protocol/sync_protocol_error.h"
using bookmarks_helper::AddFolder;
using bookmarks_helper::SetTitle;
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h
index 5edc75c..01b41f2 100644
--- a/chrome/browser/sync/test/integration/sync_test.h
+++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -17,10 +17,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/process_util.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "net/base/mock_host_resolver.h"
#include "net/test/test_server.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/syncable/model_type.h"
class CommandLine;
class Profile;
diff --git a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
index dca9344..a3bd675 100644
--- a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
@@ -5,9 +5,9 @@
#include "base/rand_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
-#include "chrome/browser/sync/sessions/session_state.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
+#include "sync/sessions/session_state.h"
using bookmarks_helper::AddFolder;
using bookmarks_helper::AddURL;
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 de4d449..5721e27 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
@@ -3,11 +3,11 @@
// found in the LICENSE file.
#include "base/utf_string_conversions.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/passwords_helper.h"
+#include "chrome/browser/sync/test/integration/sync_test.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/sessions/session_state.h"
using passwords_helper::AddLogin;
using passwords_helper::AllProfilesContainSamePasswordForms;
diff --git a/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc b/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc
index ea2cf43..fcb5e24 100644
--- a/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc
@@ -5,9 +5,9 @@
#include "base/memory/scoped_vector.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/sessions_helper.h"
+#include "chrome/browser/sync/test/integration/sync_test.h"
+#include "sync/sessions/session_state.h"
using sessions_helper::CheckInitialState;
using sessions_helper::DeleteForeignSession;
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 02143c7..732c5fc 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -9,13 +9,13 @@
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/internal_api/user_share.h"
-#include "chrome/browser/sync/js/js_reply_handler.h"
#include "chrome/browser/sync/profile_sync_components_factory.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/syncable/syncable.h"
#include "chrome/browser/sync/test/test_http_bridge_factory.h"
#include "chrome/common/chrome_notification_types.h"
+#include "sync/js/js_reply_handler.h"
#include "sync/protocol/encryption.pb.h"
+#include "sync/sessions/session_state.h"
+#include "sync/syncable/syncable.h"
using browser_sync::ModelSafeRoutingInfo;
using browser_sync::sessions::ErrorCounters;
diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h
index abebbce..6c09a3b 100644
--- a/chrome/browser/sync/test_profile_sync_service.h
+++ b/chrome/browser/sync/test_profile_sync_service.h
@@ -13,8 +13,8 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/sync/glue/data_type_manager_impl.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/test/base/profile_mock.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
class Profile;
diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc
index c42352eb..5d825b5 100644
--- a/chrome/browser/sync/tools/sync_listen_notifications.cc
+++ b/chrome/browser/sync/tools/sync_listen_notifications.cc
@@ -19,12 +19,12 @@
#include "chrome/browser/sync/notifier/sync_notifier.h"
#include "chrome/browser/sync/notifier/sync_notifier_factory.h"
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
#include "jingle/notifier/base/notification_method.h"
#include "jingle/notifier/base/notifier_options.h"
#include "net/base/host_port_pair.h"
#include "net/url_request/url_request_test_util.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
// This is a simple utility that initializes a sync notifier and
// listens to any received notifications.
diff --git a/chrome/browser/sync/util/DEPS b/chrome/browser/sync/util/DEPS
deleted file mode 100644
index c45c30e..0000000
--- a/chrome/browser/sync/util/DEPS
+++ /dev/null
@@ -1,12 +0,0 @@
-include_rules = [
- "-chrome",
-
- "+chrome/browser/sync/protocol",
- "+chrome/browser/sync/sessions",
- "+chrome/browser/sync/syncable",
- "+chrome/browser/sync/test",
- "+chrome/browser/sync/util",
-
- # this file is weird.
- "+chrome/browser/sync/engine/syncproto.h",
-]
diff --git a/chrome/browser/sync/util/user_settings.h b/chrome/browser/sync/util/user_settings.h
deleted file mode 100644
index 546c8b0..0000000
--- a/chrome/browser/sync/util/user_settings.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_SYNC_UTIL_USER_SETTINGS_H_
-#define CHROME_BROWSER_SYNC_UTIL_USER_SETTINGS_H_
-#pragma once
-
-#include <map>
-#include <string>
-
-#include "base/synchronization/lock.h"
-#include "build/build_config.h"
-
-extern "C" struct sqlite3;
-
-class FilePath;
-
-namespace browser_sync {
-
-void ExecOrDie(sqlite3* dbhandle, const char *query);
-std::string APEncode(const std::string& in);
-std::string APDecode(const std::string& in);
-
-class URLFactory;
-
-class UserSettings {
- public:
- // db_path is used for the main user settings.
- // passwords_file contains hashes of passwords.
- UserSettings();
- ~UserSettings();
- // Returns false (failure) if the db is a newer version.
- bool Init(const FilePath& settings_path);
- void StoreHashedPassword(const std::string& email,
- const std::string& password);
- bool VerifyAgainstStoredHash(const std::string& email,
- const std::string& password);
-
- // Set the username.
- void SwitchUser(const std::string& email);
-
- // Saves the email address and the named service token for the given user.
- // Call this multiple times with the same email parameter to save multiple
- // service tokens.
- void SetAuthTokenForService(const std::string& email,
- const std::string& service_name,
- const std::string& long_lived_service_token);
- // Erases all saved service tokens.
- void ClearAllServiceTokens();
-
- // Returns the user name whose credentials have been persisted.
- bool GetLastUser(std::string* username);
-
- // Returns the user name whose credentials have been persisted as well as a
- // service token for the named service
- bool GetLastUserAndServiceToken(const std::string& service_name,
- std::string* username,
- std::string* service_token);
-
- void RemoveAllGuestSettings();
-
- void StoreEmailForSignin(const std::string& signin,
- const std::string& primary_email);
-
- // Multiple email addresses can map to the same Google Account. This method
- // returns the primary Google Account email associated with |signin|, which
- // is used as both input and output.
- bool GetEmailForSignin(std::string* signin);
-
- std::string email() const;
-
- // Get a unique ID suitable for use as the client ID. This ID has the
- // lifetime of the user settings database. You may use this ID if your
- // operating environment does not provide its own unique client ID.
- std::string GetClientId();
-
- protected:
- struct ScopedDBHandle {
- explicit ScopedDBHandle(UserSettings* settings);
- inline sqlite3* get() const { return *handle_; }
- base::AutoLock mutex_lock_;
- sqlite3** const handle_;
- };
-
- friend struct ScopedDBHandle;
- friend class URLFactory;
-
- void MigrateOldVersionsAsNeeded(sqlite3* const handle, int current_version);
-
- private:
- std::string email_;
- mutable base::Lock mutex_; // protects email_.
-
- // We keep a single dbhandle.
- sqlite3* dbhandle_;
- base::Lock dbhandle_mutex_;
-
- // TODO(sync): Use in-memory cache for service auth tokens on posix.
- // Have someone competent in Windows switch it over to not use Sqlite in the
- // future.
-#ifndef OS_WIN
- typedef std::map<std::string, std::string> ServiceTokenMap;
- ServiceTokenMap service_tokens_;
-#endif // OS_WIN
-
- DISALLOW_COPY_AND_ASSIGN(UserSettings);
-};
-
-} // namespace browser_sync
-
-#endif // CHROME_BROWSER_SYNC_UTIL_USER_SETTINGS_H_
diff --git a/chrome/browser/ui/webui/DEPS b/chrome/browser/ui/webui/DEPS
index 06f325e..7a768fd 100644
--- a/chrome/browser/ui/webui/DEPS
+++ b/chrome/browser/ui/webui/DEPS
@@ -2,6 +2,9 @@ include_rules = [
# Generated files
"+js2webui/chrome/test/data",
+ "+sync/js",
+ "+sync/util/weak_handle.h",
+
# Other libraries.
"+third_party/angle", # For ANGLE version.
]
diff --git a/chrome/browser/ui/webui/sync_internals_ui.cc b/chrome/browser/ui/webui/sync_internals_ui.cc
index 8fafa3f..5a7a995 100644
--- a/chrome/browser/ui/webui/sync_internals_ui.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui.cc
@@ -12,13 +12,9 @@
#include "base/tracked_objects.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_controller.h"
-#include "chrome/browser/sync/js/js_event_details.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/sync_ui_util.h"
-#include "chrome/browser/sync/util/weak_handle.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
@@ -27,6 +23,10 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "grit/sync_internals_resources.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_controller.h"
+#include "sync/js/js_event_details.h"
+#include "sync/util/weak_handle.h"
#include "ui/base/resource/resource_bundle.h"
using browser_sync::JsArgList;
diff --git a/chrome/browser/ui/webui/sync_internals_ui.h b/chrome/browser/ui/webui/sync_internals_ui.h
index c44e761..549396f 100644
--- a/chrome/browser/ui/webui/sync_internals_ui.h
+++ b/chrome/browser/ui/webui/sync_internals_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,9 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/sync/js/js_event_handler.h"
-#include "chrome/browser/sync/js/js_reply_handler.h"
#include "content/public/browser/web_ui_controller.h"
+#include "sync/js/js_event_handler.h"
+#include "sync/js/js_reply_handler.h"
namespace browser_sync {
class JsController;
diff --git a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
index bd9bde8..00d3096 100644
--- a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
+++ b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,15 +10,15 @@
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_test_util.h"
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/profile_mock.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/test/test_browser_thread.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 6b2d043..4e6bd5d 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -20,7 +20,6 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
#include "chrome/browser/sync/sync_setup_flow.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
@@ -34,6 +33,7 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "sync/protocol/service_constants.h"
#include "ui/base/l10n/l10n_util.h"
using l10n_util::GetStringFUTF16;
diff --git a/chrome/browser/webdata/DEPS b/chrome/browser/webdata/DEPS
new file mode 100644
index 0000000..37615bc
--- /dev/null
+++ b/chrome/browser/webdata/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ "+sync/syncable/syncable.h",
+]
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
index 6f34719..147e2ef 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc
@@ -7,12 +7,10 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/sync/internal_api/read_node_mock.h"
-#include "chrome/browser/sync/internal_api/syncapi_mock.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_mock.h"
#include "chrome/browser/webdata/autofill_change.h"
#include "chrome/browser/webdata/autofill_profile_syncable_service.h"
#include "content/test/test_browser_thread.h"
+#include "sync/syncable/syncable.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index d860a13..28a8298 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -261,12 +261,10 @@
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'sources': [
- 'browser/sync/engine/syncapi_internal.cc',
- 'browser/sync/engine/syncapi_internal.h',
- 'browser/sync/internal_api/includes/syncer_error.cc',
- 'browser/sync/internal_api/includes/syncer_error.h',
- 'browser/sync/internal_api/includes/report_unrecoverable_error_function.h',
- 'browser/sync/internal_api/includes/unrecoverable_error_handler.h',
+ 'browser/sync/internal_api/all_status.cc',
+ 'browser/sync/internal_api/all_status.h',
+ 'browser/sync/internal_api/syncapi_internal.cc',
+ 'browser/sync/internal_api/syncapi_internal.h',
'browser/sync/internal_api/base_node.cc',
'browser/sync/internal_api/base_node.h',
'browser/sync/internal_api/base_transaction.cc',
@@ -294,6 +292,10 @@
'browser/sync/internal_api/write_node.h',
'browser/sync/internal_api/write_transaction.cc',
'browser/sync/internal_api/write_transaction.h',
+ 'browser/sync/internal_api/js_mutation_event_observer.cc',
+ 'browser/sync/internal_api/js_mutation_event_observer.h',
+ 'browser/sync/internal_api/js_sync_manager_observer.cc',
+ 'browser/sync/internal_api/js_sync_manager_observer.h',
],
'include_dirs': [
'..',
@@ -307,12 +309,12 @@
'../net/net.gyp:net',
'../third_party/sqlite/sqlite.gyp:sqlite',
'../sync/protocol/sync_proto.gyp:sync_proto',
- 'sync',
+ '../sync/sync.gyp:sync',
'sync_notifier',
],
'export_dependent_settings': [
'../sync/protocol/sync_proto.gyp:sync_proto',
- 'sync',
+ '../sync/sync.gyp:sync',
],
# This target exports a hard dependency because syncapi.h includes
# generated proto header files from sync_proto.
@@ -341,216 +343,18 @@
'dependencies': [
'../base/base.gyp:base',
'../sync/protocol/sync_proto.gyp:sync_proto',
- 'sync',
+ '../sync/sync.gyp:sync',
],
'export_dependent_settings': [
'../base/base.gyp:base',
'../sync/protocol/sync_proto.gyp:sync_proto',
- 'sync',
+ '../sync/sync.gyp:sync',
],
# Even though this target depends on sync_proto, it doesn't
# need to export a hard dependency since we explicitly avoid
# including the generated proto header files from this target's
# header files.
},
- {
- 'target_name': 'sync',
- 'type': 'static_library',
- 'variables': { 'enable_wexit_time_destructors': 1, },
- 'sources': [
- 'browser/sync/engine/all_status.cc',
- 'browser/sync/engine/all_status.h',
- 'browser/sync/engine/apply_updates_command.cc',
- 'browser/sync/engine/apply_updates_command.h',
- 'browser/sync/engine/build_commit_command.cc',
- 'browser/sync/engine/build_commit_command.h',
- 'browser/sync/engine/cleanup_disabled_types_command.cc',
- 'browser/sync/engine/cleanup_disabled_types_command.h',
- 'browser/sync/engine/clear_data_command.cc',
- 'browser/sync/engine/clear_data_command.h',
- 'browser/sync/engine/conflict_resolver.cc',
- 'browser/sync/engine/conflict_resolver.h',
- 'browser/sync/engine/download_updates_command.cc',
- 'browser/sync/engine/download_updates_command.h',
- 'browser/sync/engine/get_commit_ids_command.cc',
- 'browser/sync/engine/get_commit_ids_command.h',
- 'browser/sync/engine/model_changing_syncer_command.cc',
- 'browser/sync/engine/model_changing_syncer_command.h',
- 'browser/sync/engine/model_safe_worker.cc',
- 'browser/sync/engine/model_safe_worker.h',
- 'browser/sync/engine/passive_model_worker.cc',
- 'browser/sync/engine/passive_model_worker.h',
- 'browser/sync/engine/net/server_connection_manager.cc',
- 'browser/sync/engine/net/server_connection_manager.h',
- 'browser/sync/engine/net/url_translator.cc',
- 'browser/sync/engine/net/url_translator.h',
- 'browser/sync/engine/nigori_util.cc',
- 'browser/sync/engine/nigori_util.h',
- 'browser/sync/engine/nudge_source.cc',
- 'browser/sync/engine/nudge_source.h',
- 'browser/sync/engine/polling_constants.cc',
- 'browser/sync/engine/polling_constants.h',
- 'browser/sync/engine/post_commit_message_command.cc',
- 'browser/sync/engine/post_commit_message_command.h',
- 'browser/sync/engine/process_commit_response_command.cc',
- 'browser/sync/engine/process_commit_response_command.h',
- 'browser/sync/engine/process_updates_command.cc',
- 'browser/sync/engine/process_updates_command.h',
- 'browser/sync/engine/resolve_conflicts_command.cc',
- 'browser/sync/engine/resolve_conflicts_command.h',
- 'browser/sync/engine/store_timestamps_command.cc',
- 'browser/sync/engine/store_timestamps_command.h',
- 'browser/sync/engine/syncer.cc',
- 'browser/sync/engine/syncer.h',
- 'browser/sync/engine/syncer_command.cc',
- 'browser/sync/engine/syncer_command.h',
- 'browser/sync/engine/syncer_proto_util.cc',
- 'browser/sync/engine/syncer_proto_util.h',
- 'browser/sync/engine/sync_scheduler.cc',
- 'browser/sync/engine/sync_scheduler.h',
- 'browser/sync/engine/syncer_types.cc',
- 'browser/sync/engine/syncer_types.h',
- 'browser/sync/engine/syncer_util.cc',
- 'browser/sync/engine/syncer_util.h',
- 'browser/sync/engine/syncproto.h',
- 'browser/sync/engine/update_applicator.cc',
- 'browser/sync/engine/update_applicator.h',
- 'browser/sync/engine/verify_updates_command.cc',
- 'browser/sync/engine/verify_updates_command.h',
- 'browser/sync/js/js_arg_list.cc',
- 'browser/sync/js/js_arg_list.h',
- 'browser/sync/js/js_backend.h',
- 'browser/sync/js/js_controller.h',
- 'browser/sync/js/js_event_details.cc',
- 'browser/sync/js/js_event_details.h',
- 'browser/sync/js/js_event_handler.h',
- 'browser/sync/js/js_reply_handler.h',
- 'browser/sync/js/js_mutation_event_observer.cc',
- 'browser/sync/js/js_mutation_event_observer.h',
- 'browser/sync/js/js_sync_manager_observer.cc',
- 'browser/sync/js/js_sync_manager_observer.h',
- 'browser/sync/protocol/proto_enum_conversions.cc',
- 'browser/sync/protocol/proto_enum_conversions.h',
- 'browser/sync/protocol/proto_value_conversions.cc',
- 'browser/sync/protocol/proto_value_conversions.h',
- 'browser/sync/protocol/service_constants.h',
- 'browser/sync/protocol/sync_protocol_error.cc',
- 'browser/sync/protocol/sync_protocol_error.h',
- 'browser/sync/sessions/debug_info_getter.h',
- 'browser/sync/sessions/ordered_commit_set.cc',
- 'browser/sync/sessions/ordered_commit_set.h',
- 'browser/sync/sessions/session_state.cc',
- 'browser/sync/sessions/session_state.h',
- 'browser/sync/sessions/status_controller.cc',
- 'browser/sync/sessions/status_controller.h',
- 'browser/sync/sessions/sync_session.cc',
- 'browser/sync/sessions/sync_session.h',
- 'browser/sync/sessions/sync_session_context.cc',
- 'browser/sync/sessions/sync_session_context.h',
- 'browser/sync/sync_js_controller.cc',
- 'browser/sync/sync_js_controller.h',
- 'browser/sync/syncable/blob.h',
- 'browser/sync/syncable/directory_backing_store.cc',
- 'browser/sync/syncable/directory_backing_store.h',
- 'browser/sync/syncable/directory_change_delegate.h',
- 'browser/sync/syncable/dir_open_result.h',
- 'browser/sync/syncable/in_memory_directory_backing_store.cc',
- 'browser/sync/syncable/in_memory_directory_backing_store.h',
- 'browser/sync/syncable/model_type.cc',
- 'browser/sync/syncable/model_type.h',
- 'browser/sync/syncable/model_type_payload_map.cc',
- 'browser/sync/syncable/model_type_payload_map.h',
- 'browser/sync/syncable/on_disk_directory_backing_store.cc',
- 'browser/sync/syncable/on_disk_directory_backing_store.h',
- 'browser/sync/syncable/syncable.cc',
- 'browser/sync/syncable/syncable_changes_version.h',
- 'browser/sync/syncable/syncable_columns.h',
- 'browser/sync/syncable/syncable_enum_conversions.cc',
- 'browser/sync/syncable/syncable_enum_conversions.h',
- 'browser/sync/syncable/syncable.h',
- 'browser/sync/syncable/syncable_id.cc',
- 'browser/sync/syncable/syncable_id.h',
- 'browser/sync/syncable/syncable-inl.h',
- 'browser/sync/syncable/transaction_observer.h',
- 'browser/sync/util/cryptographer.cc',
- 'browser/sync/util/cryptographer.h',
- 'browser/sync/util/data_type_histogram.h',
- 'browser/sync/util/encryptor.h',
- 'browser/sync/util/enum_set.h',
- 'browser/sync/util/extensions_activity_monitor.cc',
- 'browser/sync/util/extensions_activity_monitor.h',
- 'browser/sync/util/get_session_name.cc',
- 'browser/sync/util/get_session_name.h',
- 'browser/sync/util/get_session_name_mac.mm',
- 'browser/sync/util/get_session_name_mac.h',
- 'browser/sync/util/get_session_name_win.cc',
- 'browser/sync/util/get_session_name_win.h',
- 'browser/sync/util/immutable.h',
- 'browser/sync/util/logging.cc',
- 'browser/sync/util/logging.h',
- 'browser/sync/util/nigori.cc',
- 'browser/sync/util/nigori.h',
- 'browser/sync/util/time.cc',
- 'browser/sync/util/time.h',
- 'browser/sync/util/unrecoverable_error_info.h',
- 'browser/sync/util/unrecoverable_error_info.cc',
- 'browser/sync/util/weak_handle.cc',
- 'browser/sync/util/weak_handle.h',
- ],
- 'include_dirs': [
- '..',
- ],
- 'defines' : [
- 'SYNC_ENGINE_VERSION_STRING="Unknown"',
- '_CRT_SECURE_NO_WARNINGS',
- '_USE_32BIT_TIME_T',
- ],
- 'dependencies': [
- '../base/base.gyp:base',
- '../crypto/crypto.gyp:crypto',
- '../net/net.gyp:net',
- '../sql/sql.gyp:sql',
- '../sync/protocol/sync_proto.gyp:sync_proto',
- ],
- 'export_dependent_settings': [
- '../base/base.gyp:base',
- '../crypto/crypto.gyp:crypto',
- '../sync/protocol/sync_proto.gyp:sync_proto',
- ],
- # This target exports a hard dependency because its header files include
- # protobuf header files from sync_proto.
- 'hard_dependency': 1,
- 'conditions': [
- ['OS=="win"', {
- 'sources' : [
- 'browser/sync/util/data_encryption.cc',
- 'browser/sync/util/data_encryption.h',
- ],
- }],
- ['toolkit_uses_gtk == 1', {
- 'dependencies': [
- '../build/linux/system.gyp:gtk',
- ],
- 'link_settings': {
- 'libraries': [
- '-lXss',
- ],
- },
- }],
- ['OS=="linux" and chromeos==1', {
- 'include_dirs': [
- '<(grit_out_dir)',
- ],
- }],
- ['OS=="mac"', {
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
- ],
- },
- }],
- ],
- },
# A library for sending and receiving server-issued notifications.
{
'target_name': 'sync_notifier',
@@ -583,7 +387,7 @@
'..',
],
'dependencies': [
- 'sync',
+ '../sync/sync.gyp:sync',
'../jingle/jingle.gyp:notifier',
'../net/net.gyp:net',
'../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 66e8b78..0836f96 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -369,61 +369,22 @@
],
},
{
- 'target_name': 'test_support_sync',
- 'type': 'static_library',
- 'dependencies': [
- '../base/base.gyp:base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- 'sync',
- ],
- 'export_dependent_settings': [
- '../base/base.gyp:base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- 'sync',
- ],
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'browser/sync/js/js_test_util.cc',
- 'browser/sync/js/js_test_util.h',
- 'browser/sync/syncable/model_type_test_util.cc',
- 'browser/sync/syncable/model_type_test_util.h',
- 'browser/sync/syncable/syncable_mock.cc',
- 'browser/sync/syncable/syncable_mock.h',
- 'browser/sync/test/fake_encryptor.cc',
- 'browser/sync/test/fake_encryptor.h',
- 'browser/sync/test/fake_extensions_activity_monitor.cc',
- 'browser/sync/test/fake_extensions_activity_monitor.h',
- 'browser/sync/test/null_directory_change_delegate.cc',
- 'browser/sync/test/null_directory_change_delegate.h',
- 'browser/sync/test/null_transaction_observer.cc',
- 'browser/sync/test/null_transaction_observer.h',
- 'browser/sync/test/engine/test_directory_setter_upper.cc',
- 'browser/sync/test/engine/test_directory_setter_upper.h',
- ],
- },
- {
'target_name': 'test_support_syncapi',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
'syncapi_core',
- 'test_support_sync',
+ '../sync/sync.gyp:test_support_sync',
],
'export_dependent_settings': [
'../base/base.gyp:base',
'syncapi_core',
- 'test_support_sync',
+ '../sync/sync.gyp:test_support_sync',
],
'include_dirs': [
'..',
],
'sources': [
- 'browser/sync/internal_api/includes/test_unrecoverable_error_handler.cc',
- 'browser/sync/internal_api/includes/test_unrecoverable_error_handler.h',
'browser/sync/test/engine/test_user_share.cc',
'browser/sync/test/engine/test_user_share.h',
],
@@ -1230,7 +1191,7 @@
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'test_support_common',
- 'test_support_sync',
+ '../sync/sync.gyp:test_support_sync',
'test_support_syncapi',
'test_support_syncapi_service',
'test_support_sync_notifier',
@@ -1797,7 +1758,6 @@
'browser/sync/test_profile_sync_service.h',
'browser/sync/test/test_http_bridge_factory.cc',
'browser/sync/test/test_http_bridge_factory.h',
- 'browser/sync/util/nigori_unittest.cc',
'browser/tab_contents/render_view_context_menu_unittest.cc',
'browser/tab_contents/thumbnail_generator_unittest.cc',
'browser/tabs/pinned_tab_codec_unittest.cc',
@@ -3670,37 +3630,15 @@
'target_name': 'sync_unit_tests',
'type': 'executable',
'sources': [
- '<(protoc_out_dir)//sync/protocol/test.pb.cc',
'../base/test/run_all_unittests.cc',
- 'app/breakpad_mac_stubs.mm',
'browser/sync/api/sync_change_unittest.cc',
'browser/sync/api/sync_error_unittest.cc',
- 'browser/sync/engine/apply_updates_command_unittest.cc',
- 'browser/sync/engine/build_commit_command_unittest.cc',
- 'browser/sync/engine/clear_data_command_unittest.cc',
- 'browser/sync/engine/cleanup_disabled_types_command_unittest.cc',
- 'browser/sync/engine/download_updates_command_unittest.cc',
- 'browser/sync/engine/model_changing_syncer_command_unittest.cc',
- 'browser/sync/engine/model_safe_worker_unittest.cc',
- 'browser/sync/engine/nigori_util_unittest.cc',
- 'browser/sync/engine/process_commit_response_command_unittest.cc',
- 'browser/sync/engine/process_updates_command_unittest.cc',
- 'browser/sync/engine/resolve_conflicts_command_unittest.cc',
- 'browser/sync/engine/syncer_proto_util_unittest.cc',
- 'browser/sync/engine/sync_scheduler_unittest.cc',
- 'browser/sync/engine/sync_scheduler_whitebox_unittest.cc',
- 'browser/sync/engine/syncer_unittest.cc',
- 'browser/sync/engine/syncproto_unittest.cc',
- 'browser/sync/engine/verify_updates_command_unittest.cc',
'browser/sync/internal_api/change_record_unittest.cc',
'browser/sync/internal_api/debug_info_event_listener_unittest.cc',
- 'browser/sync/internal_api/syncapi_mock.h',
'browser/sync/internal_api/syncapi_server_connection_manager_unittest.cc',
'browser/sync/internal_api/syncapi_unittest.cc',
- 'browser/sync/js/js_arg_list_unittest.cc',
- 'browser/sync/js/js_event_details_unittest.cc',
- 'browser/sync/js/js_mutation_event_observer_unittest.cc',
- 'browser/sync/js/js_sync_manager_observer_unittest.cc',
+ 'browser/sync/internal_api/js_mutation_event_observer_unittest.cc',
+ 'browser/sync/internal_api/js_sync_manager_observer_unittest.cc',
'browser/sync/notifier/cache_invalidation_packet_handler_unittest.cc',
'browser/sync/notifier/chrome_invalidation_client_unittest.cc',
'browser/sync/notifier/chrome_system_resources_unittest.cc',
@@ -3709,56 +3647,12 @@
'browser/sync/notifier/p2p_notifier_unittest.cc',
'browser/sync/notifier/registration_manager_unittest.cc',
'browser/sync/notifier/sync_notifier_factory_unittest.cc',
- 'browser/sync/protocol/proto_enum_conversions_unittest.cc',
- 'browser/sync/protocol/proto_value_conversions_unittest.cc',
- 'browser/sync/sessions/ordered_commit_set_unittest.cc',
- 'browser/sync/sessions/session_state_unittest.cc',
- 'browser/sync/sessions/status_controller_unittest.cc',
- 'browser/sync/sessions/sync_session_context_unittest.cc',
- 'browser/sync/sessions/sync_session_unittest.cc',
- 'browser/sync/sessions/test_util.cc',
- 'browser/sync/sessions/test_util.h',
- 'browser/sync/sync_js_controller_unittest.cc',
- 'browser/sync/syncable/directory_backing_store_unittest.cc',
- 'browser/sync/syncable/model_type_payload_map_unittest.cc',
- 'browser/sync/syncable/model_type_unittest.cc',
- 'browser/sync/syncable/syncable_enum_conversions_unittest.cc',
- 'browser/sync/syncable/syncable_id_unittest.cc',
- 'browser/sync/syncable/syncable_unittest.cc',
- 'browser/sync/test/engine/fake_model_safe_worker_registrar.cc',
- 'browser/sync/test/engine/fake_model_safe_worker_registrar.h',
- 'browser/sync/test/engine/fake_model_worker.cc',
- 'browser/sync/test/engine/fake_model_worker.h',
- 'browser/sync/test/engine/mock_connection_manager.cc',
- 'browser/sync/test/engine/mock_connection_manager.h',
- 'browser/sync/test/engine/syncer_command_test.cc',
- 'browser/sync/test/engine/syncer_command_test.h',
- 'browser/sync/test/engine/test_id_factory.h',
- 'browser/sync/test/engine/test_syncable_utils.cc',
- 'browser/sync/test/engine/test_syncable_utils.h',
- 'browser/sync/test/sessions/test_scoped_session_event_listener.h',
- 'browser/sync/test/test_directory_backing_store.cc',
- 'browser/sync/test/test_directory_backing_store.h',
- 'browser/sync/util/cryptographer_unittest.cc',
- 'browser/sync/util/data_encryption_unittest.cc',
- 'browser/sync/util/data_type_histogram_unittest.cc',
- 'browser/sync/util/enum_set_unittest.cc',
- 'browser/sync/util/get_session_name_unittest.cc',
- 'browser/sync/util/immutable_unittest.cc',
- 'browser/sync/util/protobuf_unittest.cc',
- 'browser/sync/util/weak_handle_unittest.cc',
],
'include_dirs': [
'..',
- '<(protoc_out_dir)',
- ],
- 'defines' : [
- 'SYNC_ENGINE_VERSION_STRING="Unknown"',
- '_CRT_SECURE_NO_WARNINGS',
- '_USE_32BIT_TIME_T',
],
'dependencies': [
- '../sync/protocol/sync_proto.gyp:sync_proto',
+ '../sync/sync.gyp:sync_tests',
'../base/base.gyp:test_support_base',
'../jingle/jingle.gyp:notifier_test_util',
'../net/net.gyp:net',
@@ -3767,54 +3661,18 @@
'../testing/gtest.gyp:gtest',
'syncapi_core',
'sync_notifier',
- 'test_support_sync',
'test_support_syncapi',
'test_support_syncapi_service',
'test_support_sync_notifier',
],
+
+ # TODO(akalin): This is needed because histogram.cc uses
+ # leak_annotations.h, which pulls this in. Make 'base'
+ # propagate this dependency.
'conditions': [
- ['OS=="win"', {
- 'conditions': [
- ['win_use_allocator_shim==1', {
- 'dependencies': [
- '<(allocator_target)',
- ],
- }],
- ],
- 'link_settings': {
- 'libraries': [
- '-lcrypt32.lib',
- '-lws2_32.lib',
- '-lsecur32.lib',
- ],
- },
- 'configurations': {
- 'Debug_Base': {
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
- },
- },
- },
- },
- }, { # else: OS != "win"
- 'sources!': [
- 'browser/sync/util/data_encryption_unittest.cc',
- ],
- }],
- ['toolkit_uses_gtk == 1', {
- 'dependencies': [
- '../build/linux/system.gyp:gtk',
- ],
- }],
- ['toolkit_uses_gtk == 1 or chromeos==1 or (OS=="linux" and use_aura==1)', {
+ ['OS=="linux" and linux_use_tcmalloc==1', {
'dependencies': [
- '../build/linux/system.gyp:ssl',
- ],
- }],
- ['OS=="linux" and chromeos==1', {
- 'include_dirs': [
- '<(grit_out_dir)',
+ '../base/allocator/allocator.gyp:allocator',
],
}],
],
diff --git a/sync/DEPS b/sync/DEPS
new file mode 100644
index 0000000..e3938ed
--- /dev/null
+++ b/sync/DEPS
@@ -0,0 +1,13 @@
+include_rules = [
+ # Repeat these from the top-level DEPS file so one can just run
+ #
+ # checkdeps.py sync
+ #
+ # to test.
+ "+base",
+ "+build",
+ "+testing",
+
+ # Force subdirectories to explicitly define DEPS.
+ "-sync",
+]
diff --git a/sync/engine/DEPS b/sync/engine/DEPS
new file mode 100644
index 0000000..a22ed7d
--- /dev/null
+++ b/sync/engine/DEPS
@@ -0,0 +1,8 @@
+include_rules = [
+ "+googleurl",
+ "+sync/protocol",
+ "+sync/sessions",
+ "+sync/syncable",
+ "+sync/test",
+ "+sync/util",
+]
diff --git a/chrome/browser/sync/engine/apply_updates_command.cc b/sync/engine/apply_updates_command.cc
index 89bf3fb..ce4f14f 100644
--- a/chrome/browser/sync/engine/apply_updates_command.cc
+++ b/sync/engine/apply_updates_command.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/apply_updates_command.h"
+#include "sync/engine/apply_updates_command.h"
#include "base/location.h"
-#include "chrome/browser/sync/engine/update_applicator.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/update_applicator.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/apply_updates_command.h b/sync/engine/apply_updates_command.h
index fc7a42c..4282dc1 100644
--- a/chrome/browser/sync/engine/apply_updates_command.h
+++ b/sync/engine/apply_updates_command.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_
+#ifndef SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_
+#define SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
+#include "sync/engine/model_changing_syncer_command.h"
namespace browser_sync {
@@ -29,4 +29,4 @@ class ApplyUpdatesCommand : public ModelChangingSyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_
+#endif // SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_
diff --git a/chrome/browser/sync/engine/apply_updates_command_unittest.cc b/sync/engine/apply_updates_command_unittest.cc
index 1672d6e..6ff6dae 100644
--- a/chrome/browser/sync/engine/apply_updates_command_unittest.cc
+++ b/sync/engine/apply_updates_command_unittest.cc
@@ -7,20 +7,20 @@
#include "base/format_macros.h"
#include "base/location.h"
#include "base/stringprintf.h"
-#include "chrome/browser/sync/engine/apply_updates_command.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/engine/apply_updates_command.h"
+#include "sync/engine/nigori_util.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_util.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/syncer_command_test.h"
+#include "sync/test/engine/test_id_factory.h"
+#include "sync/test/fake_encryptor.h"
+#include "sync/util/cryptographer.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/build_commit_command.cc b/sync/engine/build_commit_command.cc
index c2a40f1..86d1d8b 100644
--- a/chrome/browser/sync/engine/build_commit_command.cc
+++ b/sync/engine/build_commit_command.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/build_commit_command.h"
+#include "sync/engine/build_commit_command.h"
#include <limits>
#include <set>
@@ -10,12 +10,12 @@
#include <vector>
#include "base/string_util.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_changes_version.h"
-#include "chrome/browser/sync/util/time.h"
+#include "sync/engine/syncer_proto_util.h"
#include "sync/protocol/bookmark_specifics.pb.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_changes_version.h"
+#include "sync/util/time.h"
using std::set;
using std::string;
diff --git a/chrome/browser/sync/engine/build_commit_command.h b/sync/engine/build_commit_command.h
index fca2535..d18c94b 100644
--- a/chrome/browser/sync/engine/build_commit_command.h
+++ b/sync/engine/build_commit_command.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
+#ifndef SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
+#define SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/syncer_command.h"
+#include "sync/engine/syncproto.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
@@ -48,4 +48,4 @@ class BuildCommitCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
+#endif // SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
diff --git a/chrome/browser/sync/engine/build_commit_command_unittest.cc b/sync/engine/build_commit_command_unittest.cc
index d924517..f0a5bea 100644
--- a/chrome/browser/sync/engine/build_commit_command_unittest.cc
+++ b/sync/engine/build_commit_command_unittest.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/build_commit_command.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/engine/build_commit_command.h"
+#include "sync/test/engine/syncer_command_test.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/cleanup_disabled_types_command.cc b/sync/engine/cleanup_disabled_types_command.cc
index fcac8a9..35e61cd 100644
--- a/chrome/browser/sync/engine/cleanup_disabled_types_command.cc
+++ b/sync/engine/cleanup_disabled_types_command.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/cleanup_disabled_types_command.h"
+#include "sync/engine/cleanup_disabled_types_command.h"
#include <algorithm>
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/sessions/sync_session_context.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/cleanup_disabled_types_command.h b/sync/engine/cleanup_disabled_types_command.h
index 70dece2..c855814 100644
--- a/chrome/browser/sync/engine/cleanup_disabled_types_command.h
+++ b/sync/engine/cleanup_disabled_types_command.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
+#ifndef SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
+#define SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
+#include "sync/engine/syncer_command.h"
namespace browser_sync {
@@ -42,5 +42,5 @@ class CleanupDisabledTypesCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
+#endif // SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
diff --git a/chrome/browser/sync/engine/cleanup_disabled_types_command_unittest.cc b/sync/engine/cleanup_disabled_types_command_unittest.cc
index 4e02c33..daa1365 100644
--- a/chrome/browser/sync/engine/cleanup_disabled_types_command_unittest.cc
+++ b/sync/engine/cleanup_disabled_types_command_unittest.cc
@@ -1,14 +1,14 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
-#include "chrome/browser/sync/engine/cleanup_disabled_types_command.h"
+#include "sync/engine/cleanup_disabled_types_command.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type_test_util.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type_test_util.h"
+#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/sync/engine/clear_data_command.cc b/sync/engine/clear_data_command.cc
index e6f21cc..e7d7343 100644
--- a/chrome/browser/sync/engine/clear_data_command.cc
+++ b/sync/engine/clear_data_command.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/clear_data_command.h"
+#include "sync/engine/clear_data_command.h"
#include <string>
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncproto.h"
+#include "sync/sessions/sync_session.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/clear_data_command.h b/sync/engine/clear_data_command.h
index f01a78c..5302871 100644
--- a/chrome/browser/sync/engine/clear_data_command.h
+++ b/sync/engine/clear_data_command.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_CLEAR_DATA_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_CLEAR_DATA_COMMAND_H_
+#ifndef SYNC_ENGINE_CLEAR_DATA_COMMAND_H_
+#define SYNC_ENGINE_CLEAR_DATA_COMMAND_H_
#pragma once
#include "base/basictypes.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/engine/syncer_command.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
@@ -28,4 +28,4 @@ class ClearDataCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_CLEAR_DATA_COMMAND_H_
+#endif // SYNC_ENGINE_CLEAR_DATA_COMMAND_H_
diff --git a/chrome/browser/sync/engine/clear_data_command_unittest.cc b/sync/engine/clear_data_command_unittest.cc
index 08f842c..b94d08a 100644
--- a/chrome/browser/sync/engine/clear_data_command_unittest.cc
+++ b/sync/engine/clear_data_command_unittest.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/clear_data_command.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
-#include "chrome/browser/sync/test/sessions/test_scoped_session_event_listener.h"
+#include "sync/engine/clear_data_command.h"
#include "sync/protocol/autofill_specifics.pb.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/preference_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/test/engine/syncer_command_test.h"
+#include "sync/test/sessions/test_scoped_session_event_listener.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/conflict_resolver.cc b/sync/engine/conflict_resolver.cc
index b91e8d1..548613f 100644
--- a/chrome/browser/sync/engine/conflict_resolver.cc
+++ b/sync/engine/conflict_resolver.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/conflict_resolver.h"
+#include "sync/engine/conflict_resolver.h"
#include <algorithm>
#include <list>
@@ -11,13 +11,13 @@
#include "base/location.h"
#include "base/metrics/histogram.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/sessions/status_controller.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_util.h"
#include "sync/protocol/nigori_specifics.pb.h"
+#include "sync/protocol/service_constants.h"
+#include "sync/sessions/status_controller.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/cryptographer.h"
using std::list;
using std::map;
diff --git a/chrome/browser/sync/engine/conflict_resolver.h b/sync/engine/conflict_resolver.h
index f365255..d2d89d0 100644
--- a/chrome/browser/sync/engine/conflict_resolver.h
+++ b/sync/engine/conflict_resolver.h
@@ -5,8 +5,8 @@
// A class that watches the syncer and attempts to resolve any conflicts that
// occur.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_
-#define CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_
+#ifndef SYNC_ENGINE_CONFLICT_RESOLVER_H_
+#define SYNC_ENGINE_CONFLICT_RESOLVER_H_
#pragma once
#include <map>
@@ -15,7 +15,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
+#include "sync/engine/syncer_types.h"
namespace syncable {
class BaseTransaction;
@@ -86,4 +86,4 @@ class ConflictResolver {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_CONFLICT_RESOLVER_H_
+#endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_
diff --git a/chrome/browser/sync/engine/download_updates_command.cc b/sync/engine/download_updates_command.cc
index 2e02e96..385649c 100644
--- a/chrome/browser/sync/engine/download_updates_command.cc
+++ b/sync/engine/download_updates_command.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/download_updates_command.h"
+#include "sync/engine/download_updates_command.h"
#include <string>
#include "base/command_line.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncproto.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/syncable/syncable.h"
using sync_pb::DebugInfo;
diff --git a/chrome/browser/sync/engine/download_updates_command.h b/sync/engine/download_updates_command.h
index b15a04e..9e71610 100644
--- a/chrome/browser/sync/engine/download_updates_command.h
+++ b/sync/engine/download_updates_command.h
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_
+#ifndef SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_
+#define SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/engine/syncer_command.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/model_type.h"
namespace sync_pb {
class EntitySpecifics;
@@ -61,5 +61,5 @@ class DownloadUpdatesCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_
+#endif // SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_
diff --git a/chrome/browser/sync/engine/download_updates_command_unittest.cc b/sync/engine/download_updates_command_unittest.cc
index 9c81f98..9a6c280 100644
--- a/chrome/browser/sync/engine/download_updates_command_unittest.cc
+++ b/sync/engine/download_updates_command_unittest.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/download_updates_command.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/engine/download_updates_command.h"
#include "sync/protocol/autofill_specifics.pb.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/preference_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/syncer_command_test.h"
using ::testing::_;
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/get_commit_ids_command.cc b/sync/engine/get_commit_ids_command.cc
index 0bdaee0..55d7e23 100644
--- a/chrome/browser/sync/engine/get_commit_ids_command.cc
+++ b/sync/engine/get_commit_ids_command.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/get_commit_ids_command.h"
+#include "sync/engine/get_commit_ids_command.h"
#include <set>
#include <utility>
#include <vector>
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/engine/nigori_util.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/cryptographer.h"
using std::set;
using std::vector;
diff --git a/chrome/browser/sync/engine/get_commit_ids_command.h b/sync/engine/get_commit_ids_command.h
index 09654ad..0a277f9 100644
--- a/chrome/browser/sync/engine/get_commit_ids_command.h
+++ b/sync/engine/get_commit_ids_command.h
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
+#ifndef SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
+#define SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
#pragma once
#include <utility>
#include <vector>
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/sessions/ordered_commit_set.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
+#include "sync/engine/syncer_command.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/sessions/ordered_commit_set.h"
+#include "sync/sessions/sync_session.h"
using std::pair;
using std::vector;
@@ -123,4 +123,4 @@ class GetCommitIdsCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
+#endif // SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.cc b/sync/engine/model_changing_syncer_command.cc
index cd99da9..9409746 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.cc
+++ b/sync/engine/model_changing_syncer_command.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
+#include "sync/engine/model_changing_syncer_command.h"
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "chrome/browser/sync/sessions/status_controller.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
+#include "sync/sessions/status_controller.h"
+#include "sync/sessions/sync_session.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.h b/sync/engine/model_changing_syncer_command.h
index c11b6a3..d09e4b7 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.h
+++ b/sync/engine/model_changing_syncer_command.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_
+#ifndef SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_
+#define SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/engine/syncer_command.h"
namespace browser_sync {
namespace sessions {
@@ -82,4 +82,4 @@ class ModelChangingSyncerCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_
+#endif // SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command_unittest.cc b/sync/engine/model_changing_syncer_command_unittest.cc
index 1e9d1d13..615ee51 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command_unittest.cc
+++ b/sync/engine/model_changing_syncer_command_unittest.cc
@@ -5,11 +5,11 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/engine/model_changing_syncer_command.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/model_safe_worker.cc b/sync/engine/model_safe_worker.cc
index 3c5bcbf..ab1f750 100644
--- a/chrome/browser/sync/engine/model_safe_worker.cc
+++ b/sync/engine/model_safe_worker.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/model_safe_worker.h"
+#include "sync/engine/model_safe_worker.h"
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
diff --git a/chrome/browser/sync/engine/model_safe_worker.h b/sync/engine/model_safe_worker.h
index 8ed3448..ced63d6 100644
--- a/chrome/browser/sync/engine/model_safe_worker.h
+++ b/sync/engine/model_safe_worker.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_MODEL_SAFE_WORKER_H_
-#define CHROME_BROWSER_SYNC_ENGINE_MODEL_SAFE_WORKER_H_
+#ifndef SYNC_ENGINE_MODEL_SAFE_WORKER_H_
+#define SYNC_ENGINE_MODEL_SAFE_WORKER_H_
#pragma once
#include <map>
@@ -12,8 +12,8 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/sync/internal_api/includes/syncer_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/syncer_error.h"
namespace base {
class DictionaryValue;
@@ -109,4 +109,4 @@ class ModelSafeWorkerRegistrar {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_MODEL_SAFE_WORKER_H_
+#endif // SYNC_ENGINE_MODEL_SAFE_WORKER_H_
diff --git a/chrome/browser/sync/engine/model_safe_worker_unittest.cc b/sync/engine/model_safe_worker_unittest.cc
index 0bd5965..741c724 100644
--- a/chrome/browser/sync/engine/model_safe_worker_unittest.cc
+++ b/sync/engine/model_safe_worker_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/model_safe_worker.h"
+#include "sync/engine/model_safe_worker.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
diff --git a/sync/engine/net/DEPS b/sync/engine/net/DEPS
new file mode 100644
index 0000000..8fa9d48
--- /dev/null
+++ b/sync/engine/net/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ "+net",
+]
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.cc b/sync/engine/net/server_connection_manager.cc
index 2d53147..94d01f2 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.cc
+++ b/sync/engine/net/server_connection_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
+#include "sync/engine/net/server_connection_manager.h"
#include <errno.h>
@@ -12,11 +12,11 @@
#include "base/command_line.h"
#include "build/build_config.h"
-#include "chrome/browser/sync/engine/net/url_translator.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncproto.h"
#include "googleurl/src/gurl.h"
#include "net/http/http_status_code.h"
+#include "sync/engine/net/url_translator.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncproto.h"
#include "sync/protocol/sync.pb.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.h b/sync/engine/net/server_connection_manager.h
index 5936ce2..6347223 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.h
+++ b/sync/engine/net/server_connection_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
-#define CHROME_BROWSER_SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
+#ifndef SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
+#define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
#pragma once
#include <iosfwd>
@@ -13,10 +13,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/string_util.h"
+#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread_checker.h"
-#include "base/synchronization/lock.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "sync/syncable/syncable_id.h"
namespace syncable {
class Directory;
@@ -390,4 +390,4 @@ std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
+#endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_
diff --git a/chrome/browser/sync/engine/net/url_translator.cc b/sync/engine/net/url_translator.cc
index 6b65bc9..90b7794 100644
--- a/chrome/browser/sync/engine/net/url_translator.cc
+++ b/sync/engine/net/url_translator.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Contains the definition of a few helper functions used for generating sync
// URLs.
-#include "chrome/browser/sync/engine/net/url_translator.h"
+#include "sync/engine/net/url_translator.h"
#include "base/basictypes.h"
#include "base/port.h"
diff --git a/chrome/browser/sync/engine/net/url_translator.h b/sync/engine/net/url_translator.h
index c460c08..65b7346 100644
--- a/chrome/browser/sync/engine/net/url_translator.h
+++ b/sync/engine/net/url_translator.h
@@ -1,12 +1,12 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Contains the declaration of a few helper functions used for generating sync
// URLs.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_NET_URL_TRANSLATOR_H_
-#define CHROME_BROWSER_SYNC_ENGINE_NET_URL_TRANSLATOR_H_
+#ifndef SYNC_ENGINE_NET_URL_TRANSLATOR_H_
+#define SYNC_ENGINE_NET_URL_TRANSLATOR_H_
#pragma once
#include <string>
@@ -25,4 +25,4 @@ std::string MakeSyncQueryString(const std::string& client_id);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_NET_URL_TRANSLATOR_H_
+#endif // SYNC_ENGINE_NET_URL_TRANSLATOR_H_
diff --git a/chrome/browser/sync/engine/nigori_util.cc b/sync/engine/nigori_util.cc
index b9791ab..1b6d42a 100644
--- a/chrome/browser/sync/engine/nigori_util.cc
+++ b/sync/engine/nigori_util.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/nigori_util.h"
+#include "sync/engine/nigori_util.h"
#include <queue>
#include <string>
#include <vector>
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/internal_api/write_node.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "base/json/json_writer.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/cryptographer.h"
namespace syncable {
@@ -36,9 +36,7 @@ bool ProcessUnsyncedChangesForEncryption(
specifics)) {
continue;
}
- if (!sync_api::WriteNode::UpdateEntryWithEncryption(cryptographer,
- specifics,
- &entry)) {
+ if (!UpdateEntryWithEncryption(cryptographer, specifics, &entry)) {
NOTREACHED();
return false;
}
@@ -154,4 +152,93 @@ bool VerifyDataTypeEncryptionForTest(
return true;
}
+bool UpdateEntryWithEncryption(
+ browser_sync::Cryptographer* cryptographer,
+ const sync_pb::EntitySpecifics& new_specifics,
+ syncable::MutableEntry* entry) {
+ syncable::ModelType type = syncable::GetModelTypeFromSpecifics(new_specifics);
+ DCHECK_GE(type, syncable::FIRST_REAL_MODEL_TYPE);
+ const sync_pb::EntitySpecifics& old_specifics = entry->Get(SPECIFICS);
+ const syncable::ModelTypeSet encrypted_types =
+ cryptographer->GetEncryptedTypes();
+ // It's possible the nigori lost the set of encrypted types. If the current
+ // specifics are already encrypted, we want to ensure we continue encrypting.
+ bool was_encrypted = old_specifics.has_encrypted();
+ sync_pb::EntitySpecifics generated_specifics;
+ if (new_specifics.has_encrypted()) {
+ NOTREACHED() << "New specifics already has an encrypted blob.";
+ return false;
+ }
+ if ((!SpecificsNeedsEncryption(encrypted_types, new_specifics) &&
+ !was_encrypted) ||
+ !cryptographer->is_initialized()) {
+ // No encryption required or we are unable to encrypt.
+ generated_specifics.CopyFrom(new_specifics);
+ } else {
+ // Encrypt new_specifics into generated_specifics.
+ if (VLOG_IS_ON(2)) {
+ scoped_ptr<DictionaryValue> value(entry->ToValue());
+ std::string info;
+ base::JSONWriter::Write(value.get(), true, &info);
+ DVLOG(2) << "Encrypting specifics of type "
+ << syncable::ModelTypeToString(type)
+ << " with content: "
+ << info;
+ }
+ // Only copy over the old specifics if it is of the right type and already
+ // encrypted. The first time we encrypt a node we start from scratch, hence
+ // removing all the unencrypted data, but from then on we only want to
+ // update the node if the data changes or the encryption key changes.
+ if (syncable::GetModelTypeFromSpecifics(old_specifics) == type &&
+ was_encrypted) {
+ generated_specifics.CopyFrom(old_specifics);
+ } else {
+ syncable::AddDefaultFieldValue(type, &generated_specifics);
+ }
+ // Does not change anything if underlying encrypted blob was already up
+ // to date and encrypted with the default key.
+ if (!cryptographer->Encrypt(new_specifics,
+ generated_specifics.mutable_encrypted())) {
+ NOTREACHED() << "Could not encrypt data for node of type "
+ << syncable::ModelTypeToString(type);
+ return false;
+ }
+ }
+
+ // It's possible this entry was encrypted but didn't properly overwrite the
+ // non_unique_name (see crbug.com/96314).
+ bool encrypted_without_overwriting_name = (was_encrypted &&
+ entry->Get(syncable::NON_UNIQUE_NAME) != kEncryptedString);
+
+ // If we're encrypted but the name wasn't overwritten properly we still want
+ // to rewrite the entry, irrespective of whether the specifics match.
+ if (!encrypted_without_overwriting_name &&
+ old_specifics.SerializeAsString() ==
+ generated_specifics.SerializeAsString()) {
+ DVLOG(2) << "Specifics of type " << syncable::ModelTypeToString(type)
+ << " already match, dropping change.";
+ return true;
+ }
+
+ if (generated_specifics.has_encrypted()) {
+ // Overwrite the possibly sensitive non-specifics data.
+ entry->Put(syncable::NON_UNIQUE_NAME, kEncryptedString);
+ // For bookmarks we actually put bogus data into the unencrypted specifics,
+ // else the server will try to do it for us.
+ if (type == syncable::BOOKMARKS) {
+ sync_pb::BookmarkSpecifics* bookmark_specifics =
+ generated_specifics.mutable_bookmark();
+ if (!entry->Get(syncable::IS_DIR))
+ bookmark_specifics->set_url(kEncryptedString);
+ bookmark_specifics->set_title(kEncryptedString);
+ }
+ }
+ entry->Put(syncable::SPECIFICS, generated_specifics);
+ DVLOG(1) << "Overwriting specifics of type "
+ << syncable::ModelTypeToString(type)
+ << " and marking for syncing.";
+ syncable::MarkForSyncing(entry);
+ return true;
+}
+
} // namespace syncable
diff --git a/chrome/browser/sync/engine/nigori_util.h b/sync/engine/nigori_util.h
index e135ca6d..67174c3 100644
--- a/chrome/browser/sync/engine/nigori_util.h
+++ b/sync/engine/nigori_util.h
@@ -4,13 +4,13 @@
// Various utility methods for nigori-based multi-type encryption.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_NIGORI_UTIL_H_
-#define CHROME_BROWSER_SYNC_ENGINE_NIGORI_UTIL_H_
+#ifndef SYNC_ENGINE_NIGORI_UTIL_H_
+#define SYNC_ENGINE_NIGORI_UTIL_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "sync/protocol/nigori_specifics.pb.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
class Cryptographer;
@@ -26,6 +26,7 @@ const char kEncryptedString[] = "encrypted";
class BaseTransaction;
class Entry;
+class MutableEntry;
class WriteTransaction;
// Check if our unsyced changes are encrypted if they need to be based on
@@ -61,6 +62,14 @@ bool VerifyDataTypeEncryptionForTest(
ModelType type,
bool is_encrypted) WARN_UNUSED_RESULT;
+// Stores |new_specifics| into |entry|, encrypting if necessary.
+// Returns false if an error encrypting occurred (does not modify |entry|).
+// Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS).
+bool UpdateEntryWithEncryption(
+ browser_sync::Cryptographer* cryptographer,
+ const sync_pb::EntitySpecifics& new_specifics,
+ MutableEntry* entry);
+
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_ENGINE_NIGORI_UTIL_H_
+#endif // SYNC_ENGINE_NIGORI_UTIL_H_
diff --git a/chrome/browser/sync/engine/nigori_util_unittest.cc b/sync/engine/nigori_util_unittest.cc
index e0d5053..2195c78 100644
--- a/chrome/browser/sync/engine/nigori_util_unittest.cc
+++ b/sync/engine/nigori_util_unittest.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/engine/nigori_util.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/util/cryptographer.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncable {
diff --git a/chrome/browser/sync/engine/nudge_source.cc b/sync/engine/nudge_source.cc
index b8e4bc8..50cd7eb 100644
--- a/chrome/browser/sync/engine/nudge_source.cc
+++ b/sync/engine/nudge_source.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/nudge_source.h"
+#include "sync/engine/nudge_source.h"
#include "base/logging.h"
diff --git a/chrome/browser/sync/engine/nudge_source.h b/sync/engine/nudge_source.h
index 9968b8a..f3488f4 100644
--- a/chrome/browser/sync/engine/nudge_source.h
+++ b/sync/engine/nudge_source.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_NUDGE_SOURCE_H_
-#define CHROME_BROWSER_SYNC_ENGINE_NUDGE_SOURCE_H_
+#ifndef SYNC_ENGINE_NUDGE_SOURCE_H_
+#define SYNC_ENGINE_NUDGE_SOURCE_H_
#pragma once
namespace browser_sync {
@@ -24,4 +24,4 @@ const char* GetNudgeSourceString(NudgeSource nudge_source);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_NUDGE_SOURCE_H_
+#endif // SYNC_ENGINE_NUDGE_SOURCE_H_
diff --git a/chrome/browser/sync/engine/passive_model_worker.cc b/sync/engine/passive_model_worker.cc
index 64be1b1..0b0d423 100644
--- a/chrome/browser/sync/engine/passive_model_worker.cc
+++ b/sync/engine/passive_model_worker.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/passive_model_worker.h"
+#include "sync/engine/passive_model_worker.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/sync/engine/passive_model_worker.h b/sync/engine/passive_model_worker.h
index 5a35b0a2..a8b89f7 100644
--- a/chrome/browser/sync/engine/passive_model_worker.h
+++ b/sync/engine/passive_model_worker.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
-#define CHROME_BROWSER_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
+#ifndef SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
+#define SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/internal_api/includes/syncer_error.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/util/syncer_error.h"
class MessageLoop;
@@ -37,4 +37,4 @@ class PassiveModelWorker : public ModelSafeWorker {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
+#endif // SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_
diff --git a/chrome/browser/sync/engine/polling_constants.cc b/sync/engine/polling_constants.cc
index 74f24ba..c1f8e37 100644
--- a/chrome/browser/sync/engine/polling_constants.cc
+++ b/sync/engine/polling_constants.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
-#include "chrome/browser/sync/engine/polling_constants.h"
+#include "sync/engine/polling_constants.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/polling_constants.h b/sync/engine/polling_constants.h
index a970f96..ff6650c 100644
--- a/chrome/browser/sync/engine/polling_constants.h
+++ b/sync/engine/polling_constants.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Constants used by SyncerThread when polling servers for updates.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_POLLING_CONSTANTS_H_
-#define CHROME_BROWSER_SYNC_ENGINE_POLLING_CONSTANTS_H_
+#ifndef SYNC_ENGINE_POLLING_CONSTANTS_H_
+#define SYNC_ENGINE_POLLING_CONSTANTS_H_
#pragma once
namespace browser_sync {
@@ -17,4 +17,4 @@ extern const int kBackoffRandomizationFactor;
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_POLLING_CONSTANTS_H_
+#endif // SYNC_ENGINE_POLLING_CONSTANTS_H_
diff --git a/chrome/browser/sync/engine/post_commit_message_command.cc b/sync/engine/post_commit_message_command.cc
index bccd451..8f51f20 100644
--- a/chrome/browser/sync/engine/post_commit_message_command.cc
+++ b/sync/engine/post_commit_message_command.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/post_commit_message_command.h"
+#include "sync/engine/post_commit_message_command.h"
#include <vector>
#include "base/location.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncproto.h"
+#include "sync/sessions/sync_session.h"
using std::vector;
diff --git a/chrome/browser/sync/engine/post_commit_message_command.h b/sync/engine/post_commit_message_command.h
index 5f2252c..50fae39 100644
--- a/chrome/browser/sync/engine/post_commit_message_command.h
+++ b/sync/engine/post_commit_message_command.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_POST_COMMIT_MESSAGE_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_POST_COMMIT_MESSAGE_COMMAND_H_
+#ifndef SYNC_ENGINE_POST_COMMIT_MESSAGE_COMMAND_H_
+#define SYNC_ENGINE_POST_COMMIT_MESSAGE_COMMAND_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
+#include "sync/engine/syncer_command.h"
namespace browser_sync {
@@ -25,4 +25,4 @@ class PostCommitMessageCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_POST_COMMIT_MESSAGE_COMMAND_H_
+#endif // SYNC_ENGINE_POST_COMMIT_MESSAGE_COMMAND_H_
diff --git a/chrome/browser/sync/engine/process_commit_response_command.cc b/sync/engine/process_commit_response_command.cc
index 761aeba..b82ff6d 100644
--- a/chrome/browser/sync/engine/process_commit_response_command.cc
+++ b/sync/engine/process_commit_response_command.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/process_commit_response_command.h"
+#include "sync/engine/process_commit_response_command.h"
#include <cstddef>
#include <set>
@@ -11,12 +11,12 @@
#include "base/basictypes.h"
#include "base/location.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/time.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/engine/syncproto.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/time.h"
using syncable::WriteTransaction;
using syncable::MutableEntry;
diff --git a/chrome/browser/sync/engine/process_commit_response_command.h b/sync/engine/process_commit_response_command.h
index e6762a2..8e288de 100644
--- a/chrome/browser/sync/engine/process_commit_response_command.h
+++ b/sync/engine/process_commit_response_command.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
+#ifndef SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
+#define SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
#pragma once
#include <set>
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
-#include "chrome/browser/sync/engine/syncproto.h"
+#include "sync/engine/model_changing_syncer_command.h"
+#include "sync/engine/syncproto.h"
namespace syncable {
class Id;
@@ -98,4 +98,4 @@ class ProcessCommitResponseCommand : public ModelChangingSyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
+#endif // SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
diff --git a/chrome/browser/sync/engine/process_commit_response_command_unittest.cc b/sync/engine/process_commit_response_command_unittest.cc
index 065d40d..517bc51 100644
--- a/chrome/browser/sync/engine/process_commit_response_command_unittest.cc
+++ b/sync/engine/process_commit_response_command_unittest.cc
@@ -6,13 +6,13 @@
#include "base/location.h"
#include "base/stringprintf.h"
-#include "chrome/browser/sync/engine/process_commit_response_command.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
+#include "sync/engine/process_commit_response_command.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/syncer_command_test.h"
+#include "sync/test/engine/test_id_factory.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/engine/process_updates_command.cc b/sync/engine/process_updates_command.cc
index 2665b1f..7262831 100644
--- a/chrome/browser/sync/engine/process_updates_command.cc
+++ b/sync/engine/process_updates_command.cc
@@ -2,19 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/process_updates_command.h"
+#include "sync/engine/process_updates_command.h"
#include <vector>
#include "base/basictypes.h"
#include "base/location.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/engine/syncproto.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/cryptographer.h"
using std::vector;
diff --git a/chrome/browser/sync/engine/process_updates_command.h b/sync/engine/process_updates_command.h
index 241e029..f5f430f 100644
--- a/chrome/browser/sync/engine/process_updates_command.h
+++ b/sync/engine/process_updates_command.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
+#ifndef SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
+#define SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
+#include "sync/engine/model_changing_syncer_command.h"
+#include "sync/engine/syncer_types.h"
namespace syncable {
class WriteTransaction;
@@ -52,4 +52,4 @@ class ProcessUpdatesCommand : public ModelChangingSyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
+#endif // SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
diff --git a/chrome/browser/sync/engine/process_updates_command_unittest.cc b/sync/engine/process_updates_command_unittest.cc
index bd1bdbb..1c6a786 100644
--- a/chrome/browser/sync/engine/process_updates_command_unittest.cc
+++ b/sync/engine/process_updates_command_unittest.cc
@@ -1,16 +1,16 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/sync/engine/process_updates_command.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/engine/process_updates_command.h"
+#include "sync/sessions/session_state.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/resolve_conflicts_command.cc b/sync/engine/resolve_conflicts_command.cc
index 87b0318..457e4b7 100644
--- a/chrome/browser/sync/engine/resolve_conflicts_command.cc
+++ b/sync/engine/resolve_conflicts_command.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/resolve_conflicts_command.h"
+#include "sync/engine/resolve_conflicts_command.h"
-#include "chrome/browser/sync/engine/conflict_resolver.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/conflict_resolver.h"
+#include "sync/sessions/session_state.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/resolve_conflicts_command.h b/sync/engine/resolve_conflicts_command.h
index 2121a31..8c2c87e4 100644
--- a/chrome/browser/sync/engine/resolve_conflicts_command.h
+++ b/sync/engine/resolve_conflicts_command.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_
+#ifndef SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_
+#define SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
+#include "sync/engine/model_changing_syncer_command.h"
namespace browser_sync {
@@ -30,4 +30,4 @@ class ResolveConflictsCommand : public ModelChangingSyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_
+#endif // SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_
diff --git a/chrome/browser/sync/engine/resolve_conflicts_command_unittest.cc b/sync/engine/resolve_conflicts_command_unittest.cc
index 7f7ddfd..079683a 100644
--- a/chrome/browser/sync/engine/resolve_conflicts_command_unittest.cc
+++ b/sync/engine/resolve_conflicts_command_unittest.cc
@@ -4,12 +4,12 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/sync/engine/resolve_conflicts_command.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/engine/resolve_conflicts_command.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/syncer_command_test.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/store_timestamps_command.cc b/sync/engine/store_timestamps_command.cc
index efe7bbc..e35e6c7 100644
--- a/chrome/browser/sync/engine/store_timestamps_command.cc
+++ b/sync/engine/store_timestamps_command.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/store_timestamps_command.h"
+#include "sync/engine/store_timestamps_command.h"
-#include "chrome/browser/sync/sessions/status_controller.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/sessions/status_controller.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/store_timestamps_command.h b/sync/engine/store_timestamps_command.h
index cbc7c83..ec57052 100644
--- a/chrome/browser/sync/engine/store_timestamps_command.h
+++ b/sync/engine/store_timestamps_command.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_
+#ifndef SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_
+#define SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/syncer_command.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
+#include "sync/engine/syncer_command.h"
+#include "sync/engine/syncer_types.h"
namespace browser_sync {
@@ -38,4 +38,4 @@ class StoreTimestampsCommand : public SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_
+#endif // SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_
diff --git a/chrome/browser/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc
index a4dfbaa..f03b727 100644
--- a/chrome/browser/sync/engine/sync_scheduler.cc
+++ b/sync/engine/sync_scheduler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/sync_scheduler.h"
+#include "sync/engine/sync_scheduler.h"
#include <algorithm>
#include <cstring>
@@ -13,11 +13,11 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/rand_util.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/protocol/proto_enum_conversions.h"
-#include "chrome/browser/sync/util/data_type_histogram.h"
-#include "chrome/browser/sync/util/logging.h"
+#include "sync/engine/syncer.h"
+#include "sync/protocol/proto_enum_conversions.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/util/data_type_histogram.h"
+#include "sync/util/logging.h"
using base::TimeDelta;
using base::TimeTicks;
diff --git a/chrome/browser/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h
index 079ce93..8540484 100644
--- a/chrome/browser/sync/engine/sync_scheduler.h
+++ b/sync/engine/sync_scheduler.h
@@ -3,8 +3,8 @@
// found in the LICENSE file.
//
// A class to schedule syncer tasks intelligently.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_
+#ifndef SYNC_ENGINE_SYNC_SCHEDULER_H_
+#define SYNC_ENGINE_SYNC_SCHEDULER_H_
#pragma once
#include <string>
@@ -18,14 +18,14 @@
#include "base/observer_list.h"
#include "base/time.h"
#include "base/timer.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/engine/nudge_source.h"
-#include "chrome/browser/sync/engine/polling_constants.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/engine/nudge_source.h"
+#include "sync/engine/polling_constants.h"
+#include "sync/engine/syncer.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/sessions/sync_session_context.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/util/weak_handle.h"
class MessageLoop;
@@ -418,4 +418,4 @@ class SyncScheduler : public sessions::SyncSession::Delegate {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_
+#endif // SYNC_ENGINE_SYNC_SCHEDULER_H_
diff --git a/chrome/browser/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index a6c48d6..d90ce23 100644
--- a/chrome/browser/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -8,15 +8,15 @@
#include "base/memory/weak_ptr.h"
#include "base/message_loop.h"
#include "base/test/test_timeouts.h"
-#include "chrome/browser/sync/engine/sync_scheduler.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/sessions/test_util.h"
-#include "chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.h"
-#include "chrome/browser/sync/test/engine/mock_connection_manager.h"
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
-#include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
-#include "testing/gtest/include/gtest/gtest.h"
+#include "sync/engine/sync_scheduler.h"
+#include "sync/engine/syncer.h"
+#include "sync/sessions/test_util.h"
+#include "sync/test/engine/fake_model_safe_worker_registrar.h"
+#include "sync/test/engine/mock_connection_manager.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
+#include "sync/test/fake_extensions_activity_monitor.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
using base::TimeDelta;
using base::TimeTicks;
diff --git a/chrome/browser/sync/engine/sync_scheduler_whitebox_unittest.cc b/sync/engine/sync_scheduler_whitebox_unittest.cc
index 828dea3..35a0955 100644
--- a/chrome/browser/sync/engine/sync_scheduler_whitebox_unittest.cc
+++ b/sync/engine/sync_scheduler_whitebox_unittest.cc
@@ -4,13 +4,13 @@
#include "base/message_loop.h"
#include "base/time.h"
-#include "chrome/browser/sync/engine/sync_scheduler.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/sessions/test_util.h"
-#include "chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.h"
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
-#include "chrome/browser/sync/test/engine/mock_connection_manager.h"
-#include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
+#include "sync/engine/sync_scheduler.h"
+#include "sync/sessions/sync_session_context.h"
+#include "sync/sessions/test_util.h"
+#include "sync/test/engine/fake_model_safe_worker_registrar.h"
+#include "sync/test/engine/mock_connection_manager.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
+#include "sync/test/fake_extensions_activity_monitor.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/engine/syncer.cc b/sync/engine/syncer.cc
index 3fe46dc..62c7af8 100644
--- a/chrome/browser/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncer.h"
+#include "sync/engine/syncer.h"
#include "base/debug/trace_event.h"
#include "base/location.h"
@@ -10,24 +10,24 @@
#include "base/message_loop.h"
#include "base/time.h"
#include "build/build_config.h"
-#include "chrome/browser/sync/engine/apply_updates_command.h"
-#include "chrome/browser/sync/engine/build_commit_command.h"
-#include "chrome/browser/sync/engine/cleanup_disabled_types_command.h"
-#include "chrome/browser/sync/engine/clear_data_command.h"
-#include "chrome/browser/sync/engine/conflict_resolver.h"
-#include "chrome/browser/sync/engine/download_updates_command.h"
-#include "chrome/browser/sync/engine/get_commit_ids_command.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/engine/post_commit_message_command.h"
-#include "chrome/browser/sync/engine/process_commit_response_command.h"
-#include "chrome/browser/sync/engine/process_updates_command.h"
-#include "chrome/browser/sync/engine/resolve_conflicts_command.h"
-#include "chrome/browser/sync/engine/store_timestamps_command.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/engine/verify_updates_command.h"
-#include "chrome/browser/sync/syncable/syncable-inl.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/apply_updates_command.h"
+#include "sync/engine/build_commit_command.h"
+#include "sync/engine/cleanup_disabled_types_command.h"
+#include "sync/engine/clear_data_command.h"
+#include "sync/engine/conflict_resolver.h"
+#include "sync/engine/download_updates_command.h"
+#include "sync/engine/get_commit_ids_command.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/engine/post_commit_message_command.h"
+#include "sync/engine/process_commit_response_command.h"
+#include "sync/engine/process_updates_command.h"
+#include "sync/engine/resolve_conflicts_command.h"
+#include "sync/engine/store_timestamps_command.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/engine/syncproto.h"
+#include "sync/engine/verify_updates_command.h"
+#include "sync/syncable/syncable-inl.h"
+#include "sync/syncable/syncable.h"
using base::Time;
using base::TimeDelta;
diff --git a/chrome/browser/sync/engine/syncer.h b/sync/engine/syncer.h
index aa2ec3e..13fc681 100644
--- a/chrome/browser/sync/engine/syncer.h
+++ b/sync/engine/syncer.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
+#ifndef SYNC_ENGINE_SYNCER_H_
+#define SYNC_ENGINE_SYNCER_H_
#pragma once
#include <utility>
@@ -13,12 +13,12 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/sync/engine/conflict_resolver.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
+#include "sync/engine/conflict_resolver.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/engine/syncproto.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/extensions_activity_monitor.h"
namespace syncable {
class Entry;
@@ -113,4 +113,4 @@ const char* SyncerStepToString(const SyncerStep);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
+#endif // SYNC_ENGINE_SYNCER_H_
diff --git a/chrome/browser/sync/engine/syncer_command.cc b/sync/engine/syncer_command.cc
index 8b4f9bf..e2e5138 100644
--- a/chrome/browser/sync/engine/syncer_command.cc
+++ b/sync/engine/syncer_command.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncer_command.h"
+#include "sync/engine/syncer_command.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/sessions/sync_session.h"
namespace browser_sync {
using sessions::SyncSession;
diff --git a/chrome/browser/sync/engine/syncer_command.h b/sync/engine/syncer_command.h
index 024bbae..8095467 100644
--- a/chrome/browser/sync/engine/syncer_command.h
+++ b/sync/engine/syncer_command.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNCER_COMMAND_H_
+#ifndef SYNC_ENGINE_SYNCER_COMMAND_H_
+#define SYNC_ENGINE_SYNCER_COMMAND_H_
#pragma once
#include "base/basictypes.h"
-#include "chrome/browser/sync/internal_api/includes/syncer_error.h"
+#include "sync/util/syncer_error.h"
namespace browser_sync {
@@ -45,4 +45,4 @@ class SyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_COMMAND_H_
+#endif // SYNC_ENGINE_SYNCER_COMMAND_H_
diff --git a/chrome/browser/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc
index e2e235b..c5041d2 100644
--- a/chrome/browser/sync/engine/syncer_proto_util.cc
+++ b/sync/engine/syncer_proto_util.cc
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncer_proto_util.h"
#include "base/format_macros.h"
#include "base/stringprintf.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable-inl.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/time.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/protocol/service_constants.h"
#include "sync/protocol/sync.pb.h"
#include "sync/protocol/sync_enums.pb.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable-inl.h"
+#include "sync/syncable/syncable.h"
+#include "sync/util/time.h"
using browser_sync::SyncProtocolErrorType;
using std::string;
diff --git a/chrome/browser/sync/engine/syncer_proto_util.h b/sync/engine/syncer_proto_util.h
index e9d3c79..e8086b5 100644
--- a/chrome/browser/sync/engine/syncer_proto_util.h
+++ b/sync/engine/syncer_proto_util.h
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
+#ifndef SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
+#define SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
#pragma once
#include <string>
#include "base/gtest_prod_util.h"
#include "base/time.h"
-#include "chrome/browser/sync/internal_api/includes/syncer_error.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/blob.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/blob.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/syncer_error.h"
namespace syncable {
class Directory;
@@ -135,4 +135,4 @@ class SyncerProtoUtil {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
+#endif // SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
diff --git a/chrome/browser/sync/engine/syncer_proto_util_unittest.cc b/sync/engine/syncer_proto_util_unittest.cc
index 41e3cc0..d70a07b 100644
--- a/chrome/browser/sync/engine/syncer_proto_util_unittest.cc
+++ b/sync/engine/syncer_proto_util_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncer_proto_util.h"
#include <string>
@@ -10,14 +10,14 @@
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/time.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/syncable/blob.h"
-#include "chrome/browser/sync/syncable/model_type_test_util.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/engine/mock_connection_manager.h"
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
+#include "sync/engine/syncproto.h"
+#include "sync/sessions/session_state.h"
+#include "sync/sessions/sync_session_context.h"
+#include "sync/syncable/blob.h"
+#include "sync/syncable/model_type_test_util.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/engine/mock_connection_manager.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
diff --git a/chrome/browser/sync/engine/syncer_types.cc b/sync/engine/syncer_types.cc
index 8bc5524..1899466 100644
--- a/chrome/browser/sync/engine/syncer_types.cc
+++ b/sync/engine/syncer_types.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncer_types.h"
+#include "sync/engine/syncer_types.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/syncer_types.h b/sync/engine/syncer_types.h
index 4948884..c34621e 100644
--- a/chrome/browser/sync/engine/syncer_types.h
+++ b/sync/engine/syncer_types.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_TYPES_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNCER_TYPES_H_
+#ifndef SYNC_ENGINE_SYNCER_TYPES_H_
+#define SYNC_ENGINE_SYNCER_TYPES_H_
#pragma once
#include <map>
@@ -11,7 +11,7 @@
#include <vector>
#include "base/observer_list.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace syncable {
class Id;
@@ -155,4 +155,4 @@ class SyncEngineEventListener {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_TYPES_H_
+#endif // SYNC_ENGINE_SYNCER_TYPES_H_
diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 9e7ea5e..9a66d98 100644
--- a/chrome/browser/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -23,31 +23,31 @@
#include "base/stringprintf.h"
#include "base/time.h"
#include "build/build_config.h"
-#include "chrome/browser/sync/engine/get_commit_ids_command.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/engine/process_updates_command.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/mock_connection_manager.h"
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
-#include "chrome/browser/sync/test/engine/test_syncable_utils.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
-#include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
-#include "chrome/browser/sync/util/cryptographer.h"
-#include "chrome/browser/sync/util/time.h"
+#include "sync/engine/get_commit_ids_command.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/engine/nigori_util.h"
+#include "sync/engine/process_updates_command.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/engine/syncproto.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/protocol/preference_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/sessions/sync_session_context.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/mock_connection_manager.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
+#include "sync/test/engine/test_id_factory.h"
+#include "sync/test/engine/test_syncable_utils.h"
+#include "sync/test/fake_encryptor.h"
+#include "sync/test/fake_extensions_activity_monitor.h"
+#include "sync/util/cryptographer.h"
+#include "sync/util/time.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::TimeDelta;
@@ -290,7 +290,12 @@ class SyncerTest : public testing::Test,
syncable::Id parent_id;
EntryFeature features[10];
- static const CommitOrderingTest LAST_COMMIT_ITEM;
+ static CommitOrderingTest MakeLastCommitItem() {
+ CommitOrderingTest last_commit_item;
+ last_commit_item.commit_index = -1;
+ last_commit_item.id = TestIdFactory::root();
+ return last_commit_item;
+ }
};
void RunCommitOrderingTest(CommitOrderingTest* test) {
@@ -1164,7 +1169,7 @@ TEST_F(SyncerTest, TestCommitListOrderingTwoItemsTall) {
CommitOrderingTest items[] = {
{1, ids_.FromNumber(-1001), ids_.FromNumber(-1000)},
{0, ids_.FromNumber(-1000), ids_.FromNumber(0)},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1174,7 +1179,7 @@ TEST_F(SyncerTest, TestCommitListOrderingThreeItemsTall) {
{1, ids_.FromNumber(-2001), ids_.FromNumber(-2000)},
{0, ids_.FromNumber(-2000), ids_.FromNumber(0)},
{2, ids_.FromNumber(-2002), ids_.FromNumber(-2001)},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1185,7 +1190,7 @@ TEST_F(SyncerTest, TestCommitListOrderingThreeItemsTallLimitedSize) {
{1, ids_.FromNumber(-2001), ids_.FromNumber(-2000)},
{0, ids_.FromNumber(-2000), ids_.FromNumber(0)},
{2, ids_.FromNumber(-2002), ids_.FromNumber(-2001)},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1193,7 +1198,7 @@ TEST_F(SyncerTest, TestCommitListOrderingThreeItemsTallLimitedSize) {
TEST_F(SyncerTest, TestCommitListOrderingSingleDeletedItem) {
CommitOrderingTest items[] = {
{0, ids_.FromNumber(1000), ids_.FromNumber(0), {DELETED}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1201,7 +1206,7 @@ TEST_F(SyncerTest, TestCommitListOrderingSingleDeletedItem) {
TEST_F(SyncerTest, TestCommitListOrderingSingleUncommittedDeletedItem) {
CommitOrderingTest items[] = {
{-1, ids_.FromNumber(-1000), ids_.FromNumber(0), {DELETED}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1209,7 +1214,7 @@ TEST_F(SyncerTest, TestCommitListOrderingSingleUncommittedDeletedItem) {
TEST_F(SyncerTest, TestCommitListOrderingSingleDeletedItemWithUnroll) {
CommitOrderingTest items[] = {
{0, ids_.FromNumber(1000), ids_.FromNumber(0), {DELETED}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1218,7 +1223,7 @@ TEST_F(SyncerTest,
TestCommitListOrderingSingleLongDeletedItemWithUnroll) {
CommitOrderingTest items[] = {
{0, ids_.FromNumber(1000), ids_.FromNumber(0), {DELETED, OLD_MTIME}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1227,7 +1232,7 @@ TEST_F(SyncerTest, TestCommitListOrderingTwoLongDeletedItemWithUnroll) {
CommitOrderingTest items[] = {
{0, ids_.FromNumber(1000), ids_.FromNumber(0), {DELETED, OLD_MTIME}},
{-1, ids_.FromNumber(1001), ids_.FromNumber(1000), {DELETED, OLD_MTIME}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1238,7 +1243,7 @@ TEST_F(SyncerTest, TestCommitListOrdering3LongDeletedItemsWithSizeLimit) {
{0, ids_.FromNumber(1000), ids_.FromNumber(0), {DELETED, OLD_MTIME}},
{1, ids_.FromNumber(1001), ids_.FromNumber(0), {DELETED, OLD_MTIME}},
{2, ids_.FromNumber(1002), ids_.FromNumber(0), {DELETED, OLD_MTIME}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1247,7 +1252,7 @@ TEST_F(SyncerTest, TestCommitListOrderingTwoDeletedItemsWithUnroll) {
CommitOrderingTest items[] = {
{0, ids_.FromNumber(1000), ids_.FromNumber(0), {DELETED}},
{-1, ids_.FromNumber(1001), ids_.FromNumber(1000), {DELETED}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1259,7 +1264,7 @@ TEST_F(SyncerTest, TestCommitListOrderingComplexDeletionScenario) {
{1, ids_.FromNumber(1002), ids_.FromNumber(1001), {DELETED, OLD_MTIME}},
{-1, ids_.FromNumber(1003), ids_.FromNumber(1001), {SYNCED}},
{2, ids_.FromNumber(1004), ids_.FromNumber(1003), {DELETED}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1273,7 +1278,7 @@ TEST_F(SyncerTest,
{-1, ids_.FromNumber(1003), ids_.FromNumber(1001), {SYNCED}},
{2, ids_.FromNumber(1004), ids_.FromNumber(1003), {DELETED}},
{3, ids_.FromNumber(1005), ids_.FromNumber(1003), {DELETED}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -1283,7 +1288,7 @@ TEST_F(SyncerTest, TestCommitListOrderingDeleteMovedItems) {
{1, ids_.FromNumber(1000), ids_.FromNumber(0), {DELETED, OLD_MTIME}},
{0, ids_.FromNumber(1001), ids_.FromNumber(1000), {DELETED, OLD_MTIME,
MOVED_FROM_ROOT}},
- CommitOrderingTest::LAST_COMMIT_ITEM,
+ CommitOrderingTest::MakeLastCommitItem(),
};
RunCommitOrderingTest(items);
}
@@ -4515,7 +4520,4 @@ TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) {
ExpectLocalOrderIsByServerId();
}
-const SyncerTest::CommitOrderingTest
-SyncerTest::CommitOrderingTest::LAST_COMMIT_ITEM = {-1, TestIdFactory::root()};
-
} // namespace browser_sync
diff --git a/chrome/browser/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc
index 9af18aa..f003bcd 100644
--- a/chrome/browser/sync/engine/syncer_util.cc
+++ b/sync/engine/syncer_util.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncer_util.h"
+#include "sync/engine/syncer_util.h"
#include <algorithm>
#include <set>
@@ -11,20 +11,20 @@
#include "base/location.h"
#include "base/metrics/histogram.h"
-#include "chrome/browser/sync/engine/conflict_resolver.h"
-#include "chrome/browser/sync/engine/nigori_util.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_changes_version.h"
-#include "chrome/browser/sync/util/cryptographer.h"
-#include "chrome/browser/sync/util/time.h"
+#include "sync/engine/conflict_resolver.h"
+#include "sync/engine/nigori_util.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/engine/syncproto.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_changes_version.h"
+#include "sync/util/cryptographer.h"
+#include "sync/util/time.h"
using syncable::BASE_VERSION;
using syncable::Blob;
diff --git a/chrome/browser/sync/engine/syncer_util.h b/sync/engine/syncer_util.h
index 6713280..026a237 100644
--- a/chrome/browser/sync/engine/syncer_util.h
+++ b/sync/engine/syncer_util.h
@@ -5,18 +5,18 @@
// Utility functions manipulating syncable::Entries, intended for use by the
// syncer.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
+#ifndef SYNC_ENGINE_SYNCER_UTIL_H_
+#define SYNC_ENGINE_SYNCER_UTIL_H_
#pragma once
#include <set>
#include <string>
#include <vector>
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
namespace browser_sync {
@@ -134,4 +134,4 @@ class SyncerUtil {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_UTIL_H_
+#endif // SYNC_ENGINE_SYNCER_UTIL_H_
diff --git a/chrome/browser/sync/engine/syncproto.h b/sync/engine/syncproto.h
index f469c91..101585f 100644
--- a/chrome/browser/sync/engine/syncproto.h
+++ b/sync/engine/syncproto.h
@@ -4,13 +4,13 @@
//
// Wrappers to help us work with ids and protobuffers.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCPROTO_H_
-#define CHROME_BROWSER_SYNC_ENGINE_SYNCPROTO_H_
+#ifndef SYNC_ENGINE_SYNCPROTO_H_
+#define SYNC_ENGINE_SYNCPROTO_H_
#pragma once
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable_id.h"
namespace browser_sync {
@@ -84,4 +84,4 @@ typedef sync_pb::GetUpdatesMessage GetUpdatesMessage;
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCPROTO_H_
+#endif // SYNC_ENGINE_SYNCPROTO_H_
diff --git a/chrome/browser/sync/engine/syncproto_unittest.cc b/sync/engine/syncproto_unittest.cc
index 951b852..2c0598b 100644
--- a/chrome/browser/sync/engine/syncproto_unittest.cc
+++ b/sync/engine/syncproto_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/syncproto.h"
+#include "sync/engine/syncproto.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/update_applicator.cc b/sync/engine/update_applicator.cc
index 0c8122a..5f510f3 100644
--- a/chrome/browser/sync/engine/update_applicator.cc
+++ b/sync/engine/update_applicator.cc
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/update_applicator.h"
+#include "sync/engine/update_applicator.h"
#include <vector>
#include "base/logging.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/sessions/session_state.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
using std::vector;
diff --git a/chrome/browser/sync/engine/update_applicator.h b/sync/engine/update_applicator.h
index bcc928d..5b3ee18 100644
--- a/chrome/browser/sync/engine/update_applicator.h
+++ b/sync/engine/update_applicator.h
@@ -8,16 +8,16 @@
// UpdateApplicator might resemble an iterator, but it actually keeps retrying
// failed updates until no remaining updates can be successfully applied.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_UPDATE_APPLICATOR_H_
-#define CHROME_BROWSER_SYNC_ENGINE_UPDATE_APPLICATOR_H_
+#ifndef SYNC_ENGINE_UPDATE_APPLICATOR_H_
+#define SYNC_ENGINE_UPDATE_APPLICATOR_H_
#pragma once
#include <vector>
#include "base/basictypes.h"
#include "base/port.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
@@ -107,4 +107,4 @@ class UpdateApplicator {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_UPDATE_APPLICATOR_H_
+#endif // SYNC_ENGINE_UPDATE_APPLICATOR_H_
diff --git a/chrome/browser/sync/engine/verify_updates_command.cc b/sync/engine/verify_updates_command.cc
index 58a3c8d..ab555a2 100644
--- a/chrome/browser/sync/engine/verify_updates_command.cc
+++ b/sync/engine/verify_updates_command.cc
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/engine/verify_updates_command.h"
+#include "sync/engine/verify_updates_command.h"
#include <string>
#include "base/location.h"
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/engine/syncer_util.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/syncer.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/engine/syncer_util.h"
+#include "sync/engine/syncproto.h"
#include "sync/protocol/bookmark_specifics.pb.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/engine/verify_updates_command.h b/sync/engine/verify_updates_command.h
index 5c6ff05..37a0b1f 100644
--- a/chrome/browser/sync/engine/verify_updates_command.h
+++ b/sync/engine/verify_updates_command.h
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
-#define CHROME_BROWSER_SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
+#ifndef SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
+#define SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
+#include "sync/engine/model_changing_syncer_command.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/engine/syncproto.h"
namespace syncable {
class WriteTransaction;
@@ -46,4 +46,4 @@ class VerifyUpdatesCommand : public ModelChangingSyncerCommand {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
+#endif // SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_
diff --git a/chrome/browser/sync/engine/verify_updates_command_unittest.cc b/sync/engine/verify_updates_command_unittest.cc
index ce6ab1e..20a6cf6 100644
--- a/chrome/browser/sync/engine/verify_updates_command_unittest.cc
+++ b/sync/engine/verify_updates_command_unittest.cc
@@ -3,13 +3,13 @@
// found in the LICENSE file.
#include "base/location.h"
-#include "chrome/browser/sync/engine/verify_updates_command.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/engine/verify_updates_command.h"
+#include "sync/sessions/session_state.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/syncer_command_test.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/sync/js/DEPS b/sync/js/DEPS
new file mode 100644
index 0000000..82d1d29
--- /dev/null
+++ b/sync/js/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ "+sync/util",
+]
diff --git a/chrome/browser/sync/README.js b/sync/js/README.js
index 0fbfa66..0fbfa66 100644
--- a/chrome/browser/sync/README.js
+++ b/sync/js/README.js
diff --git a/chrome/browser/sync/js/js_arg_list.cc b/sync/js/js_arg_list.cc
index 097c703..d8ab8e2 100644
--- a/chrome/browser/sync/js/js_arg_list.cc
+++ b/sync/js/js_arg_list.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_arg_list.h"
+#include "sync/js/js_arg_list.h"
#include "base/json/json_writer.h"
diff --git a/chrome/browser/sync/js/js_arg_list.h b/sync/js/js_arg_list.h
index 585aa52..aab49d9 100644
--- a/chrome/browser/sync/js/js_arg_list.h
+++ b/sync/js/js_arg_list.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_ARG_LIST_H_
-#define CHROME_BROWSER_SYNC_JS_JS_ARG_LIST_H_
+#ifndef SYNC_JS_JS_ARG_LIST_H_
+#define SYNC_JS_JS_ARG_LIST_H_
#pragma once
// See README.js for design comments.
@@ -11,7 +11,7 @@
#include <string>
#include "base/values.h"
-#include "chrome/browser/sync/util/immutable.h"
+#include "sync/util/immutable.h"
namespace browser_sync {
@@ -41,4 +41,4 @@ class JsArgList {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_ARG_LIST_H_
+#endif // SYNC_JS_JS_ARG_LIST_H_
diff --git a/chrome/browser/sync/js/js_arg_list_unittest.cc b/sync/js/js_arg_list_unittest.cc
index 65469f0..3f00e4b 100644
--- a/chrome/browser/sync/js/js_arg_list_unittest.cc
+++ b/sync/js/js_arg_list_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_arg_list.h"
+#include "sync/js/js_arg_list.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/js/js_backend.h b/sync/js/js_backend.h
index a141972..3c7f89a 100644
--- a/chrome/browser/sync/js/js_backend.h
+++ b/sync/js/js_backend.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_BACKEND_H_
-#define CHROME_BROWSER_SYNC_JS_JS_BACKEND_H_
+#ifndef SYNC_JS_JS_BACKEND_H_
+#define SYNC_JS_JS_BACKEND_H_
#pragma once
// See README.js for design comments.
@@ -38,4 +38,4 @@ class JsBackend {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_BACKEND_H_
+#endif // SYNC_JS_JS_BACKEND_H_
diff --git a/chrome/browser/sync/js/js_controller.h b/sync/js/js_controller.h
index edacdd8..d0deb20 100644
--- a/chrome/browser/sync/js/js_controller.h
+++ b/sync/js/js_controller.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_CONTROLLER_H_
-#define CHROME_BROWSER_SYNC_JS_JS_CONTROLLER_H_
+#ifndef SYNC_JS_JS_CONTROLLER_H_
+#define SYNC_JS_JS_CONTROLLER_H_
#pragma once
// See README.js for design comments.
@@ -47,4 +47,4 @@ class JsController {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_CONTROLLER_H_
+#endif // SYNC_JS_JS_CONTROLLER_H_
diff --git a/chrome/browser/sync/js/js_event_details.cc b/sync/js/js_event_details.cc
index 9182d24..693ba4c 100644
--- a/chrome/browser/sync/js/js_event_details.cc
+++ b/sync/js/js_event_details.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_event_details.h"
+#include "sync/js/js_event_details.h"
#include "base/json/json_writer.h"
diff --git a/chrome/browser/sync/js/js_event_details.h b/sync/js/js_event_details.h
index 51fba04..df59851 100644
--- a/chrome/browser/sync/js/js_event_details.h
+++ b/sync/js/js_event_details.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_EVENT_DETAILS_H_
-#define CHROME_BROWSER_SYNC_JS_JS_EVENT_DETAILS_H_
+#ifndef SYNC_JS_JS_EVENT_DETAILS_H_
+#define SYNC_JS_JS_EVENT_DETAILS_H_
#pragma once
// See README.js for design comments.
@@ -11,7 +11,7 @@
#include <string>
#include "base/values.h"
-#include "chrome/browser/sync/util/immutable.h"
+#include "sync/util/immutable.h"
namespace browser_sync {
@@ -42,4 +42,4 @@ class JsEventDetails {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_EVENT_DETAILS_H_
+#endif // SYNC_JS_JS_EVENT_DETAILS_H_
diff --git a/chrome/browser/sync/js/js_event_details_unittest.cc b/sync/js/js_event_details_unittest.cc
index 111eb21..01cea19 100644
--- a/chrome/browser/sync/js/js_event_details_unittest.cc
+++ b/sync/js/js_event_details_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_event_details.h"
+#include "sync/js/js_event_details.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/js/js_event_handler.h b/sync/js/js_event_handler.h
index bf8ca32..ce15903 100644
--- a/chrome/browser/sync/js/js_event_handler.h
+++ b/sync/js/js_event_handler.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_EVENT_HANDLER_H_
-#define CHROME_BROWSER_SYNC_JS_JS_EVENT_HANDLER_H_
+#ifndef SYNC_JS_JS_EVENT_HANDLER_H_
+#define SYNC_JS_JS_EVENT_HANDLER_H_
#pragma once
// See README.js for design comments.
@@ -27,4 +27,4 @@ class JsEventHandler {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_EVENT_HANDLER_H_
+#endif // SYNC_JS_JS_EVENT_HANDLER_H_
diff --git a/chrome/browser/sync/js/js_reply_handler.h b/sync/js/js_reply_handler.h
index 4118cd9..3b10309 100644
--- a/chrome/browser/sync/js/js_reply_handler.h
+++ b/sync/js/js_reply_handler.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_REPLY_HANDLER_H_
-#define CHROME_BROWSER_SYNC_JS_JS_REPLY_HANDLER_H_
+#ifndef SYNC_JS_JS_REPLY_HANDLER_H_
+#define SYNC_JS_JS_REPLY_HANDLER_H_
#pragma once
// See README.js for design comments.
@@ -27,4 +27,4 @@ class JsReplyHandler {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_REPLY_HANDLER_H_
+#endif // SYNC_JS_JS_REPLY_HANDLER_H_
diff --git a/chrome/browser/sync/js/js_test_util.cc b/sync/js/js_test_util.cc
index 542f53f..257a947 100644
--- a/chrome/browser/sync/js/js_test_util.cc
+++ b/sync/js/js_test_util.cc
@@ -1,13 +1,13 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/js/js_test_util.h"
+#include "sync/js/js_test_util.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_event_details.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_event_details.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/js/js_test_util.h b/sync/js/js_test_util.h
index be471e3..ef6bec7 100644
--- a/chrome/browser/sync/js/js_test_util.h
+++ b/sync/js/js_test_util.h
@@ -1,20 +1,20 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_JS_JS_TEST_UTIL_H_
-#define CHROME_BROWSER_SYNC_JS_JS_TEST_UTIL_H_
+#ifndef SYNC_JS_JS_TEST_UTIL_H_
+#define SYNC_JS_JS_TEST_UTIL_H_
#pragma once
#include <ostream>
#include <string>
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/sync/js/js_backend.h"
-#include "chrome/browser/sync/js/js_controller.h"
-#include "chrome/browser/sync/js/js_event_handler.h"
-#include "chrome/browser/sync/js/js_reply_handler.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/js/js_backend.h"
+#include "sync/js/js_controller.h"
+#include "sync/js/js_event_handler.h"
+#include "sync/js/js_reply_handler.h"
+#include "sync/util/weak_handle.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace base {
@@ -106,4 +106,4 @@ class MockJsReplyHandler
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_JS_JS_TEST_UTIL_H_
+#endif // SYNC_JS_JS_TEST_UTIL_H_
diff --git a/chrome/browser/sync/sync_js_controller.cc b/sync/js/sync_js_controller.cc
index e904c25..0448486 100644
--- a/chrome/browser/sync/sync_js_controller.cc
+++ b/sync/js/sync_js_controller.cc
@@ -1,12 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sync_js_controller.h"
+#include "sync/js/sync_js_controller.h"
#include "base/location.h"
-#include "chrome/browser/sync/js/js_backend.h"
-#include "chrome/browser/sync/js/js_event_details.h"
+#include "sync/js/js_backend.h"
+#include "sync/js/js_event_details.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/sync_js_controller.h b/sync/js/sync_js_controller.h
index a48ba66..6e8f100 100644
--- a/chrome/browser/sync/sync_js_controller.h
+++ b/sync/js/sync_js_controller.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNC_JS_CONTROLLER_H_
-#define CHROME_BROWSER_SYNC_SYNC_JS_CONTROLLER_H_
+#ifndef SYNC_JS_SYNC_JS_CONTROLLER_H_
+#define SYNC_JS_SYNC_JS_CONTROLLER_H_
#pragma once
#include <string>
@@ -13,10 +13,10 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_controller.h"
-#include "chrome/browser/sync/js/js_event_handler.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_controller.h"
+#include "sync/js/js_event_handler.h"
+#include "sync/util/weak_handle.h"
namespace browser_sync {
@@ -78,4 +78,4 @@ class SyncJsController
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_SYNC_JS_CONTROLLER_H_
+#endif // SYNC_JS_SYNC_JS_CONTROLLER_H_
diff --git a/chrome/browser/sync/sync_js_controller_unittest.cc b/sync/js/sync_js_controller_unittest.cc
index 96bc6b3d..10a982d 100644
--- a/chrome/browser/sync/sync_js_controller_unittest.cc
+++ b/sync/js/sync_js_controller_unittest.cc
@@ -1,14 +1,14 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sync_js_controller.h"
+#include "sync/js/sync_js_controller.h"
#include "base/message_loop.h"
#include "base/values.h"
-#include "chrome/browser/sync/js/js_arg_list.h"
-#include "chrome/browser/sync/js/js_event_details.h"
-#include "chrome/browser/sync/js/js_test_util.h"
+#include "sync/js/js_arg_list.h"
+#include "sync/js/js_event_details.h"
+#include "sync/js/js_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/sync/protocol/DEPS b/sync/protocol/DEPS
new file mode 100644
index 0000000..a21ff1a
--- /dev/null
+++ b/sync/protocol/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ "+sync/syncable/model_type.h",
+]
diff --git a/chrome/browser/sync/protocol/proto_enum_conversions.cc b/sync/protocol/proto_enum_conversions.cc
index 030e53f..47a0016 100644
--- a/chrome/browser/sync/protocol/proto_enum_conversions.cc
+++ b/sync/protocol/proto_enum_conversions.cc
@@ -4,7 +4,7 @@
// Keep this file in sync with the .proto files in this directory.
-#include "chrome/browser/sync/protocol/proto_enum_conversions.h"
+#include "sync/protocol/proto_enum_conversions.h"
#include "base/basictypes.h"
#include "base/logging.h"
diff --git a/chrome/browser/sync/protocol/proto_enum_conversions.h b/sync/protocol/proto_enum_conversions.h
index 76a912e..fb8d44b 100644
--- a/chrome/browser/sync/protocol/proto_enum_conversions.h
+++ b/sync/protocol/proto_enum_conversions.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
-#define CHROME_BROWSER_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
+#ifndef SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
+#define SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
#pragma once
// Keep this file in sync with the .proto files in this directory.
@@ -37,4 +37,4 @@ const char* GetDeviceTypeString(
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
+#endif // SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_
diff --git a/chrome/browser/sync/protocol/proto_enum_conversions_unittest.cc b/sync/protocol/proto_enum_conversions_unittest.cc
index 648cfe6..2445a30 100644
--- a/chrome/browser/sync/protocol/proto_enum_conversions_unittest.cc
+++ b/sync/protocol/proto_enum_conversions_unittest.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Keep this file in sync with the .proto files in this directory.
-#include "chrome/browser/sync/protocol/proto_enum_conversions.h"
+#include "sync/protocol/proto_enum_conversions.h"
#include <string>
diff --git a/chrome/browser/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index ce8e749..009c030 100644
--- a/chrome/browser/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -4,14 +4,13 @@
// Keep this file in sync with the .proto files in this directory.
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
+#include "sync/protocol/proto_value_conversions.h"
#include "base/base64.h"
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/string_number_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/protocol/proto_enum_conversions.h"
#include "sync/protocol/app_notification_specifics.pb.h"
#include "sync/protocol/app_setting_specifics.pb.h"
#include "sync/protocol/app_specifics.pb.h"
@@ -23,6 +22,7 @@
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/protocol/preference_specifics.pb.h"
+#include "sync/protocol/proto_enum_conversions.h"
#include "sync/protocol/search_engine_specifics.pb.h"
#include "sync/protocol/session_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
diff --git a/chrome/browser/sync/protocol/proto_value_conversions.h b/sync/protocol/proto_value_conversions.h
index fb32326..79bf1b1 100644
--- a/chrome/browser/sync/protocol/proto_value_conversions.h
+++ b/sync/protocol/proto_value_conversions.h
@@ -4,8 +4,8 @@
// Keep this file in sync with the .proto files in this directory.
-#ifndef CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
-#define CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
+#ifndef SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
+#define SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
#pragma once
namespace base {
@@ -139,4 +139,4 @@ base::DictionaryValue* EntitySpecificsToValue(
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
+#endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_
diff --git a/chrome/browser/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc
index 005c267..3d96378 100644
--- a/chrome/browser/sync/protocol/proto_value_conversions_unittest.cc
+++ b/sync/protocol/proto_value_conversions_unittest.cc
@@ -4,11 +4,10 @@
// Keep this file in sync with the .proto files in this directory.
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
+#include "sync/protocol/proto_value_conversions.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "sync/protocol/app_notification_specifics.pb.h"
#include "sync/protocol/app_setting_specifics.pb.h"
#include "sync/protocol/app_specifics.pb.h"
@@ -25,6 +24,7 @@
#include "sync/protocol/sync.pb.h"
#include "sync/protocol/theme_specifics.pb.h"
#include "sync/protocol/typed_url_specifics.pb.h"
+#include "sync/syncable/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/protocol/service_constants.h b/sync/protocol/service_constants.h
index ef80043..83a65b1 100644
--- a/chrome/browser/sync/protocol/service_constants.h
+++ b/sync/protocol/service_constants.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Product-specific constants.
-#ifndef CHROME_BROWSER_SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
-#define CHROME_BROWSER_SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
+#ifndef SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
+#define SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
#pragma once
// These fixed service names are used to obtain auth cookies for the
@@ -20,4 +20,4 @@
#define PRODUCT_NAME_STRING PRODUCT_NAME_STRING_NARROW
#define PRODUCT_NAME_STRING_WIDE L##PRODUCT_NAME_STRING
-#endif // CHROME_BROWSER_SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
+#endif // SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
diff --git a/chrome/browser/sync/protocol/sync_protocol_error.cc b/sync/protocol/sync_protocol_error.cc
index 7727f41..544d98a 100644
--- a/chrome/browser/sync/protocol/sync_protocol_error.cc
+++ b/sync/protocol/sync_protocol_error.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
+#include "sync/protocol/sync_protocol_error.h"
#include <string>
diff --git a/chrome/browser/sync/protocol/sync_protocol_error.h b/sync/protocol/sync_protocol_error.h
index 0729989..9ae5317 100644
--- a/chrome/browser/sync/protocol/sync_protocol_error.h
+++ b/sync/protocol/sync_protocol_error.h
@@ -1,14 +1,14 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
-#define CHROME_BROWSER_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
+#ifndef SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
+#define SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
#pragma once
#include <string>
#include "base/values.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync{
@@ -77,5 +77,5 @@ struct SyncProtocolError {
const char* GetSyncErrorTypeString(SyncProtocolErrorType type);
const char* GetClientActionString(ClientAction action);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
+#endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
diff --git a/sync/sessions/DEPS b/sync/sessions/DEPS
new file mode 100644
index 0000000..a320b0d
--- /dev/null
+++ b/sync/sessions/DEPS
@@ -0,0 +1,7 @@
+include_rules = [
+ "+sync/engine",
+ "+sync/protocol",
+ "+sync/syncable",
+ "+sync/test",
+ "+sync/util",
+]
diff --git a/chrome/browser/sync/sessions/debug_info_getter.h b/sync/sessions/debug_info_getter.h
index f7fe7e7..257a853 100644
--- a/chrome/browser/sync/sessions/debug_info_getter.h
+++ b/sync/sessions/debug_info_getter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SESSIONS_DEBUG_INFO_GETTER_H_
-#define CHROME_BROWSER_SYNC_SESSIONS_DEBUG_INFO_GETTER_H_
+#ifndef SYNC_SESSIONS_DEBUG_INFO_GETTER_H_
+#define SYNC_SESSIONS_DEBUG_INFO_GETTER_H_
#include "sync/protocol/sync.pb.h"
@@ -23,5 +23,5 @@ class DebugInfoGetter {
} // namespace sessions
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_SESSIONS_DEBUG_INFO_GETTER_H_
+#endif // SYNC_SESSIONS_DEBUG_INFO_GETTER_H_
diff --git a/chrome/browser/sync/sessions/ordered_commit_set.cc b/sync/sessions/ordered_commit_set.cc
index 9ec6039..51a354e 100644
--- a/chrome/browser/sync/sessions/ordered_commit_set.cc
+++ b/sync/sessions/ordered_commit_set.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/ordered_commit_set.h"
+#include "sync/sessions/ordered_commit_set.h"
#include <algorithm>
diff --git a/chrome/browser/sync/sessions/ordered_commit_set.h b/sync/sessions/ordered_commit_set.h
index 0e2daf5..8551c07 100644
--- a/chrome/browser/sync/sessions/ordered_commit_set.h
+++ b/sync/sessions/ordered_commit_set.h
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
-#define CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
+#ifndef SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
+#define SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
#pragma once
#include <map>
#include <set>
#include <vector>
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable_id.h"
namespace browser_sync {
namespace sessions {
@@ -115,5 +115,5 @@ class OrderedCommitSet {
} // namespace sessions
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
+#endif // SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
diff --git a/chrome/browser/sync/sessions/ordered_commit_set_unittest.cc b/sync/sessions/ordered_commit_set_unittest.cc
index cf1f4d9..fee37bf 100644
--- a/chrome/browser/sync/sessions/ordered_commit_set_unittest.cc
+++ b/sync/sessions/ordered_commit_set_unittest.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "sync/sessions/ordered_commit_set.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "chrome/browser/sync/sessions/ordered_commit_set.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
using std::vector;
diff --git a/chrome/browser/sync/sessions/session_state.cc b/sync/sessions/session_state.cc
index c9fd813..a6655f9 100644
--- a/chrome/browser/sync/sessions/session_state.cc
+++ b/sync/sessions/session_state.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/session_state.h"
+#include "sync/sessions/session_state.h"
#include <map>
#include <set>
@@ -14,7 +14,7 @@
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "chrome/browser/sync/protocol/proto_enum_conversions.h"
+#include "sync/protocol/proto_enum_conversions.h"
using std::set;
using std::vector;
diff --git a/chrome/browser/sync/sessions/session_state.h b/sync/sessions/session_state.h
index 994e983..676fe5b 100644
--- a/chrome/browser/sync/sessions/session_state.h
+++ b/sync/sessions/session_state.h
@@ -9,8 +9,8 @@
// separation this file provides allows clients to only include the parts they
// need rather than the entire session stack.
-#ifndef CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_
-#define CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_
+#ifndef SYNC_SESSIONS_SESSION_STATE_H_
+#define SYNC_SESSIONS_SESSION_STATE_H_
#pragma once
#include <map>
@@ -20,13 +20,13 @@
#include <vector>
#include "base/basictypes.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/sessions/ordered_commit_set.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/engine/syncproto.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/sessions/ordered_commit_set.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
+#include "sync/syncable/syncable.h"
namespace base {
class DictionaryValue;
@@ -326,4 +326,4 @@ struct PerModelSafeGroupState {
} // namespace sessions
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_STATE_H_
+#endif // SYNC_SESSIONS_SESSION_STATE_H_
diff --git a/chrome/browser/sync/sessions/session_state_unittest.cc b/sync/sessions/session_state_unittest.cc
index 7b0e8b9..b18964a 100644
--- a/chrome/browser/sync/sessions/session_state_unittest.cc
+++ b/sync/sessions/session_state_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/session_state.h"
+#include "sync/sessions/session_state.h"
#include <string>
diff --git a/chrome/browser/sync/sessions/status_controller.cc b/sync/sessions/status_controller.cc
index 262cb89..2ae1a96 100644
--- a/chrome/browser/sync/sessions/status_controller.cc
+++ b/sync/sessions/status_controller.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/status_controller.h"
+#include "sync/sessions/status_controller.h"
#include <vector>
#include "base/basictypes.h"
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/protocol/sync_protocol_error.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
namespace sessions {
diff --git a/chrome/browser/sync/sessions/status_controller.h b/sync/sessions/status_controller.h
index f4fb4ec..6a2491c 100644
--- a/chrome/browser/sync/sessions/status_controller.h
+++ b/sync/sessions/status_controller.h
@@ -29,18 +29,18 @@
// so that various parts of the sync engine can avoid broadcasting
// notifications if no changes occurred.
-#ifndef CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_
-#define CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_
+#ifndef SYNC_SESSIONS_STATUS_CONTROLLER_H_
+#define SYNC_SESSIONS_STATUS_CONTROLLER_H_
#pragma once
-#include <vector>
#include <map>
+#include <vector>
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/time.h"
-#include "chrome/browser/sync/sessions/ordered_commit_set.h"
-#include "chrome/browser/sync/sessions/session_state.h"
+#include "sync/sessions/ordered_commit_set.h"
+#include "sync/sessions/session_state.h"
namespace browser_sync {
namespace sessions {
@@ -294,4 +294,4 @@ class ScopedModelSafeGroupRestriction {
}
}
-#endif // CHROME_BROWSER_SYNC_SESSIONS_STATUS_CONTROLLER_H_
+#endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_
diff --git a/chrome/browser/sync/sessions/status_controller_unittest.cc b/sync/sessions/status_controller_unittest.cc
index 24827d8..59d3919 100644
--- a/chrome/browser/sync/sessions/status_controller_unittest.cc
+++ b/sync/sessions/status_controller_unittest.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc
index ff07ee27..2a93b44 100644
--- a/chrome/browser/sync/sessions/sync_session.cc
+++ b/sync/sessions/sync_session.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/sync_session.h"
+#include "sync/sessions/sync_session.h"
#include <algorithm>
#include "base/logging.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
namespace browser_sync {
namespace sessions {
diff --git a/chrome/browser/sync/sessions/sync_session.h b/sync/sessions/sync_session.h
index 6b21ea1..1dfe78c 100644
--- a/chrome/browser/sync/sessions/sync_session.h
+++ b/sync/sessions/sync_session.h
@@ -11,8 +11,8 @@
// server updates, and access the SyncSessionContext for the current session
// via SyncSession instances.
-#ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_H_
-#define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_H_
+#ifndef SYNC_SESSIONS_SYNC_SESSION_H_
+#define SYNC_SESSIONS_SYNC_SESSION_H_
#pragma once
#include <map>
@@ -24,13 +24,13 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/sessions/ordered_commit_set.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/sessions/status_controller.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/sessions/ordered_commit_set.h"
+#include "sync/sessions/session_state.h"
+#include "sync/sessions/status_controller.h"
+#include "sync/sessions/sync_session_context.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/extensions_activity_monitor.h"
namespace syncable {
class WriteTransaction;
@@ -237,4 +237,4 @@ class ScopedSetSessionWriteTransaction {
} // namespace sessions
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_H_
+#endif // SYNC_SESSIONS_SYNC_SESSION_H_
diff --git a/chrome/browser/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc
index 21ca1c5..2001e7f 100644
--- a/chrome/browser/sync/sessions/sync_session_context.cc
+++ b/sync/sessions/sync_session_context.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/sync_session_context.h"
+#include "sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/sessions/debug_info_getter.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
+#include "sync/sessions/debug_info_getter.h"
+#include "sync/sessions/session_state.h"
+#include "sync/util/extensions_activity_monitor.h"
namespace browser_sync {
namespace sessions {
diff --git a/chrome/browser/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
index e911776b..94129ce 100644
--- a/chrome/browser/sync/sessions/sync_session_context.h
+++ b/sync/sessions/sync_session_context.h
@@ -15,8 +15,8 @@
//
// It can only be used from the SyncerThread.
-#ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
-#define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
+#ifndef SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
+#define SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
#pragma once
#include <map>
@@ -25,9 +25,9 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/sessions/debug_info_getter.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/sessions/debug_info_getter.h"
namespace syncable {
class Directory;
@@ -205,4 +205,4 @@ class ScopedSessionContextConflictResolver {
} // namespace sessions
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
+#endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
diff --git a/chrome/browser/sync/sessions/sync_session_context_unittest.cc b/sync/sessions/sync_session_context_unittest.cc
index 931937cfd5..0e1fbf3 100644
--- a/chrome/browser/sync/sessions/sync_session_context_unittest.cc
+++ b/sync/sessions/sync_session_context_unittest.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/sync_session_context.h"
+#include "sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc
index d3fccff..1f87018 100644
--- a/chrome/browser/sync/sessions/sync_session_unittest.cc
+++ b/sync/sessions/sync_session_unittest.cc
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/sync_session.h"
+#include "sync/sessions/sync_session.h"
#include "base/compiler_specific.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop.h"
-#include "chrome/browser/sync/engine/conflict_resolver.h"
-#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/sessions/session_state.h"
-#include "chrome/browser/sync/sessions/status_controller.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
-#include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
+#include "sync/engine/conflict_resolver.h"
+#include "sync/engine/syncer_types.h"
+#include "sync/sessions/session_state.h"
+#include "sync/sessions/status_controller.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
+#include "sync/test/fake_extensions_activity_monitor.h"
#include "testing/gtest/include/gtest/gtest.h"
using syncable::WriteTransaction;
diff --git a/chrome/browser/sync/sessions/test_util.cc b/sync/sessions/test_util.cc
index fdd5537..7e9b54b 100644
--- a/chrome/browser/sync/sessions/test_util.cc
+++ b/sync/sessions/test_util.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/sessions/test_util.h"
+#include "sync/sessions/test_util.h"
namespace browser_sync {
namespace sessions {
diff --git a/chrome/browser/sync/sessions/test_util.h b/sync/sessions/test_util.h
index de22269..b8ecf8f 100644
--- a/chrome/browser/sync/sessions/test_util.h
+++ b/sync/sessions/test_util.h
@@ -1,16 +1,16 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Utils to simulate various outcomes of a sync session.
-#ifndef CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
-#define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
+#ifndef SYNC_SESSIONS_TEST_UTIL_H_
+#define SYNC_SESSIONS_TEST_UTIL_H_
#pragma once
-#include "chrome/browser/sync/engine/syncer.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "testing/gtest/include/gtest/gtest.h"
+#include "sync/engine/syncer.h"
+#include "sync/sessions/sync_session.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
namespace sessions {
@@ -47,4 +47,4 @@ ACTION_P(SimulateSessionsCommitDelayUpdate, poll) {
} // namespace sessions
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
+#endif // SYNC_SESSIONS_TEST_UTIL_H_
diff --git a/sync/sync.gyp b/sync/sync.gyp
new file mode 100644
index 0000000..07e6b04
--- /dev/null
+++ b/sync/sync.gyp
@@ -0,0 +1,351 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ # The core sync library.
+ #
+ # TODO(akalin): Rename this to something like 'sync_core' and
+ # reserve the 'sync' name for the overarching library that clients
+ # should depend on.
+ {
+ 'target_name': 'sync',
+ 'type': 'static_library',
+ 'variables': { 'enable_wexit_time_destructors': 1, },
+ 'include_dirs': [
+ '..',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../build/temp_gyp/googleurl.gyp:googleurl',
+ '../crypto/crypto.gyp:crypto',
+ '../net/net.gyp:net',
+ '../sql/sql.gyp:sql',
+ 'protocol/sync_proto.gyp:sync_proto',
+ ],
+ 'export_dependent_settings': [
+ '../base/base.gyp:base',
+ '../build/temp_gyp/googleurl.gyp:googleurl',
+ '../crypto/crypto.gyp:crypto',
+ '../net/net.gyp:net',
+ '../sql/sql.gyp:sql',
+ 'protocol/sync_proto.gyp:sync_proto',
+ ],
+ 'sources': [
+ 'engine/apply_updates_command.cc',
+ 'engine/apply_updates_command.h',
+ 'engine/build_commit_command.cc',
+ 'engine/build_commit_command.h',
+ 'engine/cleanup_disabled_types_command.cc',
+ 'engine/cleanup_disabled_types_command.h',
+ 'engine/clear_data_command.cc',
+ 'engine/clear_data_command.h',
+ 'engine/conflict_resolver.cc',
+ 'engine/conflict_resolver.h',
+ 'engine/download_updates_command.cc',
+ 'engine/download_updates_command.h',
+ 'engine/get_commit_ids_command.cc',
+ 'engine/get_commit_ids_command.h',
+ 'engine/model_changing_syncer_command.cc',
+ 'engine/model_changing_syncer_command.h',
+ 'engine/model_safe_worker.cc',
+ 'engine/model_safe_worker.h',
+ 'engine/passive_model_worker.cc',
+ 'engine/passive_model_worker.h',
+ 'engine/net/server_connection_manager.cc',
+ 'engine/net/server_connection_manager.h',
+ 'engine/net/url_translator.cc',
+ 'engine/net/url_translator.h',
+ 'engine/nigori_util.cc',
+ 'engine/nigori_util.h',
+ 'engine/nudge_source.cc',
+ 'engine/nudge_source.h',
+ 'engine/polling_constants.cc',
+ 'engine/polling_constants.h',
+ 'engine/post_commit_message_command.cc',
+ 'engine/post_commit_message_command.h',
+ 'engine/process_commit_response_command.cc',
+ 'engine/process_commit_response_command.h',
+ 'engine/process_updates_command.cc',
+ 'engine/process_updates_command.h',
+ 'engine/resolve_conflicts_command.cc',
+ 'engine/resolve_conflicts_command.h',
+ 'engine/store_timestamps_command.cc',
+ 'engine/store_timestamps_command.h',
+ 'engine/syncer.cc',
+ 'engine/syncer.h',
+ 'engine/syncer_command.cc',
+ 'engine/syncer_command.h',
+ 'engine/syncer_proto_util.cc',
+ 'engine/syncer_proto_util.h',
+ 'engine/sync_scheduler.cc',
+ 'engine/sync_scheduler.h',
+ 'engine/syncer_types.cc',
+ 'engine/syncer_types.h',
+ 'engine/syncer_util.cc',
+ 'engine/syncer_util.h',
+ 'engine/syncproto.h',
+ 'engine/update_applicator.cc',
+ 'engine/update_applicator.h',
+ 'engine/verify_updates_command.cc',
+ 'engine/verify_updates_command.h',
+ 'js/js_arg_list.cc',
+ 'js/js_arg_list.h',
+ 'js/js_backend.h',
+ 'js/js_controller.h',
+ 'js/js_event_details.cc',
+ 'js/js_event_details.h',
+ 'js/js_event_handler.h',
+ 'js/js_reply_handler.h',
+ 'js/sync_js_controller.cc',
+ 'js/sync_js_controller.h',
+ 'protocol/proto_enum_conversions.cc',
+ 'protocol/proto_enum_conversions.h',
+ 'protocol/proto_value_conversions.cc',
+ 'protocol/proto_value_conversions.h',
+ 'protocol/service_constants.h',
+ 'protocol/sync_protocol_error.cc',
+ 'protocol/sync_protocol_error.h',
+ 'sessions/debug_info_getter.h',
+ 'sessions/ordered_commit_set.cc',
+ 'sessions/ordered_commit_set.h',
+ 'sessions/session_state.cc',
+ 'sessions/session_state.h',
+ 'sessions/status_controller.cc',
+ 'sessions/status_controller.h',
+ 'sessions/sync_session.cc',
+ 'sessions/sync_session.h',
+ 'sessions/sync_session_context.cc',
+ 'sessions/sync_session_context.h',
+ 'syncable/blob.h',
+ 'syncable/directory_backing_store.cc',
+ 'syncable/directory_backing_store.h',
+ 'syncable/directory_change_delegate.h',
+ 'syncable/dir_open_result.h',
+ 'syncable/in_memory_directory_backing_store.cc',
+ 'syncable/in_memory_directory_backing_store.h',
+ 'syncable/model_type.cc',
+ 'syncable/model_type.h',
+ 'syncable/model_type_payload_map.cc',
+ 'syncable/model_type_payload_map.h',
+ 'syncable/on_disk_directory_backing_store.cc',
+ 'syncable/on_disk_directory_backing_store.h',
+ 'syncable/syncable.cc',
+ 'syncable/syncable_changes_version.h',
+ 'syncable/syncable_columns.h',
+ 'syncable/syncable_enum_conversions.cc',
+ 'syncable/syncable_enum_conversions.h',
+ 'syncable/syncable.h',
+ 'syncable/syncable_id.cc',
+ 'syncable/syncable_id.h',
+ 'syncable/syncable-inl.h',
+ 'syncable/transaction_observer.h',
+ 'util/cryptographer.cc',
+ 'util/cryptographer.h',
+
+ # TODO(akalin): Figure out a better place to put
+ # data_encryption_win*; it's also used by autofill.
+ 'util/data_encryption_win.cc',
+ 'util/data_encryption_win.h',
+
+ 'util/data_type_histogram.h',
+ 'util/encryptor.h',
+ 'util/enum_set.h',
+ 'util/extensions_activity_monitor.cc',
+ 'util/extensions_activity_monitor.h',
+ 'util/get_session_name.cc',
+ 'util/get_session_name.h',
+ 'util/get_session_name_mac.mm',
+ 'util/get_session_name_mac.h',
+ 'util/get_session_name_win.cc',
+ 'util/get_session_name_win.h',
+ 'util/immutable.h',
+ 'util/logging.cc',
+ 'util/logging.h',
+ 'util/nigori.cc',
+ 'util/nigori.h',
+ 'util/report_unrecoverable_error_function.h',
+ 'util/syncer_error.cc',
+ 'util/syncer_error.h',
+ 'util/time.cc',
+ 'util/time.h',
+ 'util/unrecoverable_error_handler.h',
+ 'util/unrecoverable_error_info.h',
+ 'util/unrecoverable_error_info.cc',
+ 'util/weak_handle.cc',
+ 'util/weak_handle.h',
+ ],
+ },
+
+ # Test support files for the 'sync' target.
+ {
+ 'target_name': 'test_support_sync',
+ 'type': 'static_library',
+ 'variables': { 'enable_wexit_time_destructors': 1, },
+ 'include_dirs': [
+ '..',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../testing/gmock.gyp:gmock',
+ '../testing/gtest.gyp:gtest',
+ 'sync',
+ ],
+ 'export_dependent_settings': [
+ '../base/base.gyp:base',
+ '../testing/gmock.gyp:gmock',
+ '../testing/gtest.gyp:gtest',
+ 'sync',
+ ],
+ 'sources': [
+ 'js/js_test_util.cc',
+ 'js/js_test_util.h',
+ 'sessions/test_util.cc',
+ 'sessions/test_util.h',
+ 'syncable/model_type_test_util.cc',
+ 'syncable/model_type_test_util.h',
+ 'syncable/syncable_mock.cc',
+ 'syncable/syncable_mock.h',
+ 'test/fake_encryptor.cc',
+ 'test/fake_encryptor.h',
+ 'test/fake_extensions_activity_monitor.cc',
+ 'test/fake_extensions_activity_monitor.h',
+ 'test/null_directory_change_delegate.cc',
+ 'test/null_directory_change_delegate.h',
+ 'test/null_transaction_observer.cc',
+ 'test/null_transaction_observer.h',
+ 'test/engine/test_directory_setter_upper.cc',
+ 'test/engine/test_directory_setter_upper.h',
+ 'test/engine/fake_model_safe_worker_registrar.cc',
+ 'test/engine/fake_model_safe_worker_registrar.h',
+ 'test/engine/fake_model_worker.cc',
+ 'test/engine/fake_model_worker.h',
+ 'test/engine/mock_connection_manager.cc',
+ 'test/engine/mock_connection_manager.h',
+ 'test/engine/syncer_command_test.cc',
+ 'test/engine/syncer_command_test.h',
+ 'test/engine/test_id_factory.h',
+ 'test/engine/test_syncable_utils.cc',
+ 'test/engine/test_syncable_utils.h',
+ 'test/sessions/test_scoped_session_event_listener.h',
+ 'test/test_directory_backing_store.cc',
+ 'test/test_directory_backing_store.h',
+ 'util/test_unrecoverable_error_handler.cc',
+ 'util/test_unrecoverable_error_handler.h',
+ ],
+ },
+
+ # Unit tests for the 'sync' target. This cannot be a static
+ # library because the unit test files have to be compiled directly
+ # into the executable, so we push the target files to the
+ # depending executable target via direct_dependent_settings.
+ {
+ 'target_name': 'sync_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/base.gyp:test_support_base',
+ '../testing/gmock.gyp:gmock',
+ '../testing/gtest.gyp:gtest',
+ 'sync',
+ 'test_support_sync',
+ ],
+ 'export_dependent_settings': [
+ '../base/base.gyp:base',
+ '../base/base.gyp:test_support_base',
+ '../testing/gmock.gyp:gmock',
+ '../testing/gtest.gyp:gtest',
+ 'sync',
+ 'test_support_sync',
+ ],
+ 'direct_dependent_settings': {
+ 'variables': { 'enable_wexit_time_destructors': 1, },
+ 'include_dirs': [
+ '..',
+ ],
+ 'sources': [
+ 'engine/apply_updates_command_unittest.cc',
+ 'engine/build_commit_command_unittest.cc',
+ 'engine/clear_data_command_unittest.cc',
+ 'engine/cleanup_disabled_types_command_unittest.cc',
+ 'engine/download_updates_command_unittest.cc',
+ 'engine/model_changing_syncer_command_unittest.cc',
+ 'engine/model_safe_worker_unittest.cc',
+ 'engine/nigori_util_unittest.cc',
+ 'engine/process_commit_response_command_unittest.cc',
+ 'engine/process_updates_command_unittest.cc',
+ 'engine/resolve_conflicts_command_unittest.cc',
+ 'engine/syncer_proto_util_unittest.cc',
+ 'engine/sync_scheduler_unittest.cc',
+ 'engine/sync_scheduler_whitebox_unittest.cc',
+ 'engine/syncer_unittest.cc',
+ 'engine/syncproto_unittest.cc',
+ 'engine/verify_updates_command_unittest.cc',
+ 'js/js_arg_list_unittest.cc',
+ 'js/js_event_details_unittest.cc',
+ 'js/sync_js_controller_unittest.cc',
+ 'protocol/proto_enum_conversions_unittest.cc',
+ 'protocol/proto_value_conversions_unittest.cc',
+ 'sessions/ordered_commit_set_unittest.cc',
+ 'sessions/session_state_unittest.cc',
+ 'sessions/status_controller_unittest.cc',
+ 'sessions/sync_session_context_unittest.cc',
+ 'sessions/sync_session_unittest.cc',
+ 'syncable/directory_backing_store_unittest.cc',
+ 'syncable/model_type_payload_map_unittest.cc',
+ 'syncable/model_type_unittest.cc',
+ 'syncable/syncable_enum_conversions_unittest.cc',
+ 'syncable/syncable_id_unittest.cc',
+ 'syncable/syncable_unittest.cc',
+ 'util/cryptographer_unittest.cc',
+ 'util/data_encryption_win_unittest.cc',
+ 'util/data_type_histogram_unittest.cc',
+ 'util/enum_set_unittest.cc',
+ 'util/get_session_name_unittest.cc',
+ 'util/immutable_unittest.cc',
+ 'util/nigori_unittest.cc',
+ 'util/protobuf_unittest.cc',
+ 'util/weak_handle_unittest.cc',
+ ],
+ },
+ },
+
+ # The unit test executable for sync tests. Currently this isn't
+ # automatically run, as there is already a sync_unit_tests
+ # executable in chrome.gyp; this is just to make sure that all the
+ # link-time dependencies for the files in the targets above
+ # resolve.
+ #
+ # TODO(akalin): Rename this to sync_unit_tests once we've moved
+ # everything from chrome.gyp.
+ #
+ # TODO(akalin): Make base.gyp have a test_main target that
+ # includes run_all_unittests.cc and the possible tcmalloc
+ # dependency and use that everywhere.
+ {
+ 'target_name': 'sync_unit_tests_canary',
+ 'type': 'executable',
+ 'sources': [
+ '../base/test/run_all_unittests.cc',
+ ],
+ 'dependencies': [
+ 'sync_tests',
+ ],
+
+ # TODO(akalin): This is needed because histogram.cc uses
+ # leak_annotations.h, which pulls this in. Make 'base'
+ # propagate this dependency.
+ 'conditions': [
+ ['OS=="linux" and linux_use_tcmalloc==1', {
+ 'dependencies': [
+ '../base/allocator/allocator.gyp:allocator',
+ ],
+ }],
+ ],
+ },
+ ],
+}
diff --git a/sync/syncable/DEPS b/sync/syncable/DEPS
new file mode 100644
index 0000000..cb86572
--- /dev/null
+++ b/sync/syncable/DEPS
@@ -0,0 +1,13 @@
+include_rules = [
+ "+net/base/escape.h",
+ "+sql",
+ "+sync/protocol",
+ "+sync/test",
+ "+sync/util",
+
+ # this file is weird.
+ "+sync/engine/syncproto.h",
+
+ # maybe this file should live in syncable?
+ "+sync/engine/model_safe_worker.h",
+]
diff --git a/chrome/browser/sync/syncable/blob.h b/sync/syncable/blob.h
index 54d1d00..7266763 100644
--- a/chrome/browser/sync/syncable/blob.h
+++ b/sync/syncable/blob.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_BLOB_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_BLOB_H_
+#ifndef SYNC_SYNCABLE_BLOB_H_
+#define SYNC_SYNCABLE_BLOB_H_
#pragma once
#include <vector>
@@ -16,4 +16,4 @@ typedef std::vector<uint8> Blob;
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_BLOB_H_
+#endif // SYNC_SYNCABLE_BLOB_H_
diff --git a/chrome/browser/sync/syncable/dir_open_result.h b/sync/syncable/dir_open_result.h
index 4f082d5..6138a26 100644
--- a/chrome/browser/sync/syncable/dir_open_result.h
+++ b/sync/syncable/dir_open_result.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_DIR_OPEN_RESULT_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_DIR_OPEN_RESULT_H_
+#ifndef SYNC_SYNCABLE_DIR_OPEN_RESULT_H_
+#define SYNC_SYNCABLE_DIR_OPEN_RESULT_H_
#pragma once
namespace syncable {
@@ -17,4 +17,4 @@ enum DirOpenResult { OPENED, // success.
};
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_DIR_OPEN_RESULT_H_
+#endif // SYNC_SYNCABLE_DIR_OPEN_RESULT_H_
diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/sync/syncable/directory_backing_store.cc
index c409be4..c7395c3 100644
--- a/chrome/browser/sync/syncable/directory_backing_store.cc
+++ b/sync/syncable/directory_backing_store.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
+#include "sync/syncable/directory_backing_store.h"
#include "build/build_config.h"
@@ -18,15 +18,15 @@
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
#include "base/time.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/syncable/syncable-inl.h"
-#include "chrome/browser/sync/syncable/syncable_columns.h"
-#include "chrome/browser/sync/util/time.h"
#include "sql/connection.h"
#include "sql/statement.h"
#include "sql/transaction.h"
#include "sync/protocol/bookmark_specifics.pb.h"
+#include "sync/protocol/service_constants.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/syncable/syncable-inl.h"
+#include "sync/syncable/syncable_columns.h"
+#include "sync/util/time.h"
using std::string;
@@ -969,7 +969,9 @@ bool DirectoryBackingStore::CreateTables() {
s.BindString(0, dir_name_); // id
s.BindString(1, dir_name_); // name
s.BindString(2, ""); // store_birthday
- s.BindString(3, SYNC_ENGINE_VERSION_STRING); // db_create_version
+ // TODO(akalin): Remove this unused db_create_version field. (Or
+ // actually use it for something.) http://crbug.com/118356
+ s.BindString(3, "Unknown"); // db_create_version
s.BindInt(4, static_cast<int32>(time(0))); // db_create_time
s.BindString(5, GenerateCacheGUID()); // cache_guid
s.BindBlob(6, NULL, 0); // notification_state
diff --git a/chrome/browser/sync/syncable/directory_backing_store.h b/sync/syncable/directory_backing_store.h
index caafdf8..4c9bd846 100644
--- a/chrome/browser/sync/syncable/directory_backing_store.h
+++ b/sync/syncable/directory_backing_store.h
@@ -2,19 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_
+#ifndef SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_
+#define SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_
#pragma once
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
-#include "chrome/browser/sync/syncable/dir_open_result.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
#include "sql/connection.h"
#include "sql/statement.h"
+#include "sync/syncable/dir_open_result.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
namespace sync_pb {
class EntitySpecifics;
@@ -163,4 +163,4 @@ class DirectoryBackingStore : public base::NonThreadSafe {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_
+#endif // SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_
diff --git a/chrome/browser/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc
index 0863ce0..5161817 100644
--- a/chrome/browser/sync/syncable/directory_backing_store_unittest.cc
+++ b/sync/syncable/directory_backing_store_unittest.cc
@@ -12,12 +12,12 @@
#include "base/scoped_temp_dir.h"
#include "base/stl_util.h"
#include "base/string_number_conversions.h"
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
-#include "chrome/browser/sync/syncable/on_disk_directory_backing_store.h"
-#include "chrome/browser/sync/syncable/syncable-inl.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/test_directory_backing_store.h"
-#include "chrome/browser/sync/util/time.h"
+#include "sync/syncable/directory_backing_store.h"
+#include "sync/syncable/on_disk_directory_backing_store.h"
+#include "sync/syncable/syncable-inl.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/test_directory_backing_store.h"
+#include "sync/util/time.h"
#include "sql/connection.h"
#include "sql/statement.h"
#include "sync/protocol/bookmark_specifics.pb.h"
diff --git a/chrome/browser/sync/syncable/directory_change_delegate.h b/sync/syncable/directory_change_delegate.h
index c6552cd..e3b0f45 100644
--- a/chrome/browser/sync/syncable/directory_change_delegate.h
+++ b/sync/syncable/directory_change_delegate.h
@@ -1,13 +1,13 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
+#ifndef SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
+#define SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
#pragma once
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
namespace syncable {
@@ -42,4 +42,4 @@ class DirectoryChangeDelegate {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
+#endif // SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
diff --git a/chrome/browser/sync/syncable/in_memory_directory_backing_store.cc b/sync/syncable/in_memory_directory_backing_store.cc
index 536f1a9..30d3e19 100644
--- a/chrome/browser/sync/syncable/in_memory_directory_backing_store.cc
+++ b/sync/syncable/in_memory_directory_backing_store.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/in_memory_directory_backing_store.h"
+#include "sync/syncable/in_memory_directory_backing_store.h"
namespace syncable {
diff --git a/chrome/browser/sync/syncable/in_memory_directory_backing_store.h b/sync/syncable/in_memory_directory_backing_store.h
index b8c91e4..15f3171 100644
--- a/chrome/browser/sync/syncable/in_memory_directory_backing_store.h
+++ b/sync/syncable/in_memory_directory_backing_store.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
+#ifndef SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
+#define SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
#pragma once
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
+#include "sync/syncable/directory_backing_store.h"
namespace syncable {
@@ -29,4 +29,4 @@ class InMemoryDirectoryBackingStore : public DirectoryBackingStore {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
+#endif // SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
diff --git a/chrome/browser/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index 58385d3..3b53a90 100644
--- a/chrome/browser/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
#include "base/string_split.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/syncproto.h"
+#include "sync/engine/syncproto.h"
#include "sync/protocol/app_notification_specifics.pb.h"
#include "sync/protocol/app_setting_specifics.pb.h"
#include "sync/protocol/app_specifics.pb.h"
diff --git a/chrome/browser/sync/syncable/model_type.h b/sync/syncable/model_type.h
index 115d5a0..133af9c 100644
--- a/chrome/browser/sync/syncable/model_type.h
+++ b/sync/syncable/model_type.h
@@ -6,8 +6,8 @@
// Each sync object is expected to have an immutable object type.
// An object's type is inferred from the type of data it holds.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_
+#ifndef SYNC_SYNCABLE_MODEL_TYPE_H_
+#define SYNC_SYNCABLE_MODEL_TYPE_H_
#pragma once
#include <set>
@@ -15,7 +15,7 @@
#include "base/logging.h"
#include "base/time.h"
-#include "chrome/browser/sync/util/enum_set.h"
+#include "sync/util/enum_set.h"
namespace base {
class ListValue;
@@ -172,4 +172,4 @@ bool IsRealDataType(ModelType model_type);
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_
+#endif // SYNC_SYNCABLE_MODEL_TYPE_H_
diff --git a/chrome/browser/sync/syncable/model_type_payload_map.cc b/sync/syncable/model_type_payload_map.cc
index 7c73ba9..dde1cd8 100644
--- a/chrome/browser/sync/syncable/model_type_payload_map.cc
+++ b/sync/syncable/model_type_payload_map.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
+#include "sync/syncable/model_type_payload_map.h"
#include <vector>
diff --git a/chrome/browser/sync/syncable/model_type_payload_map.h b/sync/syncable/model_type_payload_map.h
index c390d20a..f46f743 100644
--- a/chrome/browser/sync/syncable/model_type_payload_map.h
+++ b/sync/syncable/model_type_payload_map.h
@@ -1,18 +1,18 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Definition of ModelTypePayloadMap and various utility functions.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
+#ifndef SYNC_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
+#define SYNC_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
#pragma once
#include <map>
#include <string>
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/syncable/model_type.h"
namespace base {
class DictionaryValue;
@@ -57,4 +57,4 @@ void PurgeStalePayload(ModelTypePayloadMap* original,
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
+#endif // SYNC_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
diff --git a/chrome/browser/sync/syncable/model_type_payload_map_unittest.cc b/sync/syncable/model_type_payload_map_unittest.cc
index 28e30f9..27e36a1 100644
--- a/chrome/browser/sync/syncable/model_type_payload_map_unittest.cc
+++ b/sync/syncable/model_type_payload_map_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
+#include "sync/syncable/model_type_payload_map.h"
#include <string>
diff --git a/chrome/browser/sync/syncable/model_type_test_util.cc b/sync/syncable/model_type_test_util.cc
index 49d0b73..a3b6742 100644
--- a/chrome/browser/sync/syncable/model_type_test_util.cc
+++ b/sync/syncable/model_type_test_util.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/model_type_test_util.h"
+#include "sync/syncable/model_type_test_util.h"
namespace syncable {
diff --git a/chrome/browser/sync/syncable/model_type_test_util.h b/sync/syncable/model_type_test_util.h
index a3b707e..a852a07 100644
--- a/chrome/browser/sync/syncable/model_type_test_util.h
+++ b/sync/syncable/model_type_test_util.h
@@ -1,14 +1,14 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
+#ifndef SYNC_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
+#define SYNC_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
#pragma once
#include <ostream>
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace syncable {
@@ -23,4 +23,4 @@ void PrintTo(ModelTypeSet model_types, ::std::ostream* os);
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
+#endif // SYNC_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
diff --git a/chrome/browser/sync/syncable/model_type_unittest.cc b/sync/syncable/model_type_unittest.cc
index f288674..a8925b6 100644
--- a/chrome/browser/sync/syncable/model_type_unittest.cc
+++ b/sync/syncable/model_type_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
#include <string>
diff --git a/chrome/browser/sync/syncable/on_disk_directory_backing_store.cc b/sync/syncable/on_disk_directory_backing_store.cc
index be4c686..22ffb77 100644
--- a/chrome/browser/sync/syncable/on_disk_directory_backing_store.cc
+++ b/sync/syncable/on_disk_directory_backing_store.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/on_disk_directory_backing_store.h"
+#include "sync/syncable/on_disk_directory_backing_store.h"
#include "base/logging.h"
diff --git a/chrome/browser/sync/syncable/on_disk_directory_backing_store.h b/sync/syncable/on_disk_directory_backing_store.h
index 422ef40..9c114a5 100644
--- a/chrome/browser/sync/syncable/on_disk_directory_backing_store.h
+++ b/sync/syncable/on_disk_directory_backing_store.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
+#ifndef SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
+#define SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
#pragma once
#include "base/file_path.h"
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
+#include "sync/syncable/directory_backing_store.h"
namespace syncable {
@@ -27,4 +27,4 @@ class OnDiskDirectoryBackingStore : public DirectoryBackingStore {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
+#endif // SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
diff --git a/chrome/browser/sync/syncable/syncable-inl.h b/sync/syncable/syncable-inl.h
index c5beed9..4e5119f 100644
--- a/chrome/browser/sync/syncable/syncable-inl.h
+++ b/sync/syncable/syncable-inl.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_INL_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_INL_H_
+#ifndef SYNC_SYNCABLE_SYNCABLE_INL_H_
+#define SYNC_SYNCABLE_SYNCABLE_INL_H_
#pragma once
namespace syncable {
@@ -19,4 +19,4 @@ class LessField {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_INL_H_
+#endif // SYNC_SYNCABLE_SYNCABLE_INL_H_
diff --git a/chrome/browser/sync/syncable/syncable.cc b/sync/syncable/syncable.cc
index cdfde0c..e34aa77 100644
--- a/chrome/browser/sync/syncable/syncable.cc
+++ b/sync/syncable/syncable.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
#include <algorithm>
#include <cstring>
@@ -29,20 +29,20 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/sync/protocol/proto_value_conversions.h"
-#include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
-#include "chrome/browser/sync/syncable/directory_change_delegate.h"
-#include "chrome/browser/sync/syncable/in_memory_directory_backing_store.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/on_disk_directory_backing_store.h"
-#include "chrome/browser/sync/syncable/syncable-inl.h"
-#include "chrome/browser/sync/syncable/syncable_changes_version.h"
-#include "chrome/browser/sync/syncable/syncable_columns.h"
-#include "chrome/browser/sync/syncable/syncable_enum_conversions.h"
-#include "chrome/browser/sync/syncable/transaction_observer.h"
-#include "chrome/browser/sync/util/logging.h"
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/protocol/proto_value_conversions.h"
+#include "sync/protocol/service_constants.h"
+#include "sync/syncable/directory_backing_store.h"
+#include "sync/syncable/directory_change_delegate.h"
+#include "sync/syncable/in_memory_directory_backing_store.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/on_disk_directory_backing_store.h"
+#include "sync/syncable/syncable-inl.h"
+#include "sync/syncable/syncable_changes_version.h"
+#include "sync/syncable/syncable_columns.h"
+#include "sync/syncable/syncable_enum_conversions.h"
+#include "sync/syncable/transaction_observer.h"
+#include "sync/util/logging.h"
+#include "sync/util/cryptographer.h"
#include "net/base/escape.h"
namespace {
diff --git a/chrome/browser/sync/syncable/syncable.h b/sync/syncable/syncable.h
index 344e7e0..758dcac 100644
--- a/chrome/browser/sync/syncable/syncable.h
+++ b/sync/syncable/syncable.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_
+#ifndef SYNC_SYNCABLE_SYNCABLE_H_
+#define SYNC_SYNCABLE_SYNCABLE_H_
#pragma once
#include <algorithm>
@@ -26,16 +26,16 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "base/time.h"
-#include "chrome/browser/sync/internal_api/includes/report_unrecoverable_error_function.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
-#include "chrome/browser/sync/syncable/blob.h"
-#include "chrome/browser/sync/syncable/dir_open_result.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/util/cryptographer.h"
-#include "chrome/browser/sync/util/immutable.h"
-#include "chrome/browser/sync/util/time.h"
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/syncable/blob.h"
+#include "sync/syncable/dir_open_result.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable_id.h"
+#include "sync/util/cryptographer.h"
+#include "sync/util/immutable.h"
+#include "sync/util/report_unrecoverable_error_function.h"
+#include "sync/util/unrecoverable_error_handler.h"
+#include "sync/util/time.h"
+#include "sync/util/weak_handle.h"
#include "sync/protocol/sync.pb.h"
namespace base {
@@ -1346,4 +1346,4 @@ bool MarkForSyncing(syncable::MutableEntry* e);
std::ostream& operator <<(std::ostream&, const syncable::Blob&);
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_H_
+#endif // SYNC_SYNCABLE_SYNCABLE_H_
diff --git a/chrome/browser/sync/syncable/syncable_changes_version.h b/sync/syncable/syncable_changes_version.h
index 51cd3f8..38aae2c 100644
--- a/chrome/browser/sync/syncable/syncable_changes_version.h
+++ b/sync/syncable/syncable_changes_version.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_CHANGES_VERSION_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_CHANGES_VERSION_H_
+#ifndef SYNC_SYNCABLE_SYNCABLE_CHANGES_VERSION_H_
+#define SYNC_SYNCABLE_SYNCABLE_CHANGES_VERSION_H_
#pragma once
namespace syncable {
@@ -27,4 +27,4 @@ enum {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_CHANGES_VERSION_H_
+#endif // SYNC_SYNCABLE_SYNCABLE_CHANGES_VERSION_H_
diff --git a/chrome/browser/sync/syncable/syncable_columns.h b/sync/syncable/syncable_columns.h
index b6f3cfb..18a0215 100644
--- a/chrome/browser/sync/syncable/syncable_columns.h
+++ b/sync/syncable/syncable_columns.h
@@ -1,13 +1,13 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_
+#ifndef SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_
+#define SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_
#pragma once
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/syncable/syncable_changes_version.h"
+#include "sync/syncable/syncable.h"
+#include "sync/syncable/syncable_changes_version.h"
namespace syncable {
@@ -71,4 +71,4 @@ static inline const char* ColumnName(int field) {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_
+#endif // SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_
diff --git a/chrome/browser/sync/syncable/syncable_enum_conversions.cc b/sync/syncable/syncable_enum_conversions.cc
index a22a1cf..eaf5edd 100644
--- a/chrome/browser/sync/syncable/syncable_enum_conversions.cc
+++ b/sync/syncable/syncable_enum_conversions.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Keep this file in sync with syncable.h.
-#include "chrome/browser/sync/syncable/syncable_enum_conversions.h"
+#include "sync/syncable/syncable_enum_conversions.h"
#include "base/basictypes.h"
#include "base/logging.h"
diff --git a/chrome/browser/sync/syncable/syncable_enum_conversions.h b/sync/syncable/syncable_enum_conversions.h
index b48cc28..ae251c8 100644
--- a/chrome/browser/sync/syncable/syncable_enum_conversions.h
+++ b/sync/syncable/syncable_enum_conversions.h
@@ -1,14 +1,14 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
+#ifndef SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
+#define SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
#pragma once
// Keep this file in sync with syncable.h.
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
// Utility functions to get the string equivalent for some syncable
// enums.
@@ -42,4 +42,4 @@ const char* GetBitTempString(BitTemp bit_temp);
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
+#endif // SYNC_SYNCABLE_SYNCABLE_ENUM_CONVERSIONS_H_
diff --git a/chrome/browser/sync/syncable/syncable_enum_conversions_unittest.cc b/sync/syncable/syncable_enum_conversions_unittest.cc
index 4d55634..8ce4a40 100644
--- a/chrome/browser/sync/syncable/syncable_enum_conversions_unittest.cc
+++ b/sync/syncable/syncable_enum_conversions_unittest.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Keep this file in sync with syncable.h.
-#include "chrome/browser/sync/syncable/syncable_enum_conversions.h"
+#include "sync/syncable/syncable_enum_conversions.h"
#include <string>
diff --git a/chrome/browser/sync/syncable/syncable_id.cc b/sync/syncable/syncable_id.cc
index a4381f9..f860cb9 100644
--- a/chrome/browser/sync/syncable/syncable_id.cc
+++ b/sync/syncable/syncable_id.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "sync/syncable/syncable_id.h"
#include <iosfwd>
diff --git a/chrome/browser/sync/syncable/syncable_id.h b/sync/syncable/syncable_id.h
index dcd4f99..34f4fcc 100644
--- a/chrome/browser/sync/syncable/syncable_id.h
+++ b/sync/syncable/syncable_id.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_ID_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_ID_H_
+#ifndef SYNC_SYNCABLE_SYNCABLE_ID_H_
+#define SYNC_SYNCABLE_SYNCABLE_ID_H_
#pragma once
#include <iosfwd>
@@ -131,4 +131,4 @@ Id GetNullId();
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_ID_H_
+#endif // SYNC_SYNCABLE_SYNCABLE_ID_H_
diff --git a/chrome/browser/sync/syncable/syncable_id_unittest.cc b/sync/syncable/syncable_id_unittest.cc
index 0349195..67524b3 100644
--- a/chrome/browser/sync/syncable/syncable_id_unittest.cc
+++ b/sync/syncable/syncable_id_unittest.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "sync/syncable/syncable_id.h"
#include <vector>
#include "base/memory/scoped_ptr.h"
#include "base/test/values_test_util.h"
#include "base/values.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
+#include "sync/test/engine/test_id_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
using std::vector;
diff --git a/chrome/browser/sync/syncable/syncable_mock.cc b/sync/syncable/syncable_mock.cc
index 1fb55fa..24990d1 100644
--- a/chrome/browser/sync/syncable/syncable_mock.cc
+++ b/sync/syncable/syncable_mock.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/syncable_mock.h"
+#include "sync/syncable/syncable_mock.h"
#include "base/location.h"
-#include "chrome/browser/sync/test/null_transaction_observer.h"
+#include "sync/test/null_transaction_observer.h"
MockDirectory::MockDirectory(browser_sync::UnrecoverableErrorHandler* handler)
: Directory(&encryptor_, handler, NULL) {
diff --git a/chrome/browser/sync/syncable/syncable_mock.h b/sync/syncable/syncable_mock.h
index 1f8ed48..27fcee8 100644
--- a/chrome/browser/sync/syncable/syncable_mock.h
+++ b/sync/syncable/syncable_mock.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_
+#ifndef SYNC_SYNCABLE_SYNCABLE_MOCK_H_
+#define SYNC_SYNCABLE_SYNCABLE_MOCK_H_
#pragma once
#include <string>
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
-#include "chrome/browser/sync/test/null_directory_change_delegate.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/fake_encryptor.h"
+#include "sync/test/null_directory_change_delegate.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -43,5 +43,5 @@ class MockSyncableWriteTransaction : public syncable::WriteTransaction {
};
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_
+#endif // SYNC_SYNCABLE_SYNCABLE_MOCK_H_
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc
index 282fa7f..20b6840 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/sync/syncable/syncable_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
#include <string>
@@ -19,19 +19,18 @@
#include "base/test/values_test_util.h"
#include "base/threading/platform_thread.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h"
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
-#include "chrome/browser/sync/syncable/directory_change_delegate.h"
-#include "chrome/browser/sync/syncable/on_disk_directory_backing_store.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
-#include "chrome/browser/sync/test/engine/test_syncable_utils.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
-#include "chrome/browser/sync/test/null_directory_change_delegate.h"
-#include "chrome/browser/sync/test/null_transaction_observer.h"
+#include "sync/engine/syncproto.h"
+#include "sync/util/test_unrecoverable_error_handler.h"
+#include "sync/syncable/directory_backing_store.h"
+#include "sync/syncable/directory_change_delegate.h"
+#include "sync/syncable/on_disk_directory_backing_store.h"
+#include "sync/test/engine/test_id_factory.h"
+#include "sync/test/engine/test_syncable_utils.h"
+#include "sync/test/fake_encryptor.h"
+#include "sync/test/null_directory_change_delegate.h"
+#include "sync/test/null_transaction_observer.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/sqlite/sqlite3.h"
using base::ExpectDictBooleanValue;
using base::ExpectDictStringValue;
@@ -420,7 +419,6 @@ class SyncableDirectoryTest : public testing::Test {
protected:
MessageLoop message_loop_;
static const char kName[];
- static const Id kId;
virtual void SetUp() {
dir_.reset(new Directory(&encryptor_, &handler_, NULL));
@@ -486,9 +484,9 @@ class SyncableDirectoryTest : public testing::Test {
scoped_ptr<Directory> dir_;
NullDirectoryChangeDelegate delegate_;
- // Creates an empty entry and sets the ID field to the default kId.
+ // Creates an empty entry and sets the ID field to a default one.
void CreateEntry(const std::string& entryname) {
- CreateEntry(entryname, kId);
+ CreateEntry(entryname, TestIdFactory::FromNumber(-99));
}
// Creates an empty entry and sets the ID field to id.
@@ -704,19 +702,19 @@ TEST_F(SyncableDirectoryTest, TakeSnapshotGetsOnlyDirtyHandlesTest) {
}
const char SyncableDirectoryTest::kName[] = "Foo";
-const Id SyncableDirectoryTest::kId(TestIdFactory::FromNumber(-99));
namespace {
+
TEST_F(SyncableDirectoryTest, TestBasicLookupNonExistantID) {
ReadTransaction rtrans(FROM_HERE, dir_.get());
- Entry e(&rtrans, GET_BY_ID, kId);
+ Entry e(&rtrans, GET_BY_ID, TestIdFactory::FromNumber(-99));
ASSERT_FALSE(e.good());
}
TEST_F(SyncableDirectoryTest, TestBasicLookupValidID) {
CreateEntry("rtc");
ReadTransaction rtrans(FROM_HERE, dir_.get());
- Entry e(&rtrans, GET_BY_ID, kId);
+ Entry e(&rtrans, GET_BY_ID, TestIdFactory::FromNumber(-99));
ASSERT_TRUE(e.good());
}
diff --git a/chrome/browser/sync/syncable/transaction_observer.h b/sync/syncable/transaction_observer.h
index 3d1f6e2..bcade47 100644
--- a/chrome/browser/sync/syncable/transaction_observer.h
+++ b/sync/syncable/transaction_observer.h
@@ -1,13 +1,13 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_
-#define CHROME_BROWSER_SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_
+#ifndef SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_
+#define SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_
#pragma once
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/syncable.h"
namespace syncable {
@@ -22,4 +22,4 @@ class TransactionObserver {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_
+#endif // SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_
diff --git a/sync/test/DEPS b/sync/test/DEPS
new file mode 100644
index 0000000..ad776e9
--- /dev/null
+++ b/sync/test/DEPS
@@ -0,0 +1,4 @@
+include_rules = [
+ # Test files can include anything from sync.
+ "+sync",
+]
diff --git a/chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.cc b/sync/test/engine/fake_model_safe_worker_registrar.cc
index 21ab061..be4a0d9 100644
--- a/chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.cc
+++ b/sync/test/engine/fake_model_safe_worker_registrar.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.h"
+#include "sync/test/engine/fake_model_safe_worker_registrar.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/fake_model_worker.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.h b/sync/test/engine/fake_model_safe_worker_registrar.h
index d0e4409..2eff29b 100644
--- a/chrome/browser/sync/test/engine/fake_model_safe_worker_registrar.h
+++ b/sync/test/engine/fake_model_safe_worker_registrar.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_SAFE_WORKER_REGISTRAR_H_
-#define CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_SAFE_WORKER_REGISTRAR_H_
+#ifndef SYNC_TEST_ENGINE_FAKE_MODEL_SAFE_WORKER_REGISTRAR_H_
+#define SYNC_TEST_ENGINE_FAKE_MODEL_SAFE_WORKER_REGISTRAR_H_
#pragma once
#include <vector>
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
+#include "sync/engine/model_safe_worker.h"
namespace browser_sync {
@@ -32,5 +32,5 @@ class FakeModelSafeWorkerRegistrar : public ModelSafeWorkerRegistrar {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_SAFE_WORKER_REGISTRAR_H_
+#endif // SYNC_TEST_ENGINE_FAKE_MODEL_SAFE_WORKER_REGISTRAR_H_
diff --git a/chrome/browser/sync/test/engine/fake_model_worker.cc b/sync/test/engine/fake_model_worker.cc
index 5b3dc60..9938e08 100644
--- a/chrome/browser/sync/test/engine/fake_model_worker.cc
+++ b/sync/test/engine/fake_model_worker.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/fake_model_worker.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/test/engine/fake_model_worker.h b/sync/test/engine/fake_model_worker.h
index e80a2cd..861adc7 100644
--- a/chrome/browser/sync/test/engine/fake_model_worker.h
+++ b/sync/test/engine/fake_model_worker.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
-#define CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
+#ifndef SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
+#define SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
#pragma once
#include <vector>
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/threading/non_thread_safe.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/internal_api/includes/syncer_error.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/util/syncer_error.h"
namespace browser_sync {
@@ -39,5 +39,5 @@ class FakeModelWorker : public ModelSafeWorker {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
+#endif // SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
diff --git a/chrome/browser/sync/test/engine/mock_connection_manager.cc b/sync/test/engine/mock_connection_manager.cc
index 5af64aa..f73b14e 100644
--- a/chrome/browser/sync/test/engine/mock_connection_manager.cc
+++ b/sync/test/engine/mock_connection_manager.cc
@@ -4,14 +4,14 @@
//
// Mock ServerConnectionManager class for use in client regression tests.
-#include "chrome/browser/sync/test/engine/mock_connection_manager.h"
+#include "sync/test/engine/mock_connection_manager.h"
#include <map>
#include "base/location.h"
#include "base/stringprintf.h"
-#include "chrome/browser/sync/engine/syncer_proto_util.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
+#include "sync/engine/syncer_proto_util.h"
+#include "sync/test/engine/test_id_factory.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/test/engine/mock_connection_manager.h b/sync/test/engine/mock_connection_manager.h
index a9a1662..c3202a5 100644
--- a/chrome/browser/sync/test/engine/mock_connection_manager.h
+++ b/sync/test/engine/mock_connection_manager.h
@@ -4,8 +4,8 @@
//
// Mock ServerConnectionManager class for use in client unit tests.
-#ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
-#define CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
+#ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
+#define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
#pragma once
#include <bitset>
@@ -16,9 +16,9 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_vector.h"
-#include "chrome/browser/sync/engine/net/server_connection_manager.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/model_type_payload_map.h"
+#include "sync/engine/net/server_connection_manager.h"
+#include "sync/syncable/model_type.h"
+#include "sync/syncable/model_type_payload_map.h"
#include "sync/protocol/sync.pb.h"
class MockConnectionManager : public browser_sync::ServerConnectionManager {
@@ -360,4 +360,4 @@ class MockConnectionManager : public browser_sync::ServerConnectionManager {
DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
};
-#endif // CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
+#endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
diff --git a/chrome/browser/sync/test/engine/syncer_command_test.cc b/sync/test/engine/syncer_command_test.cc
index fd2f7ee..53af26a 100644
--- a/chrome/browser/sync/test/engine/syncer_command_test.cc
+++ b/sync/test/engine/syncer_command_test.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/engine/syncer_command_test.h"
+#include "sync/test/engine/syncer_command_test.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h
index 5591333..3989def 100644
--- a/chrome/browser/sync/test/engine/syncer_command_test.h
+++ b/sync/test/engine/syncer_command_test.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
-#define CHROME_BROWSER_SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
+#ifndef SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
+#define SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
#pragma once
#include <algorithm>
@@ -13,16 +13,16 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop.h"
-#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
-#include "chrome/browser/sync/engine/model_safe_worker.h"
-#include "chrome/browser/sync/sessions/debug_info_getter.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/sessions/sync_session_context.h"
-#include "chrome/browser/sync/syncable/syncable_mock.h"
-#include "chrome/browser/sync/test/engine/mock_connection_manager.h"
-#include "chrome/browser/sync/test/engine/fake_model_worker.h"
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
-#include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
+#include "sync/engine/model_changing_syncer_command.h"
+#include "sync/engine/model_safe_worker.h"
+#include "sync/sessions/debug_info_getter.h"
+#include "sync/sessions/sync_session.h"
+#include "sync/sessions/sync_session_context.h"
+#include "sync/syncable/syncable_mock.h"
+#include "sync/test/engine/mock_connection_manager.h"
+#include "sync/test/engine/fake_model_worker.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
+#include "sync/test/fake_extensions_activity_monitor.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -230,4 +230,4 @@ class MockDirectorySyncerCommandTest : public SyncerCommandTestBase {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
+#endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_
diff --git a/chrome/browser/sync/test/engine/test_directory_setter_upper.cc b/sync/test/engine/test_directory_setter_upper.cc
index c4e71be..01fef5d 100644
--- a/chrome/browser/sync/test/engine/test_directory_setter_upper.cc
+++ b/sync/test/engine/test_directory_setter_upper.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/engine/test_directory_setter_upper.h"
+#include "sync/test/engine/test_directory_setter_upper.h"
#include "base/compiler_specific.h"
#include "base/file_util.h"
#include "base/location.h"
#include "base/string_util.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/null_transaction_observer.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/null_transaction_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
using syncable::NullTransactionObserver;
diff --git a/chrome/browser/sync/test/engine/test_directory_setter_upper.h b/sync/test/engine/test_directory_setter_upper.h
index b47fe89..9244138 100644
--- a/chrome/browser/sync/test/engine/test_directory_setter_upper.h
+++ b/sync/test/engine/test_directory_setter_upper.h
@@ -26,8 +26,8 @@
// }
//
-#ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
-#define CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
+#ifndef SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
+#define SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
#pragma once
#include <string>
@@ -36,10 +36,10 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/scoped_temp_dir.h"
-#include "chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
-#include "chrome/browser/sync/test/null_directory_change_delegate.h"
+#include "sync/util/test_unrecoverable_error_handler.h"
+#include "sync/syncable/syncable.h"
+#include "sync/test/fake_encryptor.h"
+#include "sync/test/null_directory_change_delegate.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace browser_sync {
@@ -76,4 +76,4 @@ class TestDirectorySetterUpper {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
+#endif // SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
diff --git a/chrome/browser/sync/test/engine/test_id_factory.h b/sync/test/engine/test_id_factory.h
index ca98353..cb82ce4 100644
--- a/chrome/browser/sync/test/engine/test_id_factory.h
+++ b/sync/test/engine/test_id_factory.h
@@ -1,17 +1,17 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// A tool making it easier to create IDs for unit testing.
-#ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_
-#define CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_
+#ifndef SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_
+#define SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_
#pragma once
#include <string>
#include "base/string_number_conversions.h"
-#include "chrome/browser/sync/syncable/syncable_id.h"
+#include "sync/syncable/syncable_id.h"
namespace browser_sync {
@@ -69,5 +69,5 @@ class TestIdFactory {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_
+#endif // SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_
diff --git a/chrome/browser/sync/test/engine/test_syncable_utils.cc b/sync/test/engine/test_syncable_utils.cc
index b76f6f7..ab07e4c 100644
--- a/chrome/browser/sync/test/engine/test_syncable_utils.cc
+++ b/sync/test/engine/test_syncable_utils.cc
@@ -1,12 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Utilities to verify the state of items in unit tests.
-#include "chrome/browser/sync/test/engine/test_syncable_utils.h"
+#include "sync/test/engine/test_syncable_utils.h"
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
using std::string;
diff --git a/chrome/browser/sync/test/engine/test_syncable_utils.h b/sync/test/engine/test_syncable_utils.h
index 2919e84..1095fc0 100644
--- a/chrome/browser/sync/test/engine/test_syncable_utils.h
+++ b/sync/test/engine/test_syncable_utils.h
@@ -1,17 +1,17 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Utilities that are useful in verifying the state of items in a
// syncable database.
-#ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
-#define CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
+#ifndef SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
+#define SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
#pragma once
#include <string>
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
namespace syncable {
@@ -38,4 +38,4 @@ Id GetOnlyEntryWithName(BaseTransaction* rtrans,
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
+#endif // SYNC_TEST_ENGINE_TEST_SYNCABLE_UTILS_H_
diff --git a/chrome/browser/sync/test/fake_encryptor.cc b/sync/test/fake_encryptor.cc
index c109ad7..3d03050 100644
--- a/chrome/browser/sync/test/fake_encryptor.cc
+++ b/sync/test/fake_encryptor.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/fake_encryptor.h"
+#include "sync/test/fake_encryptor.h"
#include "base/base64.h"
diff --git a/chrome/browser/sync/test/fake_encryptor.h b/sync/test/fake_encryptor.h
index d08d7d8..7e21061 100644
--- a/chrome/browser/sync/test/fake_encryptor.h
+++ b/sync/test/fake_encryptor.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_FAKE_ENCRYPTOR_H_
-#define CHROME_BROWSER_SYNC_TEST_FAKE_ENCRYPTOR_H_
+#ifndef SYNC_TEST_FAKE_ENCRYPTOR_H_
+#define SYNC_TEST_FAKE_ENCRYPTOR_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/util/encryptor.h"
+#include "sync/util/encryptor.h"
namespace browser_sync {
@@ -26,4 +26,4 @@ class FakeEncryptor : public Encryptor {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_FAKE_ENCRYPTOR_H_
+#endif // SYNC_TEST_FAKE_ENCRYPTOR_H_
diff --git a/chrome/browser/sync/test/fake_extensions_activity_monitor.cc b/sync/test/fake_extensions_activity_monitor.cc
index bf98dac..b3e38cd 100644
--- a/chrome/browser/sync/test/fake_extensions_activity_monitor.cc
+++ b/sync/test/fake_extensions_activity_monitor.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
+#include "sync/test/fake_extensions_activity_monitor.h"
#include "base/logging.h"
diff --git a/chrome/browser/sync/test/fake_extensions_activity_monitor.h b/sync/test/fake_extensions_activity_monitor.h
index d4938e6..2beb64f 100644
--- a/chrome/browser/sync/test/fake_extensions_activity_monitor.h
+++ b/sync/test/fake_extensions_activity_monitor.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_
-#define CHROME_BROWSER_SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_
+#ifndef SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_
+#define SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_
#pragma once
#include "base/compiler_specific.h"
#include "base/threading/non_thread_safe.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
+#include "sync/util/extensions_activity_monitor.h"
namespace browser_sync {
@@ -30,4 +30,4 @@ class FakeExtensionsActivityMonitor : public ExtensionsActivityMonitor {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_
+#endif // SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_
diff --git a/chrome/browser/sync/test/null_directory_change_delegate.cc b/sync/test/null_directory_change_delegate.cc
index 15d3cc1..c1918fc 100644
--- a/chrome/browser/sync/test/null_directory_change_delegate.cc
+++ b/sync/test/null_directory_change_delegate.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/null_directory_change_delegate.h"
+#include "sync/test/null_directory_change_delegate.h"
namespace syncable {
diff --git a/chrome/browser/sync/test/null_directory_change_delegate.h b/sync/test/null_directory_change_delegate.h
index 3ced158..884ae1a 100644
--- a/chrome/browser/sync/test/null_directory_change_delegate.h
+++ b/sync/test/null_directory_change_delegate.h
@@ -1,13 +1,13 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_NULL_DIRECTORY_CHANGE_DELEGATE_H_
-#define CHROME_BROWSER_SYNC_TEST_NULL_DIRECTORY_CHANGE_DELEGATE_H_
+#ifndef SYNC_TEST_NULL_DIRECTORY_CHANGE_DELEGATE_H_
+#define SYNC_TEST_NULL_DIRECTORY_CHANGE_DELEGATE_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/syncable/directory_change_delegate.h"
+#include "sync/syncable/directory_change_delegate.h"
namespace syncable {
@@ -31,4 +31,4 @@ class NullDirectoryChangeDelegate : public DirectoryChangeDelegate {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_TEST_NULL_DIRECTORY_CHANGE_DELEGATE_H_
+#endif // SYNC_TEST_NULL_DIRECTORY_CHANGE_DELEGATE_H_
diff --git a/chrome/browser/sync/test/null_transaction_observer.cc b/sync/test/null_transaction_observer.cc
index 4fe914f..7902433 100644
--- a/chrome/browser/sync/test/null_transaction_observer.cc
+++ b/sync/test/null_transaction_observer.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/null_transaction_observer.h"
+#include "sync/test/null_transaction_observer.h"
#include "base/memory/weak_ptr.h"
diff --git a/chrome/browser/sync/test/null_transaction_observer.h b/sync/test/null_transaction_observer.h
index 74aa9d7..fbddadd 100644
--- a/chrome/browser/sync/test/null_transaction_observer.h
+++ b/sync/test/null_transaction_observer.h
@@ -1,12 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_NULL_TRANSACTION_OBSERVER_H_
-#define CHROME_BROWSER_SYNC_TEST_NULL_TRANSACTION_OBSERVER_H_
+#ifndef SYNC_TEST_NULL_TRANSACTION_OBSERVER_H_
+#define SYNC_TEST_NULL_TRANSACTION_OBSERVER_H_
#pragma once
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/util/weak_handle.h"
namespace syncable {
@@ -18,4 +18,4 @@ browser_sync::WeakHandle<TransactionObserver> NullTransactionObserver();
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_TEST_NULL_TRANSACTION_OBSERVER_H_
+#endif // SYNC_TEST_NULL_TRANSACTION_OBSERVER_H_
diff --git a/chrome/browser/sync/test/sessions/test_scoped_session_event_listener.h b/sync/test/sessions/test_scoped_session_event_listener.h
index 15fc68c..f2cdadd 100644
--- a/chrome/browser/sync/test/sessions/test_scoped_session_event_listener.h
+++ b/sync/test/sessions/test_scoped_session_event_listener.h
@@ -1,12 +1,12 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_
-#define CHROME_BROWSER_SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_
+#ifndef SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_
+#define SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_
#pragma once
-#include "chrome/browser/sync/sessions/sync_session_context.h"
+#include "sync/sessions/sync_session_context.h"
namespace browser_sync {
namespace sessions {
@@ -33,4 +33,4 @@ class TestScopedSessionEventListener {
} // namespace sessions
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_
+#endif // SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_
diff --git a/chrome/browser/sync/test/test_directory_backing_store.cc b/sync/test/test_directory_backing_store.cc
index 6c73324..8a168a4 100644
--- a/chrome/browser/sync/test/test_directory_backing_store.cc
+++ b/sync/test/test_directory_backing_store.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/test/test_directory_backing_store.h"
+#include "sync/test/test_directory_backing_store.h"
#include "base/basictypes.h"
#include "base/logging.h"
diff --git a/chrome/browser/sync/test/test_directory_backing_store.h b/sync/test/test_directory_backing_store.h
index 1f446c1..c78d27e 100644
--- a/chrome/browser/sync/test/test_directory_backing_store.h
+++ b/sync/test/test_directory_backing_store.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_
-#define CHROME_BROWSER_SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_
+#ifndef SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_
+#define SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_
#pragma once
#include "base/gtest_prod_util.h"
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
+#include "sync/syncable/directory_backing_store.h"
namespace syncable {
@@ -50,4 +50,4 @@ class TestDirectoryBackingStore : public DirectoryBackingStore {
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_
+#endif // SYNC_TEST_TEST_DIRECTORY_BACKING_STORE_H_
diff --git a/sync/util/DEPS b/sync/util/DEPS
new file mode 100644
index 0000000..d72656b
--- /dev/null
+++ b/sync/util/DEPS
@@ -0,0 +1,7 @@
+include_rules = [
+ "+crypto",
+ "+sync/protocol",
+ "+sync/syncable/model_type.h",
+ "+sync/syncable/model_type_test_util.h",
+ "+sync/test/fake_encryptor.h",
+]
diff --git a/chrome/browser/sync/util/cryptographer.cc b/sync/util/cryptographer.cc
index 30d0e91..b3d1833 100644
--- a/chrome/browser/sync/util/cryptographer.cc
+++ b/sync/util/cryptographer.cc
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "sync/util/cryptographer.h"
+
#include <algorithm>
#include "base/base64.h"
#include "base/logging.h"
-#include "chrome/browser/sync/util/cryptographer.h"
-#include "chrome/browser/sync/util/encryptor.h"
+#include "sync/util/encryptor.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/util/cryptographer.h b/sync/util/cryptographer.h
index ede5153..af7b272 100644
--- a/chrome/browser/sync/util/cryptographer.h
+++ b/sync/util/cryptographer.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_CRYPTOGRAPHER_H_
-#define CHROME_BROWSER_SYNC_UTIL_CRYPTOGRAPHER_H_
+#ifndef SYNC_UTIL_CRYPTOGRAPHER_H_
+#define SYNC_UTIL_CRYPTOGRAPHER_H_
#pragma once
#include <map>
@@ -13,8 +13,8 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/nigori.h"
+#include "sync/syncable/model_type.h"
+#include "sync/util/nigori.h"
#include "sync/protocol/encryption.pb.h"
#include "sync/protocol/nigori_specifics.pb.h"
@@ -244,4 +244,4 @@ class Cryptographer {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_CRYPTOGRAPHER_H_
+#endif // SYNC_UTIL_CRYPTOGRAPHER_H_
diff --git a/chrome/browser/sync/util/cryptographer_unittest.cc b/sync/util/cryptographer_unittest.cc
index 99e676d..dc38e0f 100644
--- a/chrome/browser/sync/util/cryptographer_unittest.cc
+++ b/sync/util/cryptographer_unittest.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/cryptographer.h"
+#include "sync/util/cryptographer.h"
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/string_util.h"
-#include "chrome/browser/sync/syncable/model_type_test_util.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
+#include "sync/syncable/model_type_test_util.h"
+#include "sync/test/fake_encryptor.h"
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/sync/util/data_encryption.cc b/sync/util/data_encryption_win.cc
index 10f19ec..bdc1e9d 100644
--- a/chrome/browser/sync/util/data_encryption.cc
+++ b/sync/util/data_encryption_win.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// NOTE: this file is Winodws specific.
-#include "chrome/browser/sync/util/data_encryption.h"
+#include "sync/util/data_encryption_win.h"
#include <windows.h>
#include <wincrypt.h>
@@ -15,6 +15,12 @@
#include "base/logging.h"
+#pragma comment(lib, "crypt32.lib")
+
+// TODO(akalin): Merge this with similar code in
+// chrome/browser/password_manager/encryptor_win.cc. Preferably, all
+// this stuff would live in crypto/.
+
using std::string;
using std::vector;
diff --git a/chrome/browser/sync/util/data_encryption.h b/sync/util/data_encryption_win.h
index 1f48afd..f671ad8 100644
--- a/chrome/browser/sync/util/data_encryption.h
+++ b/sync/util/data_encryption_win.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_DATA_ENCRYPTION_H_
-#define CHROME_BROWSER_SYNC_UTIL_DATA_ENCRYPTION_H_
+#ifndef SYNC_UTIL_DATA_ENCRYPTION_WIN_H_
+#define SYNC_UTIL_DATA_ENCRYPTION_WIN_H_
#pragma once
#include <string>
@@ -17,4 +17,4 @@ using std::vector;
vector<uint8> EncryptData(const string& data);
bool DecryptData(const vector<uint8>& in_data, string* out_data);
-#endif // CHROME_BROWSER_SYNC_UTIL_DATA_ENCRYPTION_H_
+#endif // SYNC_UTIL_DATA_ENCRYPTION_WIN_H_
diff --git a/chrome/browser/sync/util/data_encryption_unittest.cc b/sync/util/data_encryption_win_unittest.cc
index 6a8091c..4fa5250 100644
--- a/chrome/browser/sync/util/data_encryption_unittest.cc
+++ b/sync/util/data_encryption_win_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/data_encryption.h"
+#include "sync/util/data_encryption_win.h"
#include <string>
#include <vector>
diff --git a/chrome/browser/sync/util/data_type_histogram.h b/sync/util/data_type_histogram.h
index 00478222..72ab1b5 100644
--- a/chrome/browser/sync/util/data_type_histogram.h
+++ b/sync/util/data_type_histogram.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_
-#define CHROME_BROWSER_SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_
+#ifndef SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_
+#define SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_
#pragma once
#include "base/metrics/histogram.h"
#include "base/time.h"
-#include "chrome/browser/sync/syncable/model_type.h"
+#include "sync/syncable/model_type.h"
// For now, this just implements UMA_HISTOGRAM_LONG_TIMES. This can be adjusted
// if we feel the min, max, or bucket count amount are not appropriate.
@@ -88,4 +88,4 @@
} \
} while (0)
-#endif // CHROME_BROWSER_SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_
+#endif // SYNC_UTIL_DATA_TYPE_HISTOGRAM_H_
diff --git a/chrome/browser/sync/util/data_type_histogram_unittest.cc b/sync/util/data_type_histogram_unittest.cc
index 6b7547e..676ebb7 100644
--- a/chrome/browser/sync/util/data_type_histogram_unittest.cc
+++ b/sync/util/data_type_histogram_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/data_type_histogram.h"
+#include "sync/util/data_type_histogram.h"
#include "base/time.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/util/encryptor.h b/sync/util/encryptor.h
index 1c9eab9..1549caf 100644
--- a/chrome/browser/sync/util/encryptor.h
+++ b/sync/util/encryptor.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_ENCRYPTOR_H_
-#define CHROME_BROWSER_SYNC_UTIL_ENCRYPTOR_H_
+#ifndef SYNC_UTIL_ENCRYPTOR_H_
+#define SYNC_UTIL_ENCRYPTOR_H_
#pragma once
#include <string>
@@ -25,4 +25,4 @@ class Encryptor {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_ENCRYPTOR_H_
+#endif // SYNC_UTIL_ENCRYPTOR_H_
diff --git a/chrome/browser/sync/util/enum_set.h b/sync/util/enum_set.h
index 51d3afe..d860623 100644
--- a/chrome/browser/sync/util/enum_set.h
+++ b/sync/util/enum_set.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_ENUM_SET_H_
-#define CHROME_BROWSER_SYNC_UTIL_ENUM_SET_H_
+#ifndef SYNC_UTIL_ENUM_SET_H_
+#define SYNC_UTIL_ENUM_SET_H_
#pragma once
#include <bitset>
@@ -283,4 +283,4 @@ EnumSet<E, Min, Max> Difference(EnumSet<E, Min, Max> set1,
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_ENUM_SET_H_
+#endif // SYNC_UTIL_ENUM_SET_H_
diff --git a/chrome/browser/sync/util/enum_set_unittest.cc b/sync/util/enum_set_unittest.cc
index 6a8eecc..8c32c0a 100644
--- a/chrome/browser/sync/util/enum_set_unittest.cc
+++ b/sync/util/enum_set_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/enum_set.h"
+#include "sync/util/enum_set.h"
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/util/extensions_activity_monitor.cc b/sync/util/extensions_activity_monitor.cc
index 967385f..0414823 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor.cc
+++ b/sync/util/extensions_activity_monitor.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
+#include "sync/util/extensions_activity_monitor.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/util/extensions_activity_monitor.h b/sync/util/extensions_activity_monitor.h
index 2a1d666..9a5fdef 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor.h
+++ b/sync/util/extensions_activity_monitor.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
-#define CHROME_BROWSER_SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
+#ifndef SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
+#define SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
#pragma once
#include <map>
@@ -50,4 +50,4 @@ class ExtensionsActivityMonitor {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
+#endif // SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
diff --git a/chrome/browser/sync/util/get_session_name.cc b/sync/util/get_session_name.cc
index e861042..e37c12f 100644
--- a/chrome/browser/sync/util/get_session_name.cc
+++ b/sync/util/get_session_name.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/get_session_name.h"
+#include "sync/util/get_session_name.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -14,9 +14,9 @@
#if defined(OS_LINUX)
#include "base/linux_util.h"
#elif defined(OS_MACOSX)
-#include "chrome/browser/sync/util/get_session_name_mac.h"
+#include "sync/util/get_session_name_mac.h"
#elif defined(OS_WIN)
-#include "chrome/browser/sync/util/get_session_name_win.h"
+#include "sync/util/get_session_name_win.h"
#endif
namespace browser_sync {
diff --git a/chrome/browser/sync/util/get_session_name.h b/sync/util/get_session_name.h
index a4df65d..dc53295 100644
--- a/chrome/browser/sync/util/get_session_name.h
+++ b/sync/util/get_session_name.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_H_
-#define CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_H_
+#ifndef SYNC_UTIL_GET_SESSION_NAME_H_
+#define SYNC_UTIL_GET_SESSION_NAME_H_
#pragma once
#include <string>
@@ -25,4 +25,4 @@ std::string GetSessionNameSynchronouslyForTesting();
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_H_
+#endif // SYNC_UTIL_GET_SESSION_NAME_H_
diff --git a/chrome/browser/sync/util/get_session_name_mac.h b/sync/util/get_session_name_mac.h
index 4b784de..771f48f 100644
--- a/chrome/browser/sync/util/get_session_name_mac.h
+++ b/sync/util/get_session_name_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_MAC_H_
-#define CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_MAC_H_
+#ifndef SYNC_UTIL_GET_SESSION_NAME_MAC_H_
+#define SYNC_UTIL_GET_SESSION_NAME_MAC_H_
#pragma once
#include <string>
@@ -20,4 +20,4 @@ std::string GetHardwareModelName();
} // namespace internal
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_MAC_H_
+#endif // SYNC_UTIL_GET_SESSION_NAME_MAC_H_
diff --git a/chrome/browser/sync/util/get_session_name_mac.mm b/sync/util/get_session_name_mac.mm
index 379ce3b..4b46139 100644
--- a/chrome/browser/sync/util/get_session_name_mac.mm
+++ b/sync/util/get_session_name_mac.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/get_session_name_mac.h"
+#include "sync/util/get_session_name_mac.h"
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SCDynamicStoreCopySpecific.h>
diff --git a/chrome/browser/sync/util/get_session_name_unittest.cc b/sync/util/get_session_name_unittest.cc
index a0bfe76..b335cd0 100644
--- a/chrome/browser/sync/util/get_session_name_unittest.cc
+++ b/sync/util/get_session_name_unittest.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/message_loop.h"
-#include "chrome/browser/sync/util/get_session_name.h"
+#include "sync/util/get_session_name.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/util/get_session_name_win.cc b/sync/util/get_session_name_win.cc
index f4012a2..499930b 100644
--- a/chrome/browser/sync/util/get_session_name_win.cc
+++ b/sync/util/get_session_name_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/get_session_name_win.h"
+#include "sync/util/get_session_name_win.h"
#include <windows.h>
diff --git a/chrome/browser/sync/util/get_session_name_win.h b/sync/util/get_session_name_win.h
index 45dc44b..1d6b1eb 100644
--- a/chrome/browser/sync/util/get_session_name_win.h
+++ b/sync/util/get_session_name_win.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_WIN_H_
-#define CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_WIN_H_
+#ifndef SYNC_UTIL_GET_SESSION_NAME_WIN_H_
+#define SYNC_UTIL_GET_SESSION_NAME_WIN_H_
#pragma once
#include <string>
@@ -16,4 +16,4 @@ std::string GetComputerName();
} // namespace internal
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_GET_SESSION_NAME_WIN_H_
+#endif // SYNC_UTIL_GET_SESSION_NAME_WIN_H_
diff --git a/chrome/browser/sync/util/immutable.h b/sync/util/immutable.h
index 8bb03c7..6624b90 100644
--- a/chrome/browser/sync/util/immutable.h
+++ b/sync/util/immutable.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,8 +62,8 @@
// with forward-declared types. See comments on traits below for
// details.
-#ifndef CHROME_BROWSER_SYNC_UTIL_IMMUTABLE_H_
-#define CHROME_BROWSER_SYNC_UTIL_IMMUTABLE_H_
+#ifndef SYNC_UTIL_IMMUTABLE_H_
+#define SYNC_UTIL_IMMUTABLE_H_
#pragma once
// For std::swap().
@@ -259,4 +259,4 @@ Immutable<T> MakeImmutable(T* t) {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_IMMUTABLE_H_
+#endif // SYNC_UTIL_IMMUTABLE_H_
diff --git a/chrome/browser/sync/util/immutable_unittest.cc b/sync/util/immutable_unittest.cc
index dc6553b..aa0037b 100644
--- a/chrome/browser/sync/util/immutable_unittest.cc
+++ b/sync/util/immutable_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/immutable.h"
+#include "sync/util/immutable.h"
#include <algorithm>
#include <cstddef>
diff --git a/chrome/browser/sync/util/logging.cc b/sync/util/logging.cc
index 9601f58..3d2a269 100644
--- a/chrome/browser/sync/util/logging.cc
+++ b/sync/util/logging.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/logging.h"
+#include "sync/util/logging.h"
#include "base/location.h"
diff --git a/chrome/browser/sync/util/logging.h b/sync/util/logging.h
index e14ac49..45e901e44 100644
--- a/chrome/browser/sync/util/logging.h
+++ b/sync/util/logging.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_LOGGING_H_
-#define CHROME_BROWSER_SYNC_UTIL_LOGGING_H_
+#ifndef SYNC_UTIL_LOGGING_H_
+#define SYNC_UTIL_LOGGING_H_
#pragma once
#include "base/logging.h"
@@ -32,4 +32,4 @@ bool VlogIsOnForLocation(const tracked_objects::Location& from_here,
(VLOG_IS_ON(verbose_level) || \
::browser_sync::VlogIsOnForLocation(from_here, verbose_level))) \
-#endif // CHROME_BROWSER_SYNC_UTIL_LOGGING_H_
+#endif // SYNC_UTIL_LOGGING_H_
diff --git a/chrome/browser/sync/util/nigori.cc b/sync/util/nigori.cc
index 799a3f4..168d8eb 100644
--- a/chrome/browser/sync/util/nigori.cc
+++ b/sync/util/nigori.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/nigori.h"
+#include "sync/util/nigori.h"
#include <sstream>
#include <vector>
diff --git a/chrome/browser/sync/util/nigori.h b/sync/util/nigori.h
index 74fd6ec..eb7dc5d 100644
--- a/chrome/browser/sync/util/nigori.h
+++ b/sync/util/nigori.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_NIGORI_H_
-#define CHROME_BROWSER_SYNC_UTIL_NIGORI_H_
+#ifndef SYNC_UTIL_NIGORI_H_
+#define SYNC_UTIL_NIGORI_H_
#pragma once
#include <string>
@@ -80,4 +80,4 @@ class Nigori {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_NIGORI_H_
+#endif // SYNC_UTIL_NIGORI_H_
diff --git a/chrome/browser/sync/util/nigori_unittest.cc b/sync/util/nigori_unittest.cc
index 95afafe..41f8ceb 100644
--- a/chrome/browser/sync/util/nigori_unittest.cc
+++ b/sync/util/nigori_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/nigori.h"
+#include "sync/util/nigori.h"
#include <string>
diff --git a/chrome/browser/sync/util/protobuf_unittest.cc b/sync/util/protobuf_unittest.cc
index 4f654d5..4f654d5 100644
--- a/chrome/browser/sync/util/protobuf_unittest.cc
+++ b/sync/util/protobuf_unittest.cc
diff --git a/chrome/browser/sync/internal_api/includes/report_unrecoverable_error_function.h b/sync/util/report_unrecoverable_error_function.h
index c2b56316..ead73f0 100644
--- a/chrome/browser/sync/internal_api/includes/report_unrecoverable_error_function.h
+++ b/sync/util/report_unrecoverable_error_function.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
-#define CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
+#ifndef SYNC_UTIL_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
+#define SYNC_UTIL_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
#pragma once
namespace browser_sync {
@@ -16,4 +16,4 @@ typedef void (*ReportUnrecoverableErrorFunction)(void);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
+#endif // SYNC_UTIL_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_
diff --git a/chrome/browser/sync/internal_api/includes/syncer_error.cc b/sync/util/syncer_error.cc
index 5355a3b..5f836ce 100644
--- a/chrome/browser/sync/internal_api/includes/syncer_error.cc
+++ b/sync/util/syncer_error.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/internal_api/includes/syncer_error.h"
+#include "sync/util/syncer_error.h"
#include "base/logging.h"
diff --git a/chrome/browser/sync/internal_api/includes/syncer_error.h b/sync/util/syncer_error.h
index 1f3c03b..6613f59 100644
--- a/chrome/browser/sync/internal_api/includes/syncer_error.h
+++ b/sync/util/syncer_error.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_SYNCER_ERROR_H_
-#define CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_SYNCER_ERROR_H_
+#ifndef SYNC_INTERNAL_API_INCLUDES_SYNCER_ERROR_H_
+#define SYNC_INTERNAL_API_INCLUDES_SYNCER_ERROR_H_
#pragma once
namespace browser_sync {
@@ -43,4 +43,4 @@ const char * GetSyncerErrorString(SyncerError);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_SYNCER_ERROR_H_
+#endif // SYNC_INTERNAL_API_INCLUDES_SYNCER_ERROR_H_
diff --git a/chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.cc b/sync/util/test_unrecoverable_error_handler.cc
index 69b3425..f7df6d4 100644
--- a/chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.cc
+++ b/sync/util/test_unrecoverable_error_handler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h"
+#include "sync/util/test_unrecoverable_error_handler.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h b/sync/util/test_unrecoverable_error_handler.h
index 042bfaf..408d806 100644
--- a/chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h
+++ b/sync/util/test_unrecoverable_error_handler.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
-#define CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
+#ifndef SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
+#define SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h"
+#include "sync/util/unrecoverable_error_handler.h"
namespace browser_sync {
@@ -24,5 +24,5 @@ class TestUnrecoverableErrorHandler : public UnrecoverableErrorHandler {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
+#endif // SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
diff --git a/chrome/browser/sync/util/time.cc b/sync/util/time.cc
index ad309d0..ea0f367 100644
--- a/chrome/browser/sync/util/time.cc
+++ b/sync/util/time.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/time.h"
+#include "sync/util/time.h"
#include "base/i18n/time_formatting.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/browser/sync/util/time.h b/sync/util/time.h
index 473f7e2..fc65efa 100644
--- a/chrome/browser/sync/util/time.h
+++ b/sync/util/time.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Time-related sync functions.
-#ifndef CHROME_BROWSER_SYNC_UTIL_TIME_H_
-#define CHROME_BROWSER_SYNC_UTIL_TIME_H_
+#ifndef SYNC_UTIL_TIME_H_
+#define SYNC_UTIL_TIME_H_
#pragma once
#include <string>
@@ -26,4 +26,4 @@ std::string GetTimeDebugString(const base::Time& t);
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_TIME_H_
+#endif // SYNC_UTIL_TIME_H_
diff --git a/chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h b/sync/util/unrecoverable_error_handler.h
index bb43dd8c..aaca1e9 100644
--- a/chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.h
+++ b/sync/util/unrecoverable_error_handler.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_UNRECOVERABLE_ERROR_HANDLER_H_
-#define CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_UNRECOVERABLE_ERROR_HANDLER_H_
+#ifndef SYNC_UTIL_UNRECOVERABLE_ERROR_HANDLER_H_
+#define SYNC_UTIL_UNRECOVERABLE_ERROR_HANDLER_H_
#pragma once
#include <string>
@@ -26,5 +26,5 @@ class UnrecoverableErrorHandler {
}
-#endif // CHROME_BROWSER_SYNC_INTERNAL_API_INCLUDES_UNRECOVERABLE_ERROR_HANDLER_H_
+#endif // SYNC_UTIL_UNRECOVERABLE_ERROR_HANDLER_H_
diff --git a/chrome/browser/sync/util/unrecoverable_error_info.cc b/sync/util/unrecoverable_error_info.cc
index 579eb38..617f1a5 100644
--- a/chrome/browser/sync/util/unrecoverable_error_info.cc
+++ b/sync/util/unrecoverable_error_info.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/unrecoverable_error_info.h"
+#include "sync/util/unrecoverable_error_info.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/util/unrecoverable_error_info.h b/sync/util/unrecoverable_error_info.h
index dd62c30..64b780a 100644
--- a/chrome/browser/sync/util/unrecoverable_error_info.h
+++ b/sync/util/unrecoverable_error_info.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_
-#define CHROME_BROWSER_SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_
+#ifndef SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_
+#define SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_
// TODO(lipalani): Figure out the right location for this class so it is
// accessible outside of sync engine as well.
#pragma once
@@ -38,4 +38,4 @@ class UnrecoverableErrorInfo {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_
+#endif // SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_
diff --git a/chrome/browser/sync/util/weak_handle.cc b/sync/util/weak_handle.cc
index 040841f..bdf580b7 100644
--- a/chrome/browser/sync/util/weak_handle.cc
+++ b/sync/util/weak_handle.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/util/weak_handle.h"
#include <sstream>
diff --git a/chrome/browser/sync/util/weak_handle.h b/sync/util/weak_handle.h
index 28bfeda..653da60 100644
--- a/chrome/browser/sync/util/weak_handle.h
+++ b/sync/util/weak_handle.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -44,8 +44,8 @@
// void OnIOError(IOError err) { DCHECK(CalledOnValidThread(); ... }
// };
-#ifndef CHROME_BROWSER_SYNC_UTIL_WEAK_HANDLE_H_
-#define CHROME_BROWSER_SYNC_UTIL_WEAK_HANDLE_H_
+#ifndef SYNC_UTIL_WEAK_HANDLE_H_
+#define SYNC_UTIL_WEAK_HANDLE_H_
#pragma once
#include <cstddef>
@@ -376,4 +376,4 @@ WeakHandle<T> MakeWeakHandle(const base::WeakPtr<T>& ptr) {
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_UTIL_WEAK_HANDLE_H_
+#endif // SYNC_UTIL_WEAK_HANDLE_H_
diff --git a/chrome/browser/sync/util/weak_handle_unittest.cc b/sync/util/weak_handle_unittest.cc
index 4a56f9e..6767df1 100644
--- a/chrome/browser/sync/util/weak_handle_unittest.cc
+++ b/sync/util/weak_handle_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/util/weak_handle.h"
+#include "sync/util/weak_handle.h"
#include "base/bind.h"
#include "base/compiler_specific.h"