From 07398a38454635dcbebac7898cbaa91969741e60 Mon Sep 17 00:00:00 2001 From: nkostylev Date: Fri, 24 Oct 2014 07:36:01 -0700 Subject: Revert of Revert of Inline sign in extracts gaia id from HTTP header and seeds account tracker (patchset #1 id:1 of https://codereview.chromium.org/671183002/) Reason for revert: White success page and no way to proceed only reproduces for use_athena=1 builds. This CL fixes that: https://codereview.chromium.org/642693003/ Re-landing. Original issue's description: > Revert of Inline sign in extracts gaia id from HTTP header and seeds account tracker (patchset #46 id:1740001 of https://codereview.chromium.org/473153002/) > > Reason for revert: > This breaks Chrome OS GAIA login. > > After successful GAIA authentication uses sees blank white page and nothing happens. > > Please build chromeos=1 build and check that sign in as new user works fine before relanding this CL. Unfortunately autotests rely on fake gaia server and doesn't check this end-to-end sign in flow. > > Original issue's description: > > Inline login handler extracts gaia id from HTTP header and seeds account tracker > > service during sign in. > > > > BUG=341408 > > > > Committed: https://crrev.com/a8e7c94b1b79a0948d05a1fcfff53391d22ce37a > > Cr-Commit-Position: refs/heads/master@{#300750} > > TBR=guohui@chromium.org,bartfab@chromium.org,xiyuan@chromium.org,achuith@chromium.org,davemoore@chromium.org,rogerta@chromium.org > NOTREECHECKS=true > NOTRY=true > BUG=341408 > > Committed: https://crrev.com/bbaf207927765f4b7c7cae2a4af8db6c4c4a67ce > Cr-Commit-Position: refs/heads/master@{#300873} TBR=guohui@chromium.org,bartfab@chromium.org,xiyuan@chromium.org,achuith@chromium.org,davemoore@chromium.org,rogerta@chromium.org NOTREECHECKS=true NOTRY=true BUG=341408 Review URL: https://codereview.chromium.org/677703002 Cr-Commit-Position: refs/heads/master@{#301099} --- chromeos/login/auth/user_context.cc | 10 ++++++++++ chromeos/login/auth/user_context.h | 3 +++ 2 files changed, 13 insertions(+) (limited to 'chromeos') 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_; -- cgit v1.1