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

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

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 b7508e3a060823df218e5fe82c22e3a9d15e136f..0a68c7dbf78a2fb8c35f095ae6786c2d0ca6ceba 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -217,8 +217,9 @@ class ProfileSyncServiceSessionTest
BrowserWithTestWindowTest::TearDown();
}
- bool StartSyncService(const base::Closure& callback,
- bool will_fail_association) {
+ bool StartSyncService(
+ const base::Callback<void(syncer::UserShare*)>& callback,
+ bool will_fail_association) {
if (sync_service_.get())
return false;
SigninManager* signin = SigninManagerFactory::GetForProfile(profile());
@@ -282,16 +283,22 @@ class CreateRootHelper {
virtual ~CreateRootHelper() {}
- const base::Closure& callback() const { return callback_; }
- bool success() { return success_; }
+ const base::Callback<void(syncer::UserShare*)>& callback() const {
+ return callback_;
+ }
+
+ bool success() {
+ return success_;
+ }
private:
- void CreateRootCallback(ProfileSyncServiceSessionTest* test) {
+ void CreateRootCallback(ProfileSyncServiceSessionTest* test,
+ syncer::UserShare* user_share) {
success_ = ProfileSyncServiceTestHelper::CreateRoot(
- syncer::SESSIONS, test->sync_service()->GetUserShare(), test->ids());
+ syncer::SESSIONS, user_share, test->ids());
}
- base::Closure callback_;
+ base::Callback<void(syncer::UserShare*)> callback_;
bool success_;
};
@@ -373,7 +380,8 @@ TEST_F(ProfileSyncServiceSessionTest, DISABLED_WriteFilledSessionToNode) {
// Test that we fail on a failed model association.
TEST_F(ProfileSyncServiceSessionTest, FailModelAssociation) {
- ASSERT_TRUE(StartSyncService(base::Closure(), true));
+ ASSERT_TRUE(StartSyncService(
+ TestProfileSyncService::NullCallback(), true));
ASSERT_TRUE(sync_service_->HasUnrecoverableError());
}

Powered by Google App Engine
This is Rietveld 408576698