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

Unified Diff: chrome/browser/services/gcm/fake_signin_manager.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 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/services/gcm/fake_signin_manager.cc
diff --git a/chrome/browser/services/gcm/fake_signin_manager.cc b/chrome/browser/services/gcm/fake_signin_manager.cc
index 64f7ccc34388a41a3f738f710b31bae335a17a79..563ee4f9934180fd9dbf1477f61127915c596ac1 100644
--- a/chrome/browser/services/gcm/fake_signin_manager.cc
+++ b/chrome/browser/services/gcm/fake_signin_manager.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/signin/gaia_cookie_manager_service_factory.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "components/signin/core/browser/account_tracker_service.h"
#include "components/signin/core/common/signin_pref_names.h"
#include "content/public/browser/browser_context.h"
@@ -23,7 +24,8 @@ namespace gcm {
FakeSigninManager::FakeSigninManager(Profile* profile)
#if defined(OS_CHROMEOS)
: SigninManagerBase(
- ChromeSigninClientFactory::GetInstance()->GetForProfile(profile)),
+ ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
+ AccountTrackerServiceFactory::GetForProfile(profile)),
#else
: SigninManager(
ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
@@ -38,19 +40,20 @@ FakeSigninManager::FakeSigninManager(Profile* profile)
FakeSigninManager::~FakeSigninManager() {
}
-void FakeSigninManager::SignIn(const std::string& username) {
- SetAuthenticatedUsername(username);
+void FakeSigninManager::SignIn(const std::string& account_id) {
+ SetAuthenticatedAccountId(account_id);
FOR_EACH_OBSERVER(SigninManagerBase::Observer,
observer_list_,
- GoogleSigninSucceeded(username, username, std::string()));
+ GoogleSigninSucceeded(account_id, account_id,
+ std::string()));
}
void FakeSigninManager::SignOut(
signin_metrics::ProfileSignout signout_source_metric) {
const std::string account_id = GetAuthenticatedAccountId();
const std::string username = GetAuthenticatedUsername();
- ClearAuthenticatedUsername();
- profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername);
+ clear_authenticated_user();
+ profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesAccountId);
FOR_EACH_OBSERVER(SigninManagerBase::Observer,
observer_list_,
GoogleSignedOut(account_id, username));

Powered by Google App Engine
This is Rietveld 408576698