diff options
author | rogerta <rogerta@chromium.org> | 2014-10-22 13:45:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-22 20:52:32 +0000 |
commit | a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (patch) | |
tree | 2d3faf09f3acae5a4b52106c1d459c2987c96ef9 /chromeos/login/auth | |
parent | ecf43ae80152f4c65d973894b8381dad8a2b0e08 (diff) | |
download | chromium_src-a8e7c94b1b79a0948d05a1fcfff53391d22ce37a.zip chromium_src-a8e7c94b1b79a0948d05a1fcfff53391d22ce37a.tar.gz chromium_src-a8e7c94b1b79a0948d05a1fcfff53391d22ce37a.tar.bz2 |
Inline login handler extracts gaia id from HTTP header and seeds account tracker
service during sign in.
BUG=341408
Review URL: https://codereview.chromium.org/473153002
Cr-Commit-Position: refs/heads/master@{#300750}
Diffstat (limited to 'chromeos/login/auth')
-rw-r--r-- | chromeos/login/auth/user_context.cc | 10 | ||||
-rw-r--r-- | chromeos/login/auth/user_context.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/chromeos/login/auth/user_context.cc b/chromeos/login/auth/user_context.cc index 31113f1..edeb24e 100644 --- a/chromeos/login/auth/user_context.cc +++ b/chromeos/login/auth/user_context.cc @@ -15,6 +15,7 @@ UserContext::UserContext() UserContext::UserContext(const UserContext& other) : user_id_(other.user_id_), + gaia_id_(other.gaia_id_), key_(other.key_), auth_code_(other.auth_code_), user_id_hash_(other.user_id_hash_), @@ -48,6 +49,7 @@ UserContext::~UserContext() { bool UserContext::operator==(const UserContext& context) const { return context.user_id_ == user_id_ && + context.gaia_id_ == gaia_id_ && context.key_ == key_ && context.auth_code_ == auth_code_ && context.user_id_hash_ == user_id_hash_ && @@ -66,6 +68,10 @@ const std::string& UserContext::GetUserID() const { return user_id_; } +const std::string& UserContext::GetGaiaID() const { + return gaia_id_; +} + const Key* UserContext::GetKey() const { return &key_; } @@ -111,6 +117,10 @@ void UserContext::SetUserID(const std::string& user_id) { user_id_ = login::CanonicalizeUserID(user_id); } +void UserContext::SetGaiaID(const std::string& gaia_id) { + gaia_id_ = gaia_id; +} + void UserContext::SetKey(const Key& key) { key_ = key; } diff --git a/chromeos/login/auth/user_context.h b/chromeos/login/auth/user_context.h index ff28c96..879e59a 100644 --- a/chromeos/login/auth/user_context.h +++ b/chromeos/login/auth/user_context.h @@ -41,6 +41,7 @@ class CHROMEOS_EXPORT UserContext { bool operator!=(const UserContext& context) const; const std::string& GetUserID() const; + const std::string& GetGaiaID() const; const Key* GetKey() const; Key* GetKey(); const std::string& GetAuthCode() const; @@ -54,6 +55,7 @@ class CHROMEOS_EXPORT UserContext { bool HasCredentials() const; void SetUserID(const std::string& user_id); + void SetGaiaID(const std::string& gaia_id); void SetKey(const Key& key); void SetAuthCode(const std::string& auth_code); void SetUserIDHash(const std::string& user_id_hash); @@ -67,6 +69,7 @@ class CHROMEOS_EXPORT UserContext { private: std::string user_id_; + std::string gaia_id_; Key key_; std::string auth_code_; std::string user_id_hash_; |