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

Unified Diff: chrome/browser/chromeos/login/users/user.h

Issue 290513003: Move UserContext to its own file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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/chromeos/login/user_flow.h ('k') | chrome/browser/chromeos/login/users/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/users/user.h
diff --git a/chrome/browser/chromeos/login/users/user.h b/chrome/browser/chromeos/login/users/user.h
index 65ec5e54798f0658b6fdad2c548aaa024263d870..132e7f602576960ea72959f85c39cc5b118265dc 100644
--- a/chrome/browser/chromeos/login/users/user.h
+++ b/chrome/browser/chromeos/login/users/user.h
@@ -19,62 +19,6 @@ namespace chromeos {
extern const int kDefaultImagesCount;
-// Information that is passed around while authentication is in progress. The
-// credentials may consist of a |user_id|, |password| pair or a GAIA
-// |auth_code|. The |user_id_hash| is used to locate the user's home directory
-// mount point for the user. It is set when the mount has been completed.
-class UserContext {
- public:
- // The authentication flow used during sign-in.
- enum AuthFlow {
- // Online authentication against GAIA. GAIA did not redirect to a SAML IdP.
- AUTH_FLOW_GAIA_WITHOUT_SAML,
- // Online authentication against GAIA. GAIA redirected to a SAML IdP.
- AUTH_FLOW_GAIA_WITH_SAML,
- // Offline authentication against a cached key.
- AUTH_FLOW_OFFLINE
- };
-
- UserContext();
- UserContext(const UserContext& other);
- explicit UserContext(const std::string& user_id);
- ~UserContext();
-
- bool operator==(const UserContext& context) const;
-
- const std::string& GetUserID() const;
- const std::string& GetPassword() const;
- bool DoesNeedPasswordHashing() const;
- const std::string& GetKeyLabel() const;
- const std::string& GetAuthCode() const;
- const std::string& GetUserIDHash() const;
- bool IsUsingOAuth() const;
- AuthFlow GetAuthFlow() const;
-
- bool HasCredentials() const;
-
- void SetUserID(const std::string& user_id);
- void SetPassword(const std::string& password);
- void SetDoesNeedPasswordHashing(bool does_need_password_hashing);
- void SetKeyLabel(const std::string& key_label);
- void SetAuthCode(const std::string& auth_code);
- void SetUserIDHash(const std::string& user_id_hash);
- void SetIsUsingOAuth(bool is_using_oauth);
- void SetAuthFlow(AuthFlow auth_flow);
-
- void ClearSecrets();
-
- private:
- std::string user_id_;
- std::string password_;
- bool does_need_password_hashing_;
- std::string key_label_;
- std::string auth_code_;
- std::string user_id_hash_;
- bool is_using_oauth_;
- AuthFlow auth_flow_;
-};
-
// A class representing information about a previously logged in user.
// Each user has a canonical email (username), returned by |email()| and
// may have a different displayed email (in the raw form as entered by user),
« no previous file with comments | « chrome/browser/chromeos/login/user_flow.h ('k') | chrome/browser/chromeos/login/users/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698