summaryrefslogtreecommitdiffstats
path: root/sync/sessions
diff options
context:
space:
mode:
authormaxbogue <maxbogue@chromium.org>2016-02-25 13:43:04 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-25 21:44:48 +0000
commit385c8b25e46a5d8ceaa930badc4274c3b4167e96 (patch)
tree35ad787b3c4a7e53ca4e851fa4eeaa9e425a7304 /sync/sessions
parent88e4b0b424242a1abb92f9c16bbca549eb016291 (diff)
downloadchromium_src-385c8b25e46a5d8ceaa930badc4274c3b4167e96.zip
chromium_src-385c8b25e46a5d8ceaa930badc4274c3b4167e96.tar.gz
chromium_src-385c8b25e46a5d8ceaa930badc4274c3b4167e96.tar.bz2
[Sync] USS: Remove pending updates from SharedModelTypeProcessor.
We are planning to handle these in the worker in a future update. BUG=529498 Review URL: https://codereview.chromium.org/1725573002 Cr-Commit-Position: refs/heads/master@{#377673}
Diffstat (limited to 'sync/sessions')
-rw-r--r--sync/sessions/model_type_registry.cc3
-rw-r--r--sync/sessions/model_type_registry_unittest.cc6
2 files changed, 1 insertions, 8 deletions
diff --git a/sync/sessions/model_type_registry.cc b/sync/sessions/model_type_registry.cc
index a4766db4..97ace6e7 100644
--- a/sync/sessions/model_type_registry.cc
+++ b/sync/sessions/model_type_registry.cc
@@ -147,8 +147,7 @@ void ModelTypeRegistry::ConnectSyncTypeToWorker(
cryptographer_copy.reset(new Cryptographer(*cryptographer_));
scoped_ptr<syncer_v2::ModelTypeWorker> worker(new syncer_v2::ModelTypeWorker(
- type, activation_context->data_type_state,
- activation_context->saved_pending_updates, std::move(cryptographer_copy),
+ type, activation_context->data_type_state, std::move(cryptographer_copy),
nudge_handler_, std::move(activation_context->type_processor)));
// Initialize Processor -> Worker communication channel.
diff --git a/sync/sessions/model_type_registry_unittest.cc b/sync/sessions/model_type_registry_unittest.cc
index 079b37b..4ae31f8 100644
--- a/sync/sessions/model_type_registry_unittest.cc
+++ b/sync/sessions/model_type_registry_unittest.cc
@@ -39,12 +39,10 @@ class ModelTypeRegistryTest : public ::testing::Test,
static scoped_ptr<syncer_v2::ActivationContext> MakeActivationContext(
const sync_pb::DataTypeState& data_type_state,
- const syncer_v2::UpdateResponseDataList& saved_pending_updates,
scoped_ptr<syncer_v2::ModelTypeProcessor> type_processor) {
scoped_ptr<syncer_v2::ActivationContext> context =
make_scoped_ptr(new syncer_v2::ActivationContext);
context->data_type_state = data_type_state;
- context->saved_pending_updates = saved_pending_updates;
context->type_processor = std::move(type_processor);
return context;
}
@@ -175,7 +173,6 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypes) {
registry()->ConnectSyncTypeToWorker(
syncer::THEMES, MakeActivationContext(MakeInitialDataTypeState(THEMES),
- syncer_v2::UpdateResponseDataList(),
std::move(themes_sync_processor)));
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(
ModelTypeSet(syncer::THEMES)));
@@ -183,7 +180,6 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypes) {
registry()->ConnectSyncTypeToWorker(
syncer::SESSIONS,
MakeActivationContext(MakeInitialDataTypeState(SESSIONS),
- syncer_v2::UpdateResponseDataList(),
std::move(sessions_sync_processor)));
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(
ModelTypeSet(syncer::THEMES, syncer::SESSIONS)));
@@ -213,7 +209,6 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) {
// Add the themes non-blocking type.
registry()->ConnectSyncTypeToWorker(
syncer::THEMES, MakeActivationContext(MakeInitialDataTypeState(THEMES),
- syncer_v2::UpdateResponseDataList(),
std::move(themes_sync_processor)));
current_types.Put(syncer::THEMES);
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(current_types));
@@ -227,7 +222,6 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) {
registry()->ConnectSyncTypeToWorker(
syncer::SESSIONS,
MakeActivationContext(MakeInitialDataTypeState(SESSIONS),
- syncer_v2::UpdateResponseDataList(),
std::move(sessions_sync_processor)));
current_types.Put(syncer::SESSIONS);
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(current_types));