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

Unified Diff: chrome/browser/sync/engine/syncapi_unittest.cc

Issue 6794005: Move sync notifier contruction out of syncer thread. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase Created 9 years, 8 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
« no previous file with comments | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/glue/sync_backend_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncapi_unittest.cc
diff --git a/chrome/browser/sync/engine/syncapi_unittest.cc b/chrome/browser/sync/engine/syncapi_unittest.cc
index 1dd25c0597b1d4d152686a9f5a1db6da0fe6aa84..4e70cb7431d3964a39d9a2bdf85c731d3aa098cb 100644
--- a/chrome/browser/sync/engine/syncapi_unittest.cc
+++ b/chrome/browser/sync/engine/syncapi_unittest.cc
@@ -653,25 +653,24 @@ class SyncManagerTest : public testing::Test,
credentials.email = "foo@bar.com";
credentials.sync_token = "sometoken";
- scoped_ptr<StrictMock<SyncNotifierMock> > sync_notifier_mock(
- new StrictMock<SyncNotifierMock>());
- EXPECT_CALL(*sync_notifier_mock, AddObserver(_)).
+ sync_notifier_mock_.reset(new StrictMock<SyncNotifierMock>());
+ EXPECT_CALL(*sync_notifier_mock_, AddObserver(_)).
WillOnce(Invoke(this, &SyncManagerTest::SyncNotifierAddObserver));
- EXPECT_CALL(*sync_notifier_mock, SetState(""));
- EXPECT_CALL(*sync_notifier_mock,
+ EXPECT_CALL(*sync_notifier_mock_, SetState(""));
+ EXPECT_CALL(*sync_notifier_mock_,
UpdateCredentials(credentials.email, credentials.sync_token));
- EXPECT_CALL(*sync_notifier_mock, UpdateEnabledTypes(_)).
+ EXPECT_CALL(*sync_notifier_mock_, UpdateEnabledTypes(_)).
Times(AtLeast(1)).
WillRepeatedly(
Invoke(this, &SyncManagerTest::SyncNotifierUpdateEnabledTypes));
- EXPECT_CALL(*sync_notifier_mock, RemoveObserver(_)).
+ EXPECT_CALL(*sync_notifier_mock_, RemoveObserver(_)).
WillOnce(Invoke(this, &SyncManagerTest::SyncNotifierRemoveObserver));
EXPECT_FALSE(sync_notifier_observer_);
sync_manager_.Init(temp_dir_.path(), "bogus", 0, false,
new TestHttpPostProviderFactory(), this, "bogus",
- credentials, sync_notifier_mock.release(), "",
+ credentials, sync_notifier_mock_.get(), "",
true /* setup_for_test_mode */);
EXPECT_TRUE(sync_notifier_observer_);
@@ -774,6 +773,7 @@ class SyncManagerTest : public testing::Test,
ScopedTempDir temp_dir_;
// Sync Id's for the roots of the enabled datatypes.
std::map<ModelType, int64> type_roots_;
+ scoped_ptr<StrictMock<SyncNotifierMock> > sync_notifier_mock_;
protected:
SyncManager sync_manager_;
« no previous file with comments | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/glue/sync_backend_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698