Chromium Code Reviews| Index: chrome/browser/chromeos/login/login_utils.cc |
| diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc |
| index 9567b9fe5289ad5ba82cbf58d2d45ee20f4ba5cb..a43fd27ea74f2105d272b07e05f44281a84326f5 100644 |
| --- a/chrome/browser/chromeos/login/login_utils.cc |
| +++ b/chrome/browser/chromeos/login/login_utils.cc |
| @@ -169,6 +169,7 @@ class LoginUtilsImpl : public LoginUtils, |
| std::string password_; |
| GaiaAuthConsumer::ClientLoginResult credentials_; |
| bool pending_requests_; |
| + bool first_login_; |
| // Delegate to be fired when the profile will be prepared. |
| LoginUtils::Delegate* delegate_; |
| @@ -220,6 +221,10 @@ void LoginUtilsImpl::PrepareProfile( |
| btl->AddLoginTimeMarker("StartedSession", false); |
| } |
| + // Record whether this is the first login before we add the user to the |
| + // UserManager. |
| + first_login_ = !UserManager::Get()->IsKnownUser(username); |
| + |
| UserManager::Get()->UserLoggedIn(username); |
| btl->AddLoginTimeMarker("UserLoggedIn", false); |
| @@ -244,7 +249,6 @@ void LoginUtilsImpl::OnProfileCreated(Profile* profile) { |
| BootTimesLoader* btl = BootTimesLoader::Get(); |
| btl->AddLoginTimeMarker("UserProfileGotten", false); |
| - bool first_login = !UserManager::Get()->IsKnownUser(username_); |
| // Change the proxy configuration service of the default request context to |
| // use the preference configuration from the logged-in profile. This ensures |
| // that requests done through the default context use the proxy configuration |
| @@ -320,7 +324,7 @@ void LoginUtilsImpl::OnProfileCreated(Profile* profile) { |
| RespectLocalePreference(profile); |
| - if (first_login) { |
| + if (first_login_) { |
|
Nikita (slow)
2011/05/20 09:33:46
Turns out that UserManager has
bool current_user_i
Zachary Kuznia
2011/05/23 08:06:35
Done.
|
| SetFirstLoginPrefs(profile->GetPrefs()); |
| } |