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

Unified Diff: chrome/browser/chromeos/login/signin/auth_sync_observer.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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/chromeos/login/signin/auth_sync_observer.cc
diff --git a/chrome/browser/chromeos/login/signin/auth_sync_observer.cc b/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
index c2ced0b0203df3c9e87e6c8fbdb9a8ed4f6e6486..f7807766f47632c7fc9fa0ac05c422e4cda0fd83 100644
--- a/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
+++ b/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
@@ -48,7 +48,7 @@ void AuthSyncObserver::OnStateChanged() {
UserManager::Get()->IsLoggedInAsSupervisedUser());
ProfileSyncService* sync_service =
ProfileSyncServiceFactory::GetForProfile(profile_);
- User* user = ProfileHelper::Get()->GetUserByProfile(profile_);
+ user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile_);
GoogleServiceAuthError::State state =
sync_service->GetAuthError().state();
if (state != GoogleServiceAuthError::NONE &&
@@ -63,11 +63,12 @@ void AuthSyncObserver::OnStateChanged() {
std::string email = user->email();
DCHECK(!email.empty());
// TODO(nkostyelv): Change observer after active user has changed.
- User::OAuthTokenStatus old_status = user->oauth_token_status();
- UserManager::Get()->SaveUserOAuthStatus(email,
- User::OAUTH2_TOKEN_STATUS_INVALID);
+ user_manager::User::OAuthTokenStatus old_status =
+ user->oauth_token_status();
+ UserManager::Get()->SaveUserOAuthStatus(
+ email, user_manager::User::OAUTH2_TOKEN_STATUS_INVALID);
if (user->GetType() == user_manager::USER_TYPE_SUPERVISED &&
- old_status != User::OAUTH2_TOKEN_STATUS_INVALID) {
+ old_status != user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) {
// Attempt to restore token from file.
UserManager::Get()->GetSupervisedUserManager()->LoadSupervisedUserToken(
profile_,
@@ -78,12 +79,12 @@ void AuthSyncObserver::OnStateChanged() {
}
} else if (state == GoogleServiceAuthError::NONE) {
if (user->GetType() == user_manager::USER_TYPE_SUPERVISED &&
- user->oauth_token_status() == User::OAUTH2_TOKEN_STATUS_INVALID) {
+ user->oauth_token_status() ==
+ user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) {
LOG(ERROR) <<
"Got an incorrectly invalidated token case, restoring token status.";
UserManager::Get()->SaveUserOAuthStatus(
- user->email(),
- User::OAUTH2_TOKEN_STATUS_VALID);
+ user->email(), user_manager::User::OAUTH2_TOKEN_STATUS_VALID);
content::RecordAction(
base::UserMetricsAction("ManagedUsers_Chromeos_Sync_Recovered"));
}

Powered by Google App Engine
This is Rietveld 408576698