summaryrefslogtreecommitdiffstats
path: root/chromeos/login
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-10 11:52:24 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-10 11:52:24 +0000
commitad2406e52c2500e391d8d027c7acefca92123689 (patch)
tree4c04e31758433c93351888e63f381e423f24212c /chromeos/login
parent40cbc7b8196a8e205513407074c9300e8b3fa5a7 (diff)
downloadchromium_src-ad2406e52c2500e391d8d027c7acefca92123689.zip
chromium_src-ad2406e52c2500e391d8d027c7acefca92123689.tar.gz
chromium_src-ad2406e52c2500e391d8d027c7acefca92123689.tar.bz2
Remove Google Drive link in the left nav of Files.app for locally managed users.
IsUserAuthenticated == Owner|Regular|LocallyManaged, but here we only want to allow users who are authenticated by gaia login, which is Owner|Regular. BUG=179285 Review URL: https://chromiumcodereview.appspot.com/15701024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/login')
-rw-r--r--chromeos/login/login_state.cc6
-rw-r--r--chromeos/login/login_state.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/chromeos/login/login_state.cc b/chromeos/login/login_state.cc
index 75fed89..67f9b06 100644
--- a/chromeos/login/login_state.cc
+++ b/chromeos/login/login_state.cc
@@ -88,6 +88,12 @@ bool LoginState::IsUserAuthenticated() const {
type == chromeos::LoginState::LOGGED_IN_USER_LOCALLY_MANAGED;
}
+bool LoginState::IsUserGaiaAuthenticated() const {
+ LoggedInUserType type = logged_in_user_type_;
+ return type == chromeos::LoginState::LOGGED_IN_USER_REGULAR ||
+ type == chromeos::LoginState::LOGGED_IN_USER_OWNER;
+}
+
// Private methods
LoginState::LoginState() : logged_in_state_(LOGGED_IN_OOBE),
diff --git a/chromeos/login/login_state.h b/chromeos/login/login_state.h
index 1d05788..6f09564 100644
--- a/chromeos/login/login_state.h
+++ b/chromeos/login/login_state.h
@@ -63,6 +63,10 @@ class CHROMEOS_EXPORT LoginState {
// Returns true if the user is an authenticated user (i.e. non public account)
bool IsUserAuthenticated() const;
+ // Returns true if the user is authenticated by logging into Google account
+ // (i.e., non public nor locally managed account).
+ bool IsUserGaiaAuthenticated() const;
+
private:
LoginState();
virtual ~LoginState();