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

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

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots 2 Created 7 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
Index: chrome/browser/sync/profile_sync_service_startup_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
index f6b335374d613e6a4ea56eb1e064a0984a525720..6b3b6f5f7fe82f0e570b7330cb2bbd70e518f2ef 100644
--- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
@@ -112,14 +112,14 @@ class ProfileSyncServiceStartupTest : public testing::Test {
content::Details<const GoogleServiceSigninSuccessDetails>(&details));
}
- static ProfileKeyedService* BuildService(Profile* profile) {
+ static ProfileKeyedService* BuildService(content::BrowserContext* profile) {
SigninManagerBase* signin = static_cast<SigninManagerBase*>(
SigninManagerFactory::GetInstance()->SetTestingFactoryAndUse(
profile, FakeSigninManagerBase::Build));
signin->SetAuthenticatedUsername("test_user");
return new TestProfileSyncService(
new ProfileSyncComponentsFactoryMock(),
- profile,
+ static_cast<Profile*>(profile),
signin,
ProfileSyncService::MANUAL_START,
true);
@@ -153,17 +153,19 @@ class ProfileSyncServiceStartupTest : public testing::Test {
class ProfileSyncServiceStartupCrosTest : public ProfileSyncServiceStartupTest {
public:
- static ProfileKeyedService* BuildCrosService(Profile* profile) {
- SigninManagerBase* signin =
- SigninManagerFactory::GetForProfile(profile);
- signin->SetAuthenticatedUsername("test_user");
- return new TestProfileSyncService(
- new ProfileSyncComponentsFactoryMock(),
- profile,
- signin,
- ProfileSyncService::AUTO_START,
- true);
- }
+ static ProfileKeyedService* BuildCrosService(
+ content::BrowserContext* context) {
+ Profile* profile = static_cast<Profile*>(context);
+ SigninManagerBase* signin =
+ SigninManagerFactory::GetForProfile(profile);
+ signin->SetAuthenticatedUsername("test_user");
+ return new TestProfileSyncService(
+ new ProfileSyncComponentsFactoryMock(),
+ profile,
+ signin,
+ ProfileSyncService::AUTO_START,
+ true);
+ }
protected:
virtual void CreateSyncService() OVERRIDE {
@@ -213,7 +215,7 @@ TEST_F(ProfileSyncServiceStartupTest, StartFirstTime) {
EXPECT_TRUE(sync_->ShouldPushChanges());
}
-ProfileKeyedService* BuildFakeTokenService(Profile* profile) {
+ProfileKeyedService* BuildFakeTokenService(content::BrowserContext* profile) {
return new FakeTokenService();
}

Powered by Google App Engine
This is Rietveld 408576698