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()); |
} |