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

Unified Diff: chrome/browser/google_apis/auth_service.cc

Issue 13495003: Add LoginState class to src/chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ccbb5e640ea73efad3837884d53761e65084fd5f 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,9 @@ 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;
+ if (!chromeos::LoginState::Get()->IsUserAuthenticated())
return false;
#endif // OS_CHROMEOS
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698