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

Unified Diff: chrome/browser/sync/sessions2/sessions_sync_manager_unittest.cc

Issue 74653002: sync: Add --enable-sync-sessions-v2 and necessary plumbing to use SessionsSyncManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sessions2/sessions_sync_manager_unittest.cc
diff --git a/chrome/browser/sync/sessions2/sessions_sync_manager_unittest.cc b/chrome/browser/sync/sessions2/sessions_sync_manager_unittest.cc
index 6183e67db4586ea81508443cb5844531097810a5..3f21000e04c932bfcebdc686e3008be0ac8a53d2 100644
--- a/chrome/browser/sync/sessions2/sessions_sync_manager_unittest.cc
+++ b/chrome/browser/sync/sessions2/sessions_sync_manager_unittest.cc
@@ -102,10 +102,7 @@ class SessionsSyncManagerTest
virtual void SetUp() OVERRIDE {
BrowserWithTestWindowTest::SetUp();
- manager_.reset(new SessionsSyncManager(
- profile(),
- scoped_ptr<SyncPrefs>(new SyncPrefs(profile()->GetPrefs())),
- this));
+ manager_.reset(new SessionsSyncManager(profile(), this));
}
virtual void TearDown() OVERRIDE {
@@ -116,14 +113,14 @@ class SessionsSyncManagerTest
virtual scoped_ptr<DeviceInfo> GetLocalDeviceInfo() const OVERRIDE {
return scoped_ptr<DeviceInfo>(
- new DeviceInfo(GetCacheGuid(),
+ new DeviceInfo(GetLocalSyncCacheGUID(),
"Wayne Gretzky's Hacking Box",
"Chromium 10k",
"Chrome 10k",
sync_pb::SyncEnums_DeviceType_TYPE_LINUX));
}
- virtual std::string GetCacheGuid() const OVERRIDE {
+ virtual std::string GetLocalSyncCacheGUID() const OVERRIDE {
return "cache_guid";
}
@@ -522,10 +519,7 @@ TEST_F(SessionsSyncManagerTest, MergeLocalSessionNoTabs) {
SyncData d(SyncData::CreateRemoteData(1, data.GetSpecifics(), base::Time()));
syncer::SyncDataList in(&d, &d + 1);
out.clear();
- SessionsSyncManager manager2(
- profile(),
- scoped_ptr<SyncPrefs>(new SyncPrefs(profile()->GetPrefs())),
- this);
+ SessionsSyncManager manager2(profile(), this);
syncer::SyncMergeResult result = manager2.MergeDataAndStartSyncing(
syncer::SESSIONS, in,
scoped_ptr<syncer::SyncChangeProcessor>(
@@ -754,7 +748,7 @@ TEST_F(SessionsSyncManagerTest, DeleteForeignSession) {
std::vector<const SyncedSession*> foreign_sessions;
ASSERT_FALSE(manager()->GetAllForeignSessions(&foreign_sessions));
- manager()->DeleteForeignSession(tag, &changes);
+ manager()->DeleteForeignSessionInternal(tag, &changes);
ASSERT_FALSE(manager()->GetAllForeignSessions(&foreign_sessions));
EXPECT_TRUE(changes.empty());
@@ -775,7 +769,7 @@ TEST_F(SessionsSyncManagerTest, DeleteForeignSession) {
ASSERT_EQ(1U, foreign_sessions.size());
// Now delete the foreign session.
- manager()->DeleteForeignSession(tag, &changes);
+ manager()->DeleteForeignSessionInternal(tag, &changes);
EXPECT_FALSE(manager()->GetAllForeignSessions(&foreign_sessions));
EXPECT_EQ(5U, changes.size());
@@ -918,10 +912,7 @@ TEST_F(SessionsSyncManagerTest, SaveUnassociatedNodesForReassociation) {
SyncData d(SyncData::CreateRemoteData(1, entity, base::Time()));
syncer::SyncDataList in(&d, &d + 1);
changes.clear();
- SessionsSyncManager manager2(
- profile(),
- scoped_ptr<SyncPrefs>(new SyncPrefs(profile()->GetPrefs())),
- this);
+ SessionsSyncManager manager2(profile(), this);
syncer::SyncMergeResult result = manager2.MergeDataAndStartSyncing(
syncer::SESSIONS, in,
scoped_ptr<syncer::SyncChangeProcessor>(

Powered by Google App Engine
This is Rietveld 408576698