Chromium Code Reviews| Index: chrome/browser/google_apis/auth_service.cc |
| diff --git a/chrome/browser/google_apis/auth_service.cc b/chrome/browser/google_apis/auth_service.cc |
| index 5fb137efaafcfe6ecbd182ab0904561147ab1d14..2eee21c183fa0d3354dba33eb2ac9d7c1b087f1c 100644 |
| --- a/chrome/browser/google_apis/auth_service.cc |
| +++ b/chrome/browser/google_apis/auth_service.cc |
| @@ -26,7 +26,7 @@ |
| #include "google_apis/gaia/oauth2_access_token_fetcher.h" |
| #if defined(OS_CHROMEOS) |
| -#include "chrome/browser/chromeos/login/user_manager.h" |
| +#include "chromeos/login/login_state.h" |
| #endif // OS_CHROMEOS |
| using content::BrowserThread; |
| @@ -290,9 +290,14 @@ void AuthService::Observe(int type, |
| // static |
| bool AuthService::CanAuthenticate(Profile* profile) { |
| #if defined(OS_CHROMEOS) |
| - if (!chromeos::UserManager::Get()->IsUserLoggedIn() || |
| - chromeos::UserManager::Get()->IsLoggedInAsGuest() || |
| - chromeos::UserManager::Get()->IsLoggedInAsDemoUser()) |
| + if (!chromeos::LoginState::IsInitialized()) |
| + return false; |
| + chromeos::LoginState::State login_state = |
| + chromeos::LoginState::Get()->GetLoginState(); |
| + if (login_state == chromeos::LoginState::LOGGED_IN_NONE || |
|
bartfab (slow)
2013/04/05 13:16:33
Another great example why GetLoginState() is the w
stevenjb
2013/04/05 18:17:15
Again, sounds reasonable, but for a future CL, pre
|
| + login_state == chromeos::LoginState::LOGGED_IN_OOBE || |
| + login_state == chromeos::LoginState::LOGGED_IN_GUEST || |
| + login_state == chromeos::LoginState::LOGGED_IN_RETAIL_MODE) |
| return false; |
| #endif // OS_CHROMEOS |