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

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

Issue 145073003: Indicate which authentication flow was used in UserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speculative fix for telemetry. Created 6 years, 11 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/screen_locker.cc ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user.h
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index c61c0bb8f6a2c8e02426e7e10a33862e84230c6d..faf591395f62be3b96eadd8f61ae98df5b40ca8b 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -24,6 +24,16 @@ extern const int kDefaultImagesCount;
// back once user homedir is mounted. |username_hash| is used to identify
// user homedir mount point.
struct UserContext {
+ // 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 password.
+ AUTH_FLOW_OFFLINE
+ };
+
UserContext();
UserContext(const std::string& username,
const std::string& password,
@@ -36,7 +46,8 @@ struct UserContext {
const std::string& password,
const std::string& auth_code,
const std::string& username_hash,
- bool using_oauth);
+ bool using_oauth,
+ AuthFlow auth_flow);
virtual ~UserContext();
bool operator==(const UserContext& context) const;
std::string username;
@@ -44,6 +55,7 @@ struct UserContext {
std::string auth_code;
std::string username_hash;
bool using_oauth;
+ AuthFlow auth_flow;
};
// A class representing information about a previously logged in user.
@@ -150,15 +162,15 @@ class User {
// True if image is being loaded from file.
bool image_is_loading() const { return image_is_loading_; }
- // OAuth token status for this user.
- OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; }
-
// The displayed user name.
base::string16 display_name() const { return display_name_; }
// The displayed (non-canonical) user email.
virtual std::string display_email() const;
+ // OAuth token status for this user.
+ OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; }
+
// True if the user's session can be locked (i.e. the user has a password with
// which to unlock the session).
virtual bool can_lock() const;
@@ -211,10 +223,6 @@ class User {
// If |is_loading| is |true|, that means user image is being loaded from file.
void SetStubImage(int image_index, bool is_loading);
- void set_oauth_token_status(OAuthTokenStatus status) {
- oauth_token_status_ = status;
- }
-
void set_display_name(const base::string16& display_name) {
display_name_ = display_name;
}
@@ -227,6 +235,10 @@ class User {
const UserImage& user_image() const { return user_image_; }
+ void set_oauth_token_status(OAuthTokenStatus status) {
+ oauth_token_status_ = status;
+ }
+
void set_username_hash(const std::string& username_hash) {
username_hash_ = username_hash;
}
« no previous file with comments | « chrome/browser/chromeos/login/screen_locker.cc ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698