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

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

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to include the update to ProfileSyncService: r224220 Created 7 years, 3 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_password_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index 6460b69e53893d4e2280a655cdb72e07cbf409bf..e10844d64a95970ae574cef3fb5819e02bf9f0d6 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -92,10 +92,11 @@ class NullPasswordStore : public MockPasswordStore {
class PasswordTestProfileSyncService : public TestProfileSyncService {
public:
- PasswordTestProfileSyncService(ProfileSyncComponentsFactory* factory,
- Profile* profile,
- SigninManagerBase* signin,
- OAuth2TokenService* oauth2_token_service)
+ PasswordTestProfileSyncService(
+ ProfileSyncComponentsFactory* factory,
+ Profile* profile,
+ SigninManagerBase* signin,
+ ProfileOAuth2TokenService* oauth2_token_service)
: TestProfileSyncService(factory,
profile,
signin,
@@ -116,7 +117,7 @@ class PasswordTestProfileSyncService : public TestProfileSyncService {
Profile* profile = static_cast<Profile*>(context);
SigninManagerBase* signin =
SigninManagerFactory::GetForProfile(profile);
- OAuth2TokenService* oauth2_token_service =
+ ProfileOAuth2TokenService* oauth2_token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
ProfileSyncComponentsFactoryMock* factory =
new ProfileSyncComponentsFactoryMock();
@@ -233,10 +234,10 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
WillOnce(ReturnNewDataTypeManager());
// We need tokens to get the tests going
- token_service_->IssueAuthTokenForTest(
- GaiaConstants::kGaiaOAuth2LoginRefreshToken, "oauth2_login_token");
- token_service_->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_.get())
+ ->UpdateCredentials("test_user@gmail.com", "oauth2_login_token");
+ token_service_->IssueAuthTokenForTest(GaiaConstants::kSyncService,
+ "token");
sync_service_->RegisterDataTypeController(data_type_controller);
sync_service_->Initialize();

Powered by Google App Engine
This is Rietveld 408576698