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

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

Issue 9232011: sync: Make ProfileSyncService a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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_typed_url_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index 4b2b91558b1e776713c80cbc2d06c25f3d23d881..c952a413a2c3b4d4cecab5b1a637d07931379481 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -182,8 +182,10 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
if (!service_.get()) {
SigninManager* signin = new SigninManager();
signin->SetAuthenticatedUsername("test");
+ ProfileSyncComponentsFactoryMock* factory =
+ new ProfileSyncComponentsFactoryMock();
service_.reset(
- new TestProfileSyncService(&factory_,
+ new TestProfileSyncService(factory,
&profile_,
signin,
ProfileSyncService::AUTO_START,
@@ -192,16 +194,16 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
EXPECT_CALL(profile_, GetProfileSyncService()).WillRepeatedly(
Return(service_.get()));
TypedUrlDataTypeController* data_type_controller =
- new TypedUrlDataTypeController(&factory_,
+ new TypedUrlDataTypeController(factory,
&profile_,
service_.get());
- EXPECT_CALL(factory_, CreateTypedUrlSyncComponents(_, _, _)).
+ EXPECT_CALL(*factory, CreateTypedUrlSyncComponents(_, _, _)).
WillOnce(MakeTypedUrlSyncComponents(&profile_,
service_.get(),
history_backend_.get(),
data_type_controller));
- EXPECT_CALL(factory_, CreateDataTypeManager(_, _)).
+ EXPECT_CALL(*factory, CreateDataTypeManager(_, _)).
WillOnce(ReturnNewDataTypeManager());
EXPECT_CALL(profile_, GetHistoryServiceWithoutCreating()).
@@ -298,7 +300,6 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
scoped_refptr<ThreadNotificationService> notification_service_;
ProfileMock profile_;
- ProfileSyncComponentsFactoryMock factory_;
scoped_refptr<HistoryBackendMock> history_backend_;
scoped_refptr<HistoryServiceMock> history_service_;
};
« no previous file with comments | « chrome/browser/sync/profile_sync_service_startup_unittest.cc ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698