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

Unified Diff: chrome/browser/sync/profile_sync_service_session_unittest.cc

Issue 6375007: [Sync] Refactored ProfileSyncService and remove its backend() function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/profile_sync_service_session_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc
index 3023d6bff15e67be6675cc392547af6f78dba257..fef7e14b02efb59d78b35c5885191b8a6f94a066 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -123,8 +123,6 @@ class ProfileSyncServiceSessionTest
return true;
}
- SyncBackendHost* backend() { return sync_service_->backend(); }
-
// Path used in testing.
ScopedTempDir temp_dir_;
SessionServiceTestHelper helper_;
@@ -146,8 +144,10 @@ class CreateRootTask : public Task {
virtual ~CreateRootTask() {}
virtual void Run() {
- success_ = ProfileSyncServiceTestHelper::CreateRoot(syncable::SESSIONS,
- test_->sync_service(), test_->ids());
+ success_ = ProfileSyncServiceTestHelper::CreateRoot(
+ syncable::SESSIONS,
+ test_->sync_service()->GetUserShare(),
+ test_->ids());
}
bool success() { return success_; }
@@ -173,8 +173,7 @@ TEST_F(ProfileSyncServiceSessionTest, WriteSessionToNode) {
ASSERT_NE(sync_api::kInvalidId, sync_id);
// Check that we can get the correct session specifics back from the node.
- sync_api::ReadTransaction trans(sync_service_->
- backend()->GetUserShareHandle());
+ sync_api::ReadTransaction trans(sync_service_->GetUserShare());
sync_api::ReadNode node(&trans);
ASSERT_TRUE(node.InitByClientTagLookup(syncable::SESSIONS,
machine_tag));
@@ -320,7 +319,7 @@ TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionUpdate) {
record->id = node_id;
ASSERT_FALSE(notified_of_update_);
{
- sync_api::WriteTransaction trans(backend()->GetUserShareHandle());
+ sync_api::WriteTransaction trans(sync_service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(&trans, record.get(), 1);
}
ASSERT_TRUE(notified_of_update_);
@@ -339,7 +338,7 @@ TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionAdd) {
record->id = node_id;
ASSERT_FALSE(notified_of_update_);
{
- sync_api::WriteTransaction trans(backend()->GetUserShareHandle());
+ sync_api::WriteTransaction trans(sync_service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(&trans, record.get(), 1);
}
ASSERT_TRUE(notified_of_update_);
@@ -358,7 +357,7 @@ TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionDelete) {
record->id = node_id;
ASSERT_FALSE(notified_of_update_);
{
- sync_api::WriteTransaction trans(backend()->GetUserShareHandle());
+ sync_api::WriteTransaction trans(sync_service_->GetUserShare());
change_processor_->ApplyChangesFromSyncModel(&trans, record.get(), 1);
}
ASSERT_TRUE(notified_of_update_);

Powered by Google App Engine
This is Rietveld 408576698