Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Side by Side Diff: chrome/browser/sync/test/integration/two_client_uss_sync_test.cc

Issue 2621373004: [Sync] Renamed OnMetadataLoaded to ModelReadyToSync. (Closed)
Patch Set: Rebase. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/reading_list/ios/reading_list_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/macros.h" 5 #include "base/macros.h"
6 #include "base/memory/ptr_util.h" 6 #include "base/memory/ptr_util.h"
7 #include "base/optional.h" 7 #include "base/optional.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "chrome/browser/sync/chrome_sync_client.h" 9 #include "chrome/browser/sync/chrome_sync_client.h"
10 #include "chrome/browser/sync/profile_sync_service_factory.h" 10 #include "chrome/browser/sync/profile_sync_service_factory.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // A FakeModelTypeSyncBridge that supports observing ApplySyncChanges. 58 // A FakeModelTypeSyncBridge that supports observing ApplySyncChanges.
59 class TestModelTypeSyncBridge : public FakeModelTypeSyncBridge { 59 class TestModelTypeSyncBridge : public FakeModelTypeSyncBridge {
60 public: 60 public:
61 class Observer { 61 class Observer {
62 public: 62 public:
63 virtual void OnApplySyncChanges() = 0; 63 virtual void OnApplySyncChanges() = 0;
64 }; 64 };
65 65
66 TestModelTypeSyncBridge() 66 TestModelTypeSyncBridge()
67 : FakeModelTypeSyncBridge(base::Bind(&ModelTypeChangeProcessor::Create)) { 67 : FakeModelTypeSyncBridge(base::Bind(&ModelTypeChangeProcessor::Create)) {
68 change_processor()->OnMetadataLoaded(db().CreateMetadataBatch()); 68 change_processor()->ModelReadyToSync(db().CreateMetadataBatch());
69 } 69 }
70 70
71 base::Optional<syncer::ModelError> ApplySyncChanges( 71 base::Optional<syncer::ModelError> ApplySyncChanges(
72 std::unique_ptr<syncer::MetadataChangeList> metadata_changes, 72 std::unique_ptr<syncer::MetadataChangeList> metadata_changes,
73 syncer::EntityChangeList entity_changes) override { 73 syncer::EntityChangeList entity_changes) override {
74 auto error = FakeModelTypeSyncBridge::ApplySyncChanges( 74 auto error = FakeModelTypeSyncBridge::ApplySyncChanges(
75 std::move(metadata_changes), entity_changes); 75 std::move(metadata_changes), entity_changes);
76 NotifyObservers(); 76 NotifyObservers();
77 return error; 77 return error;
78 } 78 }
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 ASSERT_TRUE(DataChecker(model1, kKey1, kValue2).Wait()); 363 ASSERT_TRUE(DataChecker(model1, kKey1, kValue2).Wait());
364 ASSERT_TRUE(DataChecker(model1, kKey2, kValue1).Wait()); 364 ASSERT_TRUE(DataChecker(model1, kKey2, kValue1).Wait());
365 ASSERT_TRUE(DataChecker(model1, kKey4, kValue1).Wait()); 365 ASSERT_TRUE(DataChecker(model1, kKey4, kValue1).Wait());
366 366
367 ASSERT_TRUE(DataChecker(model0, kKey1, kValue2).Wait()); 367 ASSERT_TRUE(DataChecker(model0, kKey1, kValue2).Wait());
368 ASSERT_TRUE(DataChecker(model0, kKey3, kValue1).Wait()); 368 ASSERT_TRUE(DataChecker(model0, kKey3, kValue1).Wait());
369 } 369 }
370 370
371 } // namespace 371 } // namespace
OLDNEW
« no previous file with comments | « no previous file | components/reading_list/ios/reading_list_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698