summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/sync/abstract_profile_sync_service_test.h2
-rw-r--r--chrome/browser/sync/backend_migrator.h2
-rw-r--r--chrome/browser/sync/backend_migrator_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/backend_data_type_configurer.h2
-rw-r--r--chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/change_processor_mock.h2
-rw-r--r--chrome/browser/sync/glue/chrome_sync_notification_bridge.h2
-rw-r--r--chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/data_type_controller.h2
-rw-r--r--chrome/browser/sync/glue/data_type_error_handler.h2
-rw-r--r--chrome/browser/sync/glue/data_type_error_handler_mock.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.cc2
-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/non_frontend_data_type_controller.cc2
-rw-r--r--chrome/browser/sync/glue/session_change_processor.cc4
-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/sync_backend_host.h2
-rw-r--r--chrome/browser/sync/glue/sync_backend_host_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar.h2
-rw-r--r--chrome/browser/sync/glue/sync_backend_registrar_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/theme_model_associator.h2
-rw-r--r--chrome/browser/sync/glue/ui_data_type_controller.cc2
-rw-r--r--chrome/browser/sync/invalidations/invalidator_storage.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service.h2
-rw-r--r--chrome/browser/sync/profile_sync_service_autofill_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.h2
-rw-r--r--chrome/browser/sync/profile_sync_service_mock.h2
-rw-r--r--chrome/browser/sync/profile_sync_service_preference_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_session_unittest.cc2
-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_ui_util.cc2
-rw-r--r--chrome/browser/sync/test/integration/enable_disable_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/sync_test.h2
-rw-r--r--chrome/browser/sync/user_selectable_sync_type.h4
-rw-r--r--sync/api/sync_data.cc2
-rw-r--r--sync/api/sync_data.h2
-rw-r--r--sync/api/sync_error.cc2
-rw-r--r--sync/api/sync_error.h2
-rw-r--r--sync/api/syncable_service.h2
-rw-r--r--sync/engine/DEPS2
-rw-r--r--sync/engine/all_status.cc2
-rw-r--r--sync/engine/all_status.h2
-rw-r--r--sync/engine/cleanup_disabled_types_command.cc2
-rw-r--r--sync/engine/cleanup_disabled_types_command_unittest.cc2
-rw-r--r--sync/engine/download_updates_command.cc2
-rw-r--r--sync/engine/download_updates_command.h2
-rw-r--r--sync/engine/model_changing_syncer_command_unittest.cc2
-rw-r--r--sync/engine/process_updates_command_unittest.cc2
-rw-r--r--sync/engine/resolve_conflicts_command_unittest.cc2
-rw-r--r--sync/engine/store_timestamps_command.cc2
-rw-r--r--sync/engine/sync_scheduler.cc5
-rw-r--r--sync/engine/sync_scheduler.h2
-rw-r--r--sync/engine/syncer.h2
-rw-r--r--sync/engine/syncer_proto_util.cc2
-rw-r--r--sync/engine/syncer_proto_util.h2
-rw-r--r--sync/engine/syncer_proto_util_unittest.cc2
-rw-r--r--sync/engine/syncer_unittest.cc4
-rw-r--r--sync/engine/syncer_util.cc2
-rw-r--r--sync/engine/syncproto.h2
-rw-r--r--sync/engine/throttled_data_type_tracker.cc2
-rw-r--r--sync/engine/throttled_data_type_tracker.h2
-rw-r--r--sync/engine/throttled_data_type_tracker_unittest.cc2
-rw-r--r--sync/internal_api/change_reorder_buffer.cc2
-rw-r--r--sync/internal_api/js_mutation_event_observer_unittest.cc2
-rw-r--r--sync/internal_api/js_sync_manager_observer.cc2
-rw-r--r--sync/internal_api/js_sync_manager_observer_unittest.cc2
-rw-r--r--sync/internal_api/public/base/DEPS4
-rw-r--r--sync/internal_api/public/base/enum_set.h (renamed from sync/internal_api/public/util/enum_set.h)6
-rw-r--r--sync/internal_api/public/base/enum_set_unittest.cc (renamed from sync/internal_api/public/util/enum_set_unittest.cc)2
-rw-r--r--sync/internal_api/public/base/model_type.h (renamed from sync/internal_api/public/syncable/model_type.h)8
-rw-r--r--sync/internal_api/public/base/model_type_payload_map.cc (renamed from sync/internal_api/public/syncable/model_type_payload_map.cc)30
-rw-r--r--sync/internal_api/public/base/model_type_payload_map.h (renamed from sync/internal_api/public/syncable/model_type_payload_map.h)20
-rw-r--r--sync/internal_api/public/base/model_type_payload_map_unittest.cc (renamed from sync/internal_api/public/syncable/model_type_payload_map_unittest.cc)29
-rw-r--r--sync/internal_api/public/base/model_type_test_util.cc (renamed from sync/internal_api/public/syncable/model_type_test_util.cc)2
-rw-r--r--sync/internal_api/public/base/model_type_test_util.h (renamed from sync/internal_api/public/syncable/model_type_test_util.h)8
-rw-r--r--sync/internal_api/public/base_node.h2
-rw-r--r--sync/internal_api/public/engine/model_safe_worker.cc11
-rw-r--r--sync/internal_api/public/engine/model_safe_worker.h9
-rw-r--r--sync/internal_api/public/engine/model_safe_worker_unittest.cc16
-rw-r--r--sync/internal_api/public/engine/sync_status.h2
-rw-r--r--sync/internal_api/public/read_node.h2
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.cc1
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.h4
-rw-r--r--sync/internal_api/public/sessions/sync_source_info.h4
-rw-r--r--sync/internal_api/public/sync_manager.h2
-rw-r--r--sync/internal_api/public/test/test_entry_factory.h2
-rw-r--r--sync/internal_api/public/util/experiments.h2
-rw-r--r--sync/internal_api/public/write_node.h2
-rw-r--r--sync/internal_api/sync_manager.cc4
-rw-r--r--sync/internal_api/syncapi_unittest.cc2
-rw-r--r--sync/notifier/DEPS2
-rw-r--r--sync/notifier/invalidation_notifier.cc2
-rw-r--r--sync/notifier/invalidation_notifier.h2
-rw-r--r--sync/notifier/invalidation_notifier_unittest.cc4
-rw-r--r--sync/notifier/invalidation_util.h2
-rw-r--r--sync/notifier/non_blocking_invalidation_notifier_unittest.cc4
-rw-r--r--sync/notifier/p2p_notifier.cc2
-rw-r--r--sync/notifier/p2p_notifier.h2
-rw-r--r--sync/notifier/p2p_notifier_unittest.cc2
-rw-r--r--sync/notifier/sync_notifier.h2
-rw-r--r--sync/notifier/sync_notifier_factory_unittest.cc4
-rw-r--r--sync/notifier/sync_notifier_observer.h2
-rw-r--r--sync/protocol/DEPS2
-rw-r--r--sync/protocol/proto_value_conversions_unittest.cc2
-rw-r--r--sync/protocol/sync_protocol_error.h2
-rw-r--r--sync/sessions/DEPS2
-rw-r--r--sync/sessions/ordered_commit_set.h2
-rw-r--r--sync/sessions/status_controller.cc2
-rw-r--r--sync/sessions/sync_session.cc20
-rw-r--r--sync/sessions/sync_session.h2
-rw-r--r--sync/sessions/sync_session_unittest.cc41
-rw-r--r--sync/sync.gyp16
-rw-r--r--sync/syncable/DEPS2
-rw-r--r--sync/syncable/directory_backing_store.h2
-rw-r--r--sync/syncable/directory_change_delegate.h2
-rw-r--r--sync/syncable/entry_kernel.h2
-rw-r--r--sync/syncable/model_type.cc2
-rw-r--r--sync/syncable/model_type_unittest.cc2
-rw-r--r--sync/syncable/nigori_util.h2
-rw-r--r--sync/syncable/transaction_observer.h2
-rw-r--r--sync/test/engine/mock_connection_manager.h4
-rw-r--r--sync/test/engine/syncer_command_test.h3
-rw-r--r--sync/tools/DEPS2
-rw-r--r--sync/tools/sync_listen_notifications.cc4
-rw-r--r--sync/util/DEPS2
-rw-r--r--sync/util/cryptographer.h2
-rw-r--r--sync/util/cryptographer_unittest.cc2
-rw-r--r--sync/util/data_type_histogram.h2
133 files changed, 246 insertions, 243 deletions
diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.h b/chrome/browser/sync/abstract_profile_sync_service_test.h
index 781c8bf..48b6dec 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/profile_sync_components_factory_mock.h"
#include "content/public/test/test_browser_thread.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/change_record.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
class ProfileSyncService;
diff --git a/chrome/browser/sync/backend_migrator.h b/chrome/browser/sync/backend_migrator.h
index cdc74f3..c3b2a2f 100644
--- a/chrome/browser/sync/backend_migrator.h
+++ b/chrome/browser/sync/backend_migrator.h
@@ -11,7 +11,7 @@
#include "chrome/browser/sync/glue/data_type_manager.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
class ProfileSyncService;
diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc
index 64ae64b..3861fe6 100644
--- a/chrome/browser/sync/backend_migrator_unittest.cc
+++ b/chrome/browser/sync/backend_migrator_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/sync/glue/data_type_manager_mock.h"
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/common/chrome_notification_types.h"
-#include "sync/internal_api/public/syncable/model_type_test_util.h"
+#include "sync/internal_api/public/base/model_type_test_util.h"
#include "sync/internal_api/public/test/test_user_share.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/sync.pb.h"
diff --git a/chrome/browser/sync/glue/backend_data_type_configurer.h b/chrome/browser/sync/glue/backend_data_type_configurer.h
index 5d2ab4a..43ab25a 100644
--- a/chrome/browser/sync/glue/backend_data_type_configurer.h
+++ b/chrome/browser/sync/glue/backend_data_type_configurer.h
@@ -7,8 +7,8 @@
#pragma once
#include "base/callback.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/configure_reason.h"
-#include "sync/internal_api/public/syncable/model_type.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
index 6159524..71fab0d 100644
--- a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
+++ b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
@@ -12,8 +12,8 @@
#include "chrome/browser/sync/glue/chrome_sync_notification_bridge.h"
#include "chrome/test/base/profile_mock.h"
#include "content/public/test/test_browser_thread.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_test_util.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_test_util.h"
#include "sync/notifier/mock_sync_notifier_observer.h"
#include "sync/notifier/sync_notifier.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/sync/glue/change_processor_mock.h b/chrome/browser/sync/glue/change_processor_mock.h
index e94f4b6..03ea5ef 100644
--- a/chrome/browser/sync/glue/change_processor_mock.h
+++ b/chrome/browser/sync/glue/change_processor_mock.h
@@ -7,7 +7,7 @@
#pragma once
#include "chrome/browser/sync/glue/change_processor.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h b/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
index 1d03ca9..9f35ef0 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge.h
@@ -10,7 +10,7 @@
#include "base/observer_list_threadsafe.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
class Profile;
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 de6491d5..ff0b0ad 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
@@ -15,8 +15,8 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/notifier/mock_sync_notifier_observer.h"
#include "sync/notifier/sync_notifier_observer.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/sync/glue/data_type_controller.h b/chrome/browser/sync/glue/data_type_controller.h
index 92fa111..0bae719 100644
--- a/chrome/browser/sync/glue/data_type_controller.h
+++ b/chrome/browser/sync/glue/data_type_controller.h
@@ -14,8 +14,8 @@
#include "base/sequenced_task_runner_helpers.h"
#include "chrome/browser/sync/glue/data_type_error_handler.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
namespace syncer {
diff --git a/chrome/browser/sync/glue/data_type_error_handler.h b/chrome/browser/sync/glue/data_type_error_handler.h
index 90e5a1c..94e8409 100644
--- a/chrome/browser/sync/glue/data_type_error_handler.h
+++ b/chrome/browser/sync/glue/data_type_error_handler.h
@@ -10,7 +10,7 @@
#include "base/location.h"
#include "sync/api/sync_error.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
namespace browser_sync {
diff --git a/chrome/browser/sync/glue/data_type_error_handler_mock.h b/chrome/browser/sync/glue/data_type_error_handler_mock.h
index 1ef4e38..3ef7165 100644
--- a/chrome/browser/sync/glue/data_type_error_handler_mock.h
+++ b/chrome/browser/sync/glue/data_type_error_handler_mock.h
@@ -8,7 +8,7 @@
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "testing/gmock/include/gmock/gmock.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.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 1cee31d..db2ec3c 100644
--- a/chrome/browser/sync/glue/data_type_manager.h
+++ b/chrome/browser/sync/glue/data_type_manager.h
@@ -12,8 +12,8 @@
#include "chrome/browser/sync/glue/data_type_controller.h"
#include "sync/api/sync_error.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/configure_reason.h"
-#include "sync/internal_api/public/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 3b4b97e..874b9ad 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc
@@ -15,8 +15,8 @@
#include "content/public/browser/notification_service.h"
#include "content/public/test/mock_notification_observer.h"
#include "content/public/test/test_browser_thread.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/configure_reason.h"
-#include "sync/internal_api/public/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 82fb364..7c53fc8 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/frontend_data_type_controller.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "content/public/browser/browser_thread.h"
#include "sync/api/sync_error.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/util/data_type_histogram.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/model_associator.h b/chrome/browser/sync/glue/model_associator.h
index 0e7dc61..5952791 100644
--- a/chrome/browser/sync/glue/model_associator.h
+++ b/chrome/browser/sync/glue/model_associator.h
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/synchronization/lock.h"
#include "sync/api/sync_error.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
class BaseNode;
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 f7db76a..5afad7b 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
@@ -11,7 +11,7 @@
#include "content/public/browser/browser_thread.h"
#include "sync/api/sync_error.h"
#include "sync/api/syncable_service.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
using content::BrowserThread;
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 04298e3..1b8f9df 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "content/public/browser/browser_thread.h"
#include "sync/api/sync_error.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/util/data_type_histogram.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc
index 7f0c69e..b5d7392 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -23,10 +23,10 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
#include "sync/api/sync_error.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/change_record.h"
#include "sync/internal_api/public/read_node.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
#include "sync/protocol/session_specifics.pb.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index c6e4cbc..597c35c 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -29,10 +29,10 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "sync/api/sync_error.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
#include "sync/internal_api/public/write_node.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/session_specifics.pb.h"
diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h
index 69ca7f1..76f49fb 100644
--- a/chrome/browser/sync/glue/session_model_associator.h
+++ b/chrome/browser/sync/glue/session_model_associator.h
@@ -30,7 +30,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 "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
class Prefservice;
class Profile;
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index b577fd2..50feda2 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -20,11 +20,11 @@
#include "chrome/browser/sync/glue/chrome_sync_notification_bridge.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "googleurl/src/gurl.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/configure_reason.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
#include "sync/internal_api/public/sync_manager.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
#include "sync/internal_api/public/util/weak_handle.h"
diff --git a/chrome/browser/sync/glue/sync_backend_host_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
index 2fa250d..8d57f25 100644
--- a/chrome/browser/sync/glue/sync_backend_host_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
@@ -14,8 +14,8 @@
#include "content/public/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/test_url_fetcher_factory.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/util/experiments.h"
#include "sync/protocol/encryption.pb.h"
#include "sync/protocol/sync_protocol_error.h"
diff --git a/chrome/browser/sync/glue/sync_backend_registrar.h b/chrome/browser/sync/glue/sync_backend_registrar.h
index b06160d..6b966d9 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar.h
+++ b/chrome/browser/sync/glue/sync_backend_registrar.h
@@ -13,9 +13,9 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/sync_manager.h"
-#include "sync/internal_api/public/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 0d51739..cd96d24 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/sync/glue/ui_model_worker.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/test/test_user_share.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/glue/theme_model_associator.h b/chrome/browser/sync/glue/theme_model_associator.h
index cd7f014..49868f4 100644
--- a/chrome/browser/sync/glue/theme_model_associator.h
+++ b/chrome/browser/sync/glue/theme_model_associator.h
@@ -10,7 +10,7 @@
#include "base/compiler_specific.h"
#include "chrome/browser/sync/glue/data_type_error_handler.h"
#include "chrome/browser/sync/glue/model_associator.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/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 0734c78..6103f86 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller.cc
+++ b/chrome/browser/sync/glue/ui_data_type_controller.cc
@@ -12,7 +12,7 @@
#include "content/public/browser/browser_thread.h"
#include "sync/api/sync_error.h"
#include "sync/api/syncable_service.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/util/data_type_histogram.h"
using content::BrowserThread;
diff --git a/chrome/browser/sync/invalidations/invalidator_storage.cc b/chrome/browser/sync/invalidations/invalidator_storage.cc
index 971e5a2..4f9ca5b 100644
--- a/chrome/browser/sync/invalidations/invalidator_storage.cc
+++ b/chrome/browser/sync/invalidations/invalidator_storage.cc
@@ -11,7 +11,7 @@
#include "base/values.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
using syncer::InvalidationVersionMap;
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 303d4eb..db2477c 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -33,8 +33,8 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/util/experiments.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
#include "sync/js/sync_js_controller.h"
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index cf2e09f..b4f6bc4 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -48,9 +48,9 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "content/public/browser/notification_source.h"
#include "content/public/test/test_browser_thread.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/write_node.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/autofill_specifics.pb.h"
diff --git a/chrome/browser/sync/profile_sync_service_harness.h b/chrome/browser/sync/profile_sync_service_harness.h
index 1c3b05e..4b17ca0 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 "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/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 a9b2cc9..1a0578f 100644
--- a/chrome/browser/sync/profile_sync_service_mock.h
+++ b/chrome/browser/sync/profile_sync_service_mock.h
@@ -15,7 +15,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/test/base/testing_profile.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
index 72c029b..ddc13ff 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -29,10 +29,10 @@
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
#include "sync/api/sync_data.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/change_record.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/write_node.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/preference_specifics.pb.h"
diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc
index 37fd7e5..4faed6a 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -37,10 +37,10 @@
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/change_record.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/write_node.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/session_specifics.pb.h"
diff --git a/chrome/browser/sync/sync_prefs.h b/chrome/browser/sync/sync_prefs.h
index 4c38424..7844076 100644
--- a/chrome/browser/sync/sync_prefs.h
+++ b/chrome/browser/sync/sync_prefs.h
@@ -14,7 +14,7 @@
#include "base/time.h"
#include "chrome/browser/prefs/pref_member.h"
#include "content/public/browser/notification_observer.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/notifier/invalidation_state_tracker.h"
class PrefService;
diff --git a/chrome/browser/sync/sync_prefs_unittest.cc b/chrome/browser/sync/sync_prefs_unittest.cc
index 67998bd..dd2c268 100644
--- a/chrome/browser/sync/sync_prefs_unittest.cc
+++ b/chrome/browser/sync/sync_prefs_unittest.cc
@@ -7,7 +7,7 @@
#include "base/message_loop.h"
#include "base/time.h"
#include "chrome/test/base/testing_pref_service.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index f597154..abbbf26 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -27,8 +27,8 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/proto_enum_conversions.h"
#include "sync/protocol/sync_protocol_error.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc
index e712272..ef2b5a2 100644
--- a/chrome/browser/sync/test/integration/enable_disable_test.cc
+++ b/chrome/browser/sync/test/integration/enable_disable_test.cc
@@ -5,9 +5,9 @@
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
-#include "sync/internal_api/public/syncable/model_type.h"
// This file contains tests that exercise enabling and disabling data
// types.
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h
index df10681..e30d2cf 100644
--- a/chrome/browser/sync/test/integration/sync_test.h
+++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -19,7 +19,7 @@
#include "base/process_util.h"
#include "net/base/mock_host_resolver.h"
#include "net/test/local_sync_test_server.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
class CommandLine;
diff --git a/chrome/browser/sync/user_selectable_sync_type.h b/chrome/browser/sync/user_selectable_sync_type.h
index 0dae124..c1a4ddf 100644
--- a/chrome/browser/sync/user_selectable_sync_type.h
+++ b/chrome/browser/sync/user_selectable_sync_type.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,7 +13,7 @@ namespace user_selectable_type {
// via checkboxes in the "Advanced Sync Preferences" dialog. Used solely for the
// purposes of UMA histogram logging of the datatypes explicitly selected by
// users when sync is configured on a machine. This is a subset of the sync
-// types listed in sync/internal_api/public/syncable/model_type.h.
+// types listed in sync/internal_api/public/base/model_type.h.
//
// Note: New sync datatypes must be added to the end of this list. Adding them
// anywhere else will result in incorrect histogram logging.
diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc
index 078d6e6..13c47c2 100644
--- a/sync/api/sync_data.cc
+++ b/sync/api/sync_data.cc
@@ -10,8 +10,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/string_number_conversions.h"
#include "base/values.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base_node.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/proto_value_conversions.h"
#include "sync/protocol/sync.pb.h"
diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h
index ffe5825..cabeab9 100644
--- a/sync/api/sync_data.h
+++ b/sync/api/sync_data.h
@@ -11,7 +11,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/immutable.h"
namespace sync_pb {
diff --git a/sync/api/sync_error.cc b/sync/api/sync_error.cc
index aef1ede..be2a457 100644
--- a/sync/api/sync_error.cc
+++ b/sync/api/sync_error.cc
@@ -8,7 +8,7 @@
#include "base/location.h"
#include "base/logging.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
diff --git a/sync/api/sync_error.h b/sync/api/sync_error.h
index 7e24676..0e3a3c9 100644
--- a/sync/api/sync_error.h
+++ b/sync/api/sync_error.h
@@ -10,7 +10,7 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace tracked_objects {
class Location;
diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h
index 53e2cd5..2093047b 100644
--- a/sync/api/syncable_service.h
+++ b/sync/api/syncable_service.h
@@ -14,7 +14,7 @@
#include "sync/api/sync_change_processor.h"
#include "sync/api/sync_data.h"
#include "sync/api/sync_error.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
diff --git a/sync/engine/DEPS b/sync/engine/DEPS
index 591b69f..5f3eeee 100644
--- a/sync/engine/DEPS
+++ b/sync/engine/DEPS
@@ -1,8 +1,8 @@
include_rules = [
"+googleurl",
+ "+sync/internal_api/public/base",
"+sync/internal_api/public/engine",
"+sync/internal_api/public/sessions",
- "+sync/internal_api/public/syncable",
"+sync/internal_api/public/test",
"+sync/internal_api/public/util",
"+sync/protocol",
diff --git a/sync/engine/all_status.cc b/sync/engine/all_status.cc
index b5a0025..8d96422 100644
--- a/sync/engine/all_status.cc
+++ b/sync/engine/all_status.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/port.h"
#include "sync/engine/net/server_connection_manager.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/session_state.h"
namespace syncer {
diff --git a/sync/engine/all_status.h b/sync/engine/all_status.h
index bb4a943..2c50144 100644
--- a/sync/engine/all_status.h
+++ b/sync/engine/all_status.h
@@ -16,8 +16,8 @@
#include "base/synchronization/lock.h"
#include "sync/engine/sync_engine_event.h"
#include "sync/engine/syncer_types.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/sync_status.h"
-#include "sync/internal_api/public/syncable/model_type.h"
namespace syncer {
diff --git a/sync/engine/cleanup_disabled_types_command.cc b/sync/engine/cleanup_disabled_types_command.cc
index bba5029..bd34fa7 100644
--- a/sync/engine/cleanup_disabled_types_command.cc
+++ b/sync/engine/cleanup_disabled_types_command.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/sync_session.h"
#include "sync/sessions/sync_session_context.h"
#include "sync/syncable/directory.h"
diff --git a/sync/engine/cleanup_disabled_types_command_unittest.cc b/sync/engine/cleanup_disabled_types_command_unittest.cc
index d16d0b9..5b8f476 100644
--- a/sync/engine/cleanup_disabled_types_command_unittest.cc
+++ b/sync/engine/cleanup_disabled_types_command_unittest.cc
@@ -6,7 +6,7 @@
#include "sync/engine/cleanup_disabled_types_command.h"
-#include "sync/internal_api/public/syncable/model_type_test_util.h"
+#include "sync/internal_api/public/base/model_type_test_util.h"
#include "sync/sessions/sync_session.h"
#include "sync/test/engine/syncer_command_test.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/sync/engine/download_updates_command.cc b/sync/engine/download_updates_command.cc
index cde2c85..a6bc972 100644
--- a/sync/engine/download_updates_command.cc
+++ b/sync/engine/download_updates_command.cc
@@ -10,7 +10,7 @@
#include "sync/engine/syncer.h"
#include "sync/engine/syncer_proto_util.h"
#include "sync/engine/syncproto.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/syncable/directory.h"
using sync_pb::DebugInfo;
diff --git a/sync/engine/download_updates_command.h b/sync/engine/download_updates_command.h
index d4b7760..2dbbd6b 100644
--- a/sync/engine/download_updates_command.h
+++ b/sync/engine/download_updates_command.h
@@ -10,8 +10,8 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "sync/engine/syncer_command.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/sync.pb.h"
namespace sync_pb {
diff --git a/sync/engine/model_changing_syncer_command_unittest.cc b/sync/engine/model_changing_syncer_command_unittest.cc
index ac898c5..af30c89 100644
--- a/sync/engine/model_changing_syncer_command_unittest.cc
+++ b/sync/engine/model_changing_syncer_command_unittest.cc
@@ -6,7 +6,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "sync/engine/model_changing_syncer_command.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/sync_session.h"
#include "sync/test/engine/fake_model_worker.h"
#include "sync/test/engine/syncer_command_test.h"
diff --git a/sync/engine/process_updates_command_unittest.cc b/sync/engine/process_updates_command_unittest.cc
index 656091f..7e88e62 100644
--- a/sync/engine/process_updates_command_unittest.cc
+++ b/sync/engine/process_updates_command_unittest.cc
@@ -5,7 +5,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "sync/engine/process_updates_command.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/session_state.h"
#include "sync/sessions/sync_session.h"
#include "sync/syncable/syncable_id.h"
diff --git a/sync/engine/resolve_conflicts_command_unittest.cc b/sync/engine/resolve_conflicts_command_unittest.cc
index e5f3c44..85decbf 100644
--- a/sync/engine/resolve_conflicts_command_unittest.cc
+++ b/sync/engine/resolve_conflicts_command_unittest.cc
@@ -5,7 +5,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "sync/engine/resolve_conflicts_command.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/sync_session.h"
#include "sync/syncable/syncable_id.h"
#include "sync/test/engine/fake_model_worker.h"
diff --git a/sync/engine/store_timestamps_command.cc b/sync/engine/store_timestamps_command.cc
index 89a3088..d83d154 100644
--- a/sync/engine/store_timestamps_command.cc
+++ b/sync/engine/store_timestamps_command.cc
@@ -4,7 +4,7 @@
#include "sync/engine/store_timestamps_command.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/status_controller.h"
#include "sync/sessions/sync_session.h"
#include "sync/syncable/directory.h"
diff --git a/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc
index 23ad567..b41625a 100644
--- a/sync/engine/sync_scheduler.cc
+++ b/sync/engine/sync_scheduler.cc
@@ -603,8 +603,7 @@ void SyncScheduler::ScheduleConfiguration(
SyncSession* session = new SyncSession(session_context_, this,
SyncSourceInfo(source,
- syncable::ModelTypePayloadMapFromRoutingInfo(
- routes, std::string())),
+ ModelSafeRoutingInfoToPayloadMap(routes, std::string())),
routes, workers);
SyncSessionJob job(SyncSessionJob::CONFIGURATION, TimeTicks::Now(),
make_linked_ptr(session),
@@ -1032,7 +1031,7 @@ void SyncScheduler::PollTimerCallback() {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
ModelSafeRoutingInfo r;
ModelTypePayloadMap types_with_payloads =
- syncable::ModelTypePayloadMapFromRoutingInfo(r, std::string());
+ ModelSafeRoutingInfoToPayloadMap(r, std::string());
SyncSourceInfo info(GetUpdatesCallerInfo::PERIODIC, types_with_payloads);
SyncSession* s = CreateSyncSession(info);
diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h
index d8ea732..60f9384 100644
--- a/sync/engine/sync_scheduler.h
+++ b/sync/engine/sync_scheduler.h
@@ -21,8 +21,8 @@
#include "sync/engine/net/server_connection_manager.h"
#include "sync/engine/nudge_source.h"
#include "sync/engine/syncer.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/engine/polling_constants.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/sessions/sync_session.h"
#include "sync/sessions/sync_session_context.h"
diff --git a/sync/engine/syncer.h b/sync/engine/syncer.h
index 18f9fd2..2c3e883 100644
--- a/sync/engine/syncer.h
+++ b/sync/engine/syncer.h
@@ -15,7 +15,7 @@
#include "sync/engine/conflict_resolver.h"
#include "sync/engine/syncer_types.h"
#include "sync/engine/syncproto.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/sync_session.h"
#include "sync/util/extensions_activity_monitor.h"
diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc
index cac0516..917f644 100644
--- a/sync/engine/syncer_proto_util.cc
+++ b/sync/engine/syncer_proto_util.cc
@@ -11,7 +11,7 @@
#include "sync/engine/syncer_types.h"
#include "sync/engine/throttled_data_type_tracker.h"
#include "sync/engine/traffic_logger.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
#include "sync/protocol/sync_enums.pb.h"
#include "sync/protocol/sync_protocol_error.h"
diff --git a/sync/engine/syncer_proto_util.h b/sync/engine/syncer_proto_util.h
index de46091..33fb322 100644
--- a/sync/engine/syncer_proto_util.h
+++ b/sync/engine/syncer_proto_util.h
@@ -10,7 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/time.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/syncer_error.h"
#include "sync/sessions/sync_session.h"
#include "sync/syncable/blob.h"
diff --git a/sync/engine/syncer_proto_util_unittest.cc b/sync/engine/syncer_proto_util_unittest.cc
index 4f31ac0..ff8a733 100644
--- a/sync/engine/syncer_proto_util_unittest.cc
+++ b/sync/engine/syncer_proto_util_unittest.cc
@@ -12,7 +12,7 @@
#include "base/time.h"
#include "sync/engine/syncproto.h"
#include "sync/engine/throttled_data_type_tracker.h"
-#include "sync/internal_api/public/syncable/model_type_test_util.h"
+#include "sync/internal_api/public/base/model_type_test_util.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 7cf24c8..04811eb 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -32,8 +32,8 @@
#include "sync/engine/syncproto.h"
#include "sync/engine/throttled_data_type_tracker.h"
#include "sync/engine/traffic_recorder.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/protocol/preference_specifics.pb.h"
@@ -179,7 +179,7 @@ class SyncerTest : public testing::Test,
GetModelSafeRoutingInfo(&info);
GetWorkers(&workers);
syncable::ModelTypePayloadMap types =
- syncable::ModelTypePayloadMapFromRoutingInfo(info, std::string());
+ ModelSafeRoutingInfoToPayloadMap(info, std::string());
return new SyncSession(context_.get(), this,
sessions::SyncSourceInfo(sync_pb::GetUpdatesCallerInfo::UNKNOWN, types),
info, workers);
diff --git a/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc
index 270eafd..821b07c 100644
--- a/sync/engine/syncer_util.cc
+++ b/sync/engine/syncer_util.cc
@@ -15,7 +15,7 @@
#include "sync/engine/syncer_proto_util.h"
#include "sync/engine/syncer_types.h"
#include "sync/engine/syncproto.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
diff --git a/sync/engine/syncproto.h b/sync/engine/syncproto.h
index 8fa4697..eb9bc77 100644
--- a/sync/engine/syncproto.h
+++ b/sync/engine/syncproto.h
@@ -8,7 +8,7 @@
#define SYNC_ENGINE_SYNCPROTO_H_
#pragma once
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
#include "sync/syncable/syncable_id.h"
diff --git a/sync/engine/throttled_data_type_tracker.cc b/sync/engine/throttled_data_type_tracker.cc
index e27f2e3..c41cb6f 100644
--- a/sync/engine/throttled_data_type_tracker.cc
+++ b/sync/engine/throttled_data_type_tracker.cc
@@ -5,7 +5,7 @@
#include "sync/engine/throttled_data_type_tracker.h"
#include "sync/engine/all_status.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
diff --git a/sync/engine/throttled_data_type_tracker.h b/sync/engine/throttled_data_type_tracker.h
index a496bea..1441973 100644
--- a/sync/engine/throttled_data_type_tracker.h
+++ b/sync/engine/throttled_data_type_tracker.h
@@ -9,7 +9,7 @@
#include <map>
#include "base/gtest_prod_util.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
diff --git a/sync/engine/throttled_data_type_tracker_unittest.cc b/sync/engine/throttled_data_type_tracker_unittest.cc
index 20b7237..54a600f 100644
--- a/sync/engine/throttled_data_type_tracker_unittest.cc
+++ b/sync/engine/throttled_data_type_tracker_unittest.cc
@@ -4,7 +4,7 @@
#include "sync/engine/throttled_data_type_tracker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::TimeDelta;
diff --git a/sync/internal_api/change_reorder_buffer.cc b/sync/internal_api/change_reorder_buffer.cc
index 786fd46..916ce3a0 100644
--- a/sync/internal_api/change_reorder_buffer.cc
+++ b/sync/internal_api/change_reorder_buffer.cc
@@ -9,8 +9,8 @@
#include <set>
#include <utility> // for pair<>
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/read_node.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/syncable/base_transaction.h"
#include "sync/syncable/directory.h"
#include "sync/syncable/entry.h"
diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc
index 2373349..d13218a 100644
--- a/sync/internal_api/js_mutation_event_observer_unittest.cc
+++ b/sync/internal_api/js_mutation_event_observer_unittest.cc
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "base/values.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/js/js_event_details.h"
#include "sync/js/js_test_util.h"
diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc
index 70b4e48..8a9889b 100644
--- a/sync/internal_api/js_sync_manager_observer.cc
+++ b/sync/internal_api/js_sync_manager_observer.cc
@@ -10,9 +10,9 @@
#include "base/logging.h"
#include "base/string_number_conversions.h"
#include "base/values.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/change_record.h"
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
-#include "sync/internal_api/public/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"
diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc
index 95f4e23..f0b9e85 100644
--- a/sync/internal_api/js_sync_manager_observer_unittest.cc
+++ b/sync/internal_api/js_sync_manager_observer_unittest.cc
@@ -8,8 +8,8 @@
#include "base/location.h"
#include "base/message_loop.h"
#include "base/values.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/js/js_event_details.h"
#include "sync/js/js_test_util.h"
diff --git a/sync/internal_api/public/base/DEPS b/sync/internal_api/public/base/DEPS
new file mode 100644
index 0000000..84d3b46
--- /dev/null
+++ b/sync/internal_api/public/base/DEPS
@@ -0,0 +1,4 @@
+include_rules = [
+ "-sync",
+ "+sync/internal_api/public/base",
+]
diff --git a/sync/internal_api/public/util/enum_set.h b/sync/internal_api/public/base/enum_set.h
index 911ad12..2daf0845 100644
--- a/sync/internal_api/public/util/enum_set.h
+++ b/sync/internal_api/public/base/enum_set.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 SYNC_INTERNAL_API_PUBLIC_UTIL_ENUM_SET_H_
-#define SYNC_INTERNAL_API_PUBLIC_UTIL_ENUM_SET_H_
+#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_ENUM_SET_H_
+#define SYNC_INTERNAL_API_PUBLIC_BASE_ENUM_SET_H_
#pragma once
#include <bitset>
@@ -283,4 +283,4 @@ EnumSet<E, Min, Max> Difference(EnumSet<E, Min, Max> set1,
} // namespace syncer
-#endif // SYNC_INTERNAL_API_PUBLIC_UTIL_ENUM_SET_H_
+#endif // SYNC_INTERNAL_API_PUBLIC_BASE_ENUM_SET_H_
diff --git a/sync/internal_api/public/util/enum_set_unittest.cc b/sync/internal_api/public/base/enum_set_unittest.cc
index 5f222c6..d4692a60 100644
--- a/sync/internal_api/public/util/enum_set_unittest.cc
+++ b/sync/internal_api/public/base/enum_set_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 "sync/internal_api/public/util/enum_set.h"
+#include "sync/internal_api/public/base/enum_set.h"
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/sync/internal_api/public/syncable/model_type.h b/sync/internal_api/public/base/model_type.h
index a63ac65..77c2344 100644
--- a/sync/internal_api/public/syncable/model_type.h
+++ b/sync/internal_api/public/base/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 SYNC_INTERNAL_API_PUBLIC_SYNCABLE_MODEL_TYPE_H_
-#define SYNC_INTERNAL_API_PUBLIC_SYNCABLE_MODEL_TYPE_H_
+#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
+#define SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
#pragma once
#include <set>
@@ -15,7 +15,7 @@
#include "base/logging.h"
#include "base/time.h"
-#include "sync/internal_api/public/util/enum_set.h"
+#include "sync/internal_api/public/base/enum_set.h"
namespace base {
class ListValue;
@@ -224,4 +224,4 @@ using syncer::syncable::IsRealDataType;
} // namespace syncable
-#endif // SYNC_INTERNAL_API_PUBLIC_SYNCABLE_MODEL_TYPE_H_
+#endif // SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
diff --git a/sync/internal_api/public/syncable/model_type_payload_map.cc b/sync/internal_api/public/base/model_type_payload_map.cc
index 4857178..8fb458c 100644
--- a/sync/internal_api/public/syncable/model_type_payload_map.cc
+++ b/sync/internal_api/public/base/model_type_payload_map.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 "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include <vector>
@@ -35,17 +35,6 @@ ModelTypeSet ModelTypePayloadMapToEnumSet(
return types;
}
-ModelTypePayloadMap ModelTypePayloadMapFromRoutingInfo(
- const syncer::ModelSafeRoutingInfo& routes,
- const std::string& payload) {
- ModelTypePayloadMap types_with_payloads;
- for (syncer::ModelSafeRoutingInfo::const_iterator i = routes.begin();
- i != routes.end(); ++i) {
- types_with_payloads[i->first] = payload;
- }
- return types_with_payloads;
-}
-
std::string ModelTypePayloadMapToString(
const ModelTypePayloadMap& type_payloads) {
scoped_ptr<DictionaryValue> value(
@@ -85,23 +74,6 @@ void CoalescePayloads(ModelTypePayloadMap* original,
}
}
-void PurgeStalePayload(ModelTypePayloadMap* original,
- const ModelSafeRoutingInfo& routing_info) {
- std::vector<ModelTypePayloadMap::iterator> iterators_to_delete;
- for (ModelTypePayloadMap::iterator i = original->begin();
- i != original->end(); ++i) {
- if (routing_info.end() == routing_info.find(i->first)) {
- iterators_to_delete.push_back(i);
- }
- }
-
- for (std::vector<ModelTypePayloadMap::iterator>::iterator
- it = iterators_to_delete.begin(); it != iterators_to_delete.end();
- ++it) {
- original->erase(*it);
- }
-}
-
} // namespace syncable
} // namespace syncer
diff --git a/sync/internal_api/public/syncable/model_type_payload_map.h b/sync/internal_api/public/base/model_type_payload_map.h
index 077206b..b95e152 100644
--- a/sync/internal_api/public/syncable/model_type_payload_map.h
+++ b/sync/internal_api/public/base/model_type_payload_map.h
@@ -4,15 +4,14 @@
//
// Definition of ModelTypePayloadMap and various utility functions.
-#ifndef SYNC_INTERNAL_PUBLIC_API_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
-#define SYNC_INTERNAL_PUBLIC_API_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
+#ifndef SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_PAYLOAD_MAP_H_
+#define SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_PAYLOAD_MAP_H_
#pragma once
#include <map>
#include <string>
-#include "sync/internal_api/public/engine/model_safe_worker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace base {
class DictionaryValue;
@@ -35,12 +34,6 @@ ModelTypePayloadMap ModelTypePayloadMapFromEnumSet(
ModelTypeSet ModelTypePayloadMapToEnumSet(
const ModelTypePayloadMap& payload_map);
-// Make a TypePayloadMap for all the enabled types in a
-// ModelSafeRoutingInfo using a default payload.
-ModelTypePayloadMap ModelTypePayloadMapFromRoutingInfo(
- const syncer::ModelSafeRoutingInfo& routes,
- const std::string& payload);
-
std::string ModelTypePayloadMapToString(
const ModelTypePayloadMap& model_type_payloads);
@@ -53,9 +46,6 @@ base::DictionaryValue* ModelTypePayloadMapToValue(
void CoalescePayloads(ModelTypePayloadMap* original,
const ModelTypePayloadMap& update);
-void PurgeStalePayload(ModelTypePayloadMap* original,
- const syncer::ModelSafeRoutingInfo& routing_info);
-
} // namespace syncable
} // namespace syncer
@@ -66,12 +56,10 @@ namespace syncable {
using ::syncer::syncable::ModelTypePayloadMap;
using ::syncer::syncable::ModelTypePayloadMapFromEnumSet;
using ::syncer::syncable::ModelTypePayloadMapToEnumSet;
-using ::syncer::syncable::ModelTypePayloadMapFromRoutingInfo;
using ::syncer::syncable::ModelTypePayloadMapToString;
using ::syncer::syncable::ModelTypePayloadMapToValue;
using ::syncer::syncable::CoalescePayloads;
-using ::syncer::syncable::PurgeStalePayload;
} // namespace syncable
-#endif // SYNC_INTERNAL_PUBLIC_API_SYNCABLE_MODEL_TYPE_PAYLOAD_MAP_H_
+#endif // SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_PAYLOAD_MAP_H_
diff --git a/sync/internal_api/public/syncable/model_type_payload_map_unittest.cc b/sync/internal_api/public/base/model_type_payload_map_unittest.cc
index dad782b..485048d 100644
--- a/sync/internal_api/public/syncable/model_type_payload_map_unittest.cc
+++ b/sync/internal_api/public/base/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 "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include <string>
@@ -43,6 +43,33 @@ TEST_F(ModelTypePayloadMapTest, TypePayloadMapToValue) {
EXPECT_FALSE(value->HasKey("Preferences"));
}
+TEST_F(ModelTypePayloadMapTest, CoalescePayloads) {
+ syncable::ModelTypePayloadMap original;
+ std::string empty_payload;
+ std::string payload1 = "payload1";
+ std::string payload2 = "payload2";
+ std::string payload3 = "payload3";
+ original[syncable::BOOKMARKS] = empty_payload;
+ original[syncable::PASSWORDS] = payload1;
+ original[syncable::AUTOFILL] = payload2;
+ original[syncable::THEMES] = payload3;
+
+ syncable::ModelTypePayloadMap update;
+ update[syncable::BOOKMARKS] = empty_payload; // Same.
+ update[syncable::PASSWORDS] = empty_payload; // Overwrite with empty.
+ update[syncable::AUTOFILL] = payload1; // Overwrite with non-empty.
+ update[syncable::SESSIONS] = payload2; // New.
+ // Themes untouched.
+
+ CoalescePayloads(&original, update);
+ ASSERT_EQ(5U, original.size());
+ EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]);
+ EXPECT_EQ(payload1, original[syncable::PASSWORDS]);
+ EXPECT_EQ(payload1, original[syncable::AUTOFILL]);
+ EXPECT_EQ(payload2, original[syncable::SESSIONS]);
+ EXPECT_EQ(payload3, original[syncable::THEMES]);
+}
+
} // namespace
} // namespace syncable
} // namespace syncer
diff --git a/sync/internal_api/public/syncable/model_type_test_util.cc b/sync/internal_api/public/base/model_type_test_util.cc
index 0ceaab2..5c07e8c 100644
--- a/sync/internal_api/public/syncable/model_type_test_util.cc
+++ b/sync/internal_api/public/base/model_type_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 "sync/internal_api/public/syncable/model_type_test_util.h"
+#include "sync/internal_api/public/base/model_type_test_util.h"
namespace syncer {
namespace syncable {
diff --git a/sync/internal_api/public/syncable/model_type_test_util.h b/sync/internal_api/public/base/model_type_test_util.h
index f60e1c0..4f5b804 100644
--- a/sync/internal_api/public/syncable/model_type_test_util.h
+++ b/sync/internal_api/public/base/model_type_test_util.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 SYNC_INTERNAL_PUBLIC_API_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
-#define SYNC_INTERNAL_PUBLIC_API_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
+#ifndef SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_TEST_UTIL_H_
+#define SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_TEST_UTIL_H_
#pragma once
#include <ostream>
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace syncer {
@@ -25,4 +25,4 @@ void PrintTo(ModelTypeSet model_types, ::std::ostream* os);
} // namespace syncable
} // namespace syncer
-#endif // SYNC_INTERNAL_PUBLIC_API_SYNCABLE_MODEL_TYPE_TEST_UTIL_H_
+#endif // SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_TEST_UTIL_H_
diff --git a/sync/internal_api/public/base_node.h b/sync/internal_api/public/base_node.h
index 666c231..7112d73 100644
--- a/sync/internal_api/public/base_node.h
+++ b/sync/internal_api/public/base_node.h
@@ -13,7 +13,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
// Forward declarations of internal class types so that sync API objects
diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc
index 0bde89b..f3722d4 100644
--- a/sync/internal_api/public/engine/model_safe_worker.cc
+++ b/sync/internal_api/public/engine/model_safe_worker.cc
@@ -29,6 +29,17 @@ std::string ModelSafeRoutingInfoToString(
return json;
}
+syncable::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap(
+ const ModelSafeRoutingInfo& routes,
+ const std::string& payload) {
+ syncable::ModelTypePayloadMap types_with_payloads;
+ for (ModelSafeRoutingInfo::const_iterator i = routes.begin();
+ i != routes.end(); ++i) {
+ types_with_payloads[i->first] = payload;
+ }
+ return types_with_payloads;
+}
+
syncable::ModelTypeSet GetRoutingInfoTypes(
const ModelSafeRoutingInfo& routing_info) {
syncable::ModelTypeSet types;
diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h
index a78a322..ce14c1d 100644
--- a/sync/internal_api/public/engine/model_safe_worker.h
+++ b/sync/internal_api/public/engine/model_safe_worker.h
@@ -12,7 +12,8 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/util/syncer_error.h"
namespace base {
@@ -76,6 +77,12 @@ base::DictionaryValue* ModelSafeRoutingInfoToValue(
std::string ModelSafeRoutingInfoToString(
const ModelSafeRoutingInfo& routing_info);
+// Make a ModelTypePayloadMap for all the enabled types in a
+// ModelSafeRoutingInfo using a default payload.
+syncable::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap(
+ const ModelSafeRoutingInfo& routes,
+ const std::string& payload);
+
syncable::ModelTypeSet GetRoutingInfoTypes(
const ModelSafeRoutingInfo& routing_info);
diff --git a/sync/internal_api/public/engine/model_safe_worker_unittest.cc b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
index 550c1b2..a25e0b1 100644
--- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc
+++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
@@ -51,5 +51,21 @@ TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) {
EXPECT_TRUE(GetRoutingInfoTypes(routing_info).Equals(expected_types));
}
+TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToPayloadMap) {
+ std::string payload = "test";
+ ModelSafeRoutingInfo routing_info;
+ routing_info[syncable::BOOKMARKS] = GROUP_PASSIVE;
+ routing_info[syncable::NIGORI] = GROUP_UI;
+ routing_info[syncable::PREFERENCES] = GROUP_DB;
+ syncable::ModelTypePayloadMap types_with_payloads =
+ ModelSafeRoutingInfoToPayloadMap(routing_info, payload);
+ ASSERT_EQ(routing_info.size(), types_with_payloads.size());
+ for (ModelSafeRoutingInfo::iterator iter = routing_info.begin();
+ iter != routing_info.end();
+ ++iter) {
+ EXPECT_EQ(payload, types_with_payloads[iter->first]);
+ }
+}
+
} // namespace
} // namespace syncer
diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h
index cb15adc..c9cff52 100644
--- a/sync/internal_api/public/engine/sync_status.h
+++ b/sync/internal_api/public/engine/sync_status.h
@@ -7,7 +7,7 @@
#include <string>
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
namespace syncer {
diff --git a/sync/internal_api/public/read_node.h b/sync/internal_api/public/read_node.h
index c2a9428..c3947a7 100644
--- a/sync/internal_api/public/read_node.h
+++ b/sync/internal_api/public/read_node.h
@@ -10,8 +10,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base_node.h"
-#include "sync/internal_api/public/syncable/model_type.h"
namespace syncer {
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index 74fba25..4427236 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -5,6 +5,7 @@
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
#include "base/json/json_writer.h"
+#include "base/memory/scoped_ptr.h"
#include "base/values.h"
namespace syncer {
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h
index 9029132..2363878 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.h
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.h
@@ -10,10 +10,10 @@
#include "base/basictypes.h"
#include "base/time.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/sessions/model_neutral_state.h"
#include "sync/internal_api/public/sessions/sync_source_info.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
namespace base {
class DictionaryValue;
diff --git a/sync/internal_api/public/sessions/sync_source_info.h b/sync/internal_api/public/sessions/sync_source_info.h
index 6902b26..6505411 100644
--- a/sync/internal_api/public/sessions/sync_source_info.h
+++ b/sync/internal_api/public/sessions/sync_source_info.h
@@ -7,8 +7,8 @@
#pragma once
#include "base/basictypes.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/protocol/sync.pb.h"
namespace base {
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index 3b7164d..8c196a1 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -15,11 +15,11 @@
#include "base/task_runner.h"
#include "base/threading/thread_checker.h"
#include "base/time.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/change_record.h"
#include "sync/internal_api/public/configure_reason.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/engine/sync_status.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
#include "sync/internal_api/public/util/weak_handle.h"
diff --git a/sync/internal_api/public/test/test_entry_factory.h b/sync/internal_api/public/test/test_entry_factory.h
index 6f794d57..bcf5316 100644
--- a/sync/internal_api/public/test/test_entry_factory.h
+++ b/sync/internal_api/public/test/test_entry_factory.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/basictypes.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
namespace syncer {
diff --git a/sync/internal_api/public/util/experiments.h b/sync/internal_api/public/util/experiments.h
index c6febe8..b1c1817 100644
--- a/sync/internal_api/public/util/experiments.h
+++ b/sync/internal_api/public/util/experiments.h
@@ -6,7 +6,7 @@
#define SYNC_UTIL_EXPERIMENTS_
#pragma once
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
diff --git a/sync/internal_api/public/write_node.h b/sync/internal_api/public/write_node.h
index d97c586..29182de 100644
--- a/sync/internal_api/public/write_node.h
+++ b/sync/internal_api/public/write_node.h
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base_node.h"
-#include "sync/internal_api/public/syncable/model_type.h"
namespace sync_pb {
class AppSpecifics;
diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc
index 0e5debb..2d0645d 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -27,13 +27,13 @@
#include "sync/internal_api/debug_info_event_listener.h"
#include "sync/internal_api/js_mutation_event_observer.h"
#include "sync/internal_api/js_sync_manager_observer.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/base_node.h"
#include "sync/internal_api/public/configure_reason.h"
#include "sync/internal_api/public/engine/polling_constants.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
#include "sync/internal_api/public/user_share.h"
#include "sync/internal_api/public/util/experiments.h"
#include "sync/internal_api/public/write_node.h"
diff --git a/sync/internal_api/syncapi_unittest.cc b/sync/internal_api/syncapi_unittest.cc
index 12429ed6..43ae0d5 100644
--- a/sync/internal_api/syncapi_unittest.cc
+++ b/sync/internal_api/syncapi_unittest.cc
@@ -23,6 +23,7 @@
#include "base/test/values_test_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "sync/internal_api/public/base/model_type_test_util.h"
#include "sync/internal_api/public/change_record.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/engine/polling_constants.h"
@@ -31,7 +32,6 @@
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
#include "sync/internal_api/public/sync_manager.h"
-#include "sync/internal_api/public/syncable/model_type_test_util.h"
#include "sync/internal_api/public/test/test_user_share.h"
#include "sync/internal_api/public/write_node.h"
#include "sync/internal_api/public/write_transaction.h"
diff --git a/sync/notifier/DEPS b/sync/notifier/DEPS
index b718f9e..c59f7bf 100644
--- a/sync/notifier/DEPS
+++ b/sync/notifier/DEPS
@@ -5,7 +5,7 @@ include_rules = [
"+net/url_request/url_request_context.h",
"+net/url_request/url_request_test_util.h",
- "+sync/internal_api/public/syncable",
+ "+sync/internal_api/public/base",
"+sync/internal_api/public/util",
"+sync/protocol/service_constants.h",
"+sync/util",
diff --git a/sync/notifier/invalidation_notifier.cc b/sync/notifier/invalidation_notifier.cc
index 06b4d46..f373d18 100644
--- a/sync/notifier/invalidation_notifier.cc
+++ b/sync/notifier/invalidation_notifier.cc
@@ -9,7 +9,7 @@
#include "base/metrics/histogram.h"
#include "jingle/notifier/listener/push_client.h"
#include "net/url_request/url_request_context.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/notifier/sync_notifier_observer.h"
#include "talk/xmpp/jid.h"
#include "talk/xmpp/xmppclientsettings.h"
diff --git a/sync/notifier/invalidation_notifier.h b/sync/notifier/invalidation_notifier.h
index f49be624..d579427 100644
--- a/sync/notifier/invalidation_notifier.h
+++ b/sync/notifier/invalidation_notifier.h
@@ -20,7 +20,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/threading/non_thread_safe.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/chrome_invalidation_client.h"
#include "sync/notifier/invalidation_state_tracker.h"
diff --git a/sync/notifier/invalidation_notifier_unittest.cc b/sync/notifier/invalidation_notifier_unittest.cc
index 31b933f..ab82414 100644
--- a/sync/notifier/invalidation_notifier_unittest.cc
+++ b/sync/notifier/invalidation_notifier_unittest.cc
@@ -10,8 +10,8 @@
#include "jingle/notifier/base/notifier_options.h"
#include "jingle/notifier/listener/fake_push_client.h"
#include "net/url_request/url_request_test_util.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/invalidation_state_tracker.h"
#include "sync/notifier/mock_invalidation_state_tracker.h"
diff --git a/sync/notifier/invalidation_util.h b/sync/notifier/invalidation_util.h
index eaf1ff9..1ec1235 100644
--- a/sync/notifier/invalidation_util.h
+++ b/sync/notifier/invalidation_util.h
@@ -11,7 +11,7 @@
#include <set>
#include <string>
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace invalidation {
diff --git a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
index a321907..18153b5 100644
--- a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
+++ b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
@@ -10,8 +10,8 @@
#include "base/threading/thread.h"
#include "jingle/notifier/base/fake_base_task.h"
#include "net/url_request/url_request_test_util.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/invalidation_state_tracker.h"
#include "sync/notifier/mock_sync_notifier_observer.h"
diff --git a/sync/notifier/p2p_notifier.cc b/sync/notifier/p2p_notifier.cc
index f92cd98..b02d604 100644
--- a/sync/notifier/p2p_notifier.cc
+++ b/sync/notifier/p2p_notifier.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/values.h"
#include "jingle/notifier/listener/push_client.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/notifier/sync_notifier_observer.h"
namespace syncer {
diff --git a/sync/notifier/p2p_notifier.h b/sync/notifier/p2p_notifier.h
index 7ef9238..3b91283 100644
--- a/sync/notifier/p2p_notifier.h
+++ b/sync/notifier/p2p_notifier.h
@@ -17,7 +17,7 @@
#include "base/observer_list.h"
#include "base/threading/thread_checker.h"
#include "jingle/notifier/listener/push_client_observer.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/notifier/notifications_disabled_reason.h"
#include "sync/notifier/sync_notifier.h"
diff --git a/sync/notifier/p2p_notifier_unittest.cc b/sync/notifier/p2p_notifier_unittest.cc
index 905e688..c8bf0d7 100644
--- a/sync/notifier/p2p_notifier_unittest.cc
+++ b/sync/notifier/p2p_notifier_unittest.cc
@@ -7,7 +7,7 @@
#include <cstddef>
#include "jingle/notifier/listener/fake_push_client.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/notifier/mock_sync_notifier_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/sync/notifier/sync_notifier.h b/sync/notifier/sync_notifier.h
index a92a8a4..c171baa 100644
--- a/sync/notifier/sync_notifier.h
+++ b/sync/notifier/sync_notifier.h
@@ -11,7 +11,7 @@
#include <string>
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer {
class SyncNotifierObserver;
diff --git a/sync/notifier/sync_notifier_factory_unittest.cc b/sync/notifier/sync_notifier_factory_unittest.cc
index 629bc23..e11d9cf 100644
--- a/sync/notifier/sync_notifier_factory_unittest.cc
+++ b/sync/notifier/sync_notifier_factory_unittest.cc
@@ -14,8 +14,8 @@
#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/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/notifier/invalidation_state_tracker.h"
#include "sync/notifier/mock_sync_notifier_observer.h"
#include "sync/notifier/sync_notifier.h"
diff --git a/sync/notifier/sync_notifier_observer.h b/sync/notifier/sync_notifier_observer.h
index b09770d..24496d5 100644
--- a/sync/notifier/sync_notifier_observer.h
+++ b/sync/notifier/sync_notifier_observer.h
@@ -6,7 +6,7 @@
#define SYNC_NOTIFIER_SYNC_NOTIFIER_OBSERVER_H_
#pragma once
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/notifier/notifications_disabled_reason.h"
namespace syncer {
diff --git a/sync/protocol/DEPS b/sync/protocol/DEPS
index d60f62f..00a61b9 100644
--- a/sync/protocol/DEPS
+++ b/sync/protocol/DEPS
@@ -1,3 +1,3 @@
include_rules = [
- "+sync/internal_api/public/syncable",
+ "+sync/internal_api/public/base",
]
diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc
index 304a33f..173a1c0 100644
--- a/sync/protocol/proto_value_conversions_unittest.cc
+++ b/sync/protocol/proto_value_conversions_unittest.cc
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/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"
diff --git a/sync/protocol/sync_protocol_error.h b/sync/protocol/sync_protocol_error.h
index 718cc2d..29b7f19 100644
--- a/sync/protocol/sync_protocol_error.h
+++ b/sync/protocol/sync_protocol_error.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/values.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace syncer{
diff --git a/sync/sessions/DEPS b/sync/sessions/DEPS
index 81c88ab..bdbefee 100644
--- a/sync/sessions/DEPS
+++ b/sync/sessions/DEPS
@@ -1,8 +1,8 @@
include_rules = [
"+sync/engine",
+ "+sync/internal_api/public/base",
"+sync/internal_api/public/engine",
"+sync/internal_api/public/sessions",
- "+sync/internal_api/public/syncable",
"+sync/protocol",
"+sync/syncable",
"+sync/test",
diff --git a/sync/sessions/ordered_commit_set.h b/sync/sessions/ordered_commit_set.h
index 1fe8d7c..ed606bc 100644
--- a/sync/sessions/ordered_commit_set.h
+++ b/sync/sessions/ordered_commit_set.h
@@ -10,8 +10,8 @@
#include <set>
#include <vector>
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/syncable/syncable_id.h"
namespace syncer {
diff --git a/sync/sessions/status_controller.cc b/sync/sessions/status_controller.cc
index 5cca02c..7ca043e 100644
--- a/sync/sessions/status_controller.cc
+++ b/sync/sessions/status_controller.cc
@@ -7,7 +7,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
namespace syncer {
diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc
index da73b1a..19a643d 100644
--- a/sync/sessions/sync_session.cc
+++ b/sync/sessions/sync_session.cc
@@ -8,7 +8,8 @@
#include <iterator>
#include "base/logging.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/syncable/directory.h"
namespace syncer {
@@ -47,6 +48,23 @@ std::set<ModelSafeGroup> ComputeEnabledGroups(
return enabled_groups;
}
+void PurgeStalePayload(syncable::ModelTypePayloadMap* original,
+ const ModelSafeRoutingInfo& routing_info) {
+ std::vector<syncable::ModelTypePayloadMap::iterator> iterators_to_delete;
+ for (syncable::ModelTypePayloadMap::iterator i = original->begin();
+ i != original->end(); ++i) {
+ if (routing_info.end() == routing_info.find(i->first)) {
+ iterators_to_delete.push_back(i);
+ }
+ }
+
+ for (std::vector<syncable::ModelTypePayloadMap::iterator>::iterator
+ it = iterators_to_delete.begin(); it != iterators_to_delete.end();
+ ++it) {
+ original->erase(*it);
+ }
+}
+
} // namesepace
SyncSession::SyncSession(SyncSessionContext* context, Delegate* delegate,
diff --git a/sync/sessions/sync_session.h b/sync/sessions/sync_session.h
index a402fa6..0e3118a 100644
--- a/sync/sessions/sync_session.h
+++ b/sync/sessions/sync_session.h
@@ -24,9 +24,9 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
-#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/sessions/ordered_commit_set.h"
#include "sync/sessions/session_state.h"
#include "sync/sessions/status_controller.h"
diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc
index 1edef4d..45e2a08 100644
--- a/sync/sessions/sync_session_unittest.cc
+++ b/sync/sessions/sync_session_unittest.cc
@@ -11,7 +11,7 @@
#include "sync/engine/conflict_resolver.h"
#include "sync/engine/syncer_types.h"
#include "sync/engine/throttled_data_type_tracker.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/session_state.h"
#include "sync/sessions/status_controller.h"
#include "sync/syncable/syncable_id.h"
@@ -496,45 +496,6 @@ TEST_F(SyncSessionTest, MakeTypePayloadMapFromBitSet) {
EXPECT_EQ(types_with_payloads[syncable::AUTOFILL], payload);
}
-TEST_F(SyncSessionTest, MakeTypePayloadMapFromRoutingInfo) {
- std::string payload = "test";
- syncable::ModelTypePayloadMap types_with_payloads
- = syncable::ModelTypePayloadMapFromRoutingInfo(routes_, payload);
- ASSERT_EQ(routes_.size(), types_with_payloads.size());
- for (ModelSafeRoutingInfo::iterator iter = routes_.begin();
- iter != routes_.end();
- ++iter) {
- EXPECT_EQ(payload, types_with_payloads[iter->first]);
- }
-}
-
-TEST_F(SyncSessionTest, CoalescePayloads) {
- syncable::ModelTypePayloadMap original;
- std::string empty_payload;
- std::string payload1 = "payload1";
- std::string payload2 = "payload2";
- std::string payload3 = "payload3";
- original[syncable::BOOKMARKS] = empty_payload;
- original[syncable::PASSWORDS] = payload1;
- original[syncable::AUTOFILL] = payload2;
- original[syncable::THEMES] = payload3;
-
- syncable::ModelTypePayloadMap update;
- update[syncable::BOOKMARKS] = empty_payload; // Same.
- update[syncable::PASSWORDS] = empty_payload; // Overwrite with empty.
- update[syncable::AUTOFILL] = payload1; // Overwrite with non-empty.
- update[syncable::SESSIONS] = payload2; // New.
- // Themes untouched.
-
- CoalescePayloads(&original, update);
- ASSERT_EQ(5U, original.size());
- EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]);
- EXPECT_EQ(payload1, original[syncable::PASSWORDS]);
- EXPECT_EQ(payload1, original[syncable::AUTOFILL]);
- EXPECT_EQ(payload2, original[syncable::SESSIONS]);
- EXPECT_EQ(payload3, original[syncable::THEMES]);
-}
-
} // namespace
} // namespace sessions
} // namespace syncer
diff --git a/sync/sync.gyp b/sync/sync.gyp
index 14cb5c3..807c99c 100644
--- a/sync/sync.gyp
+++ b/sync/sync.gyp
@@ -33,6 +33,10 @@
'protocol/sync_proto.gyp:sync_proto',
],
'sources': [
+ 'internal_api/public/base/enum_set.h',
+ 'internal_api/public/base/model_type.h',
+ 'internal_api/public/base/model_type_payload_map.cc',
+ 'internal_api/public/base/model_type_payload_map.h',
'internal_api/public/engine/model_safe_worker.cc',
'internal_api/public/engine/model_safe_worker.h',
'internal_api/public/engine/passive_model_worker.cc',
@@ -47,10 +51,6 @@
'internal_api/public/sessions/sync_session_snapshot.h',
'internal_api/public/sessions/sync_source_info.cc',
'internal_api/public/sessions/sync_source_info.h',
- 'internal_api/public/syncable/model_type.h',
- 'internal_api/public/syncable/model_type_payload_map.cc',
- 'internal_api/public/syncable/model_type_payload_map.h',
- 'internal_api/public/util/enum_set.h',
'internal_api/public/util/experiments.h',
'internal_api/public/util/immutable.h',
'internal_api/public/util/syncer_error.cc',
@@ -382,8 +382,8 @@
'sync',
],
'sources': [
- 'internal_api/public/syncable/model_type_test_util.cc',
- 'internal_api/public/syncable/model_type_test_util.h',
+ 'internal_api/public/base/model_type_test_util.cc',
+ 'internal_api/public/base/model_type_test_util.h',
'js/js_test_util.cc',
'js/js_test_util.h',
'sessions/test_util.cc',
@@ -524,9 +524,9 @@
'..',
],
'sources': [
+ 'internal_api/public/base/enum_set_unittest.cc',
+ 'internal_api/public/base/model_type_payload_map_unittest.cc',
'internal_api/public/engine/model_safe_worker_unittest.cc',
- 'internal_api/public/syncable/model_type_payload_map_unittest.cc',
- 'internal_api/public/util/enum_set_unittest.cc',
'internal_api/public/util/immutable_unittest.cc',
'engine/apply_updates_command_unittest.cc',
'engine/build_commit_command_unittest.cc',
diff --git a/sync/syncable/DEPS b/sync/syncable/DEPS
index a92e267..ee20e97 100644
--- a/sync/syncable/DEPS
+++ b/sync/syncable/DEPS
@@ -1,8 +1,8 @@
include_rules = [
"+net/base/escape.h",
"+sql",
+ "+sync/internal_api/public/base",
"+sync/internal_api/public/engine",
- "+sync/internal_api/public/syncable",
"+sync/internal_api/public/util",
"+sync/protocol",
"+sync/test",
diff --git a/sync/syncable/directory_backing_store.h b/sync/syncable/directory_backing_store.h
index 282e56c..bfc6c4c 100644
--- a/sync/syncable/directory_backing_store.h
+++ b/sync/syncable/directory_backing_store.h
@@ -12,7 +12,7 @@
#include "base/threading/non_thread_safe.h"
#include "sql/connection.h"
#include "sql/statement.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/syncable/dir_open_result.h"
#include "sync/syncable/directory.h"
#include "sync/syncable/metahandle_set.h"
diff --git a/sync/syncable/directory_change_delegate.h b/sync/syncable/directory_change_delegate.h
index d99fc3e..aaf21d1 100644
--- a/sync/syncable/directory_change_delegate.h
+++ b/sync/syncable/directory_change_delegate.h
@@ -6,7 +6,7 @@
#define SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
#pragma once
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/syncable/write_transaction_info.h"
namespace syncer {
diff --git a/sync/syncable/entry_kernel.h b/sync/syncable/entry_kernel.h
index fba1b88..ac0af15 100644
--- a/sync/syncable/entry_kernel.h
+++ b/sync/syncable/entry_kernel.h
@@ -8,7 +8,7 @@
#include "base/time.h"
#include "base/values.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/immutable.h"
#include "sync/protocol/sync.pb.h"
#include "sync/syncable/metahandle_set.h"
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index 35bdc89..fee2973 100644
--- a/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.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 "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "base/string_split.h"
#include "base/values.h"
diff --git a/sync/syncable/model_type_unittest.cc b/sync/syncable/model_type_unittest.cc
index ad9d8aa..e846159 100644
--- a/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 "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include <string>
diff --git a/sync/syncable/nigori_util.h b/sync/syncable/nigori_util.h
index 7425d24..9d09d44 100644
--- a/sync/syncable/nigori_util.h
+++ b/sync/syncable/nigori_util.h
@@ -9,7 +9,7 @@
#pragma once
#include "base/compiler_specific.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/nigori_specifics.pb.h"
namespace sync_pb {
diff --git a/sync/syncable/transaction_observer.h b/sync/syncable/transaction_observer.h
index dc9478d..377e1c1 100644
--- a/sync/syncable/transaction_observer.h
+++ b/sync/syncable/transaction_observer.h
@@ -6,7 +6,7 @@
#define SYNC_SYNCABLE_TRANSACTION_OBSERVER_H_
#pragma once
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/syncable/write_transaction_info.h"
namespace syncer {
diff --git a/sync/test/engine/mock_connection_manager.h b/sync/test/engine/mock_connection_manager.h
index c787027..9790309 100644
--- a/sync/test/engine/mock_connection_manager.h
+++ b/sync/test/engine/mock_connection_manager.h
@@ -17,8 +17,8 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_vector.h"
#include "sync/engine/net/server_connection_manager.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/protocol/sync.pb.h"
namespace syncer {
diff --git a/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h
index 3db8ae8..58b034f 100644
--- a/sync/test/engine/syncer_command_test.h
+++ b/sync/test/engine/syncer_command_test.h
@@ -102,8 +102,7 @@ class SyncerCommandTestBase : public testing::Test,
// Lazily create a session requesting all datatypes with no payload.
sessions::SyncSession* session() {
syncable::ModelTypePayloadMap types =
- syncable::ModelTypePayloadMapFromRoutingInfo(routing_info_,
- std::string());
+ ModelSafeRoutingInfoToPayloadMap(routing_info_, std::string());
return session(sessions::SyncSourceInfo(types));
}
diff --git a/sync/tools/DEPS b/sync/tools/DEPS
index e36048b..f4429c8 100644
--- a/sync/tools/DEPS
+++ b/sync/tools/DEPS
@@ -2,5 +2,5 @@ include_rules = [
"+jingle/notifier/base",
"+net",
"+sync/notifier",
- "+sync/internal_api/public/syncable",
+ "+sync/internal_api/public/base",
]
diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc
index 71ea3b5..5378f41 100644
--- a/sync/tools/sync_listen_notifications.cc
+++ b/sync/tools/sync_listen_notifications.cc
@@ -21,8 +21,8 @@
#include "net/base/host_resolver.h"
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_request_test_util.h"
-#include "sync/internal_api/public/syncable/model_type.h"
-#include "sync/internal_api/public/syncable/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/base/model_type_payload_map.h"
#include "sync/notifier/invalidation_state_tracker.h"
#include "sync/notifier/invalidation_util.h"
#include "sync/notifier/sync_notifier.h"
diff --git a/sync/util/DEPS b/sync/util/DEPS
index 69e34a9..0662b96 100644
--- a/sync/util/DEPS
+++ b/sync/util/DEPS
@@ -1,6 +1,6 @@
include_rules = [
"+crypto",
- "+sync/internal_api/public/syncable",
+ "+sync/internal_api/public/base",
"+sync/internal_api/public/util",
"+sync/protocol",
"+sync/test/fake_encryptor.h",
diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h
index a27fc1d..f68655d 100644
--- a/sync/util/cryptographer.h
+++ b/sync/util/cryptographer.h
@@ -13,7 +13,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/encryption.pb.h"
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/util/nigori.h"
diff --git a/sync/util/cryptographer_unittest.cc b/sync/util/cryptographer_unittest.cc
index ca9c48d..d493b20 100644
--- a/sync/util/cryptographer_unittest.cc
+++ b/sync/util/cryptographer_unittest.cc
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string_util.h"
-#include "sync/internal_api/public/syncable/model_type_test_util.h"
+#include "sync/internal_api/public/base/model_type_test_util.h"
#include "sync/protocol/nigori_specifics.pb.h"
#include "sync/protocol/password_specifics.pb.h"
#include "sync/test/fake_encryptor.h"
diff --git a/sync/util/data_type_histogram.h b/sync/util/data_type_histogram.h
index 869f162..ed66bb7 100644
--- a/sync/util/data_type_histogram.h
+++ b/sync/util/data_type_histogram.h
@@ -8,7 +8,7 @@
#include "base/metrics/histogram.h"
#include "base/time.h"
-#include "sync/internal_api/public/syncable/model_type.h"
+#include "sync/internal_api/public/base/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.