diff options
author | nkostylev <nkostylev@chromium.org> | 2014-10-24 07:36:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-24 14:36:23 +0000 |
commit | 07398a38454635dcbebac7898cbaa91969741e60 (patch) | |
tree | 9352d97d49a3baf0fe1110af3199414b224f62c0 /chromeos | |
parent | bae68443fb41cf6796942f6e037a6ad6afd1b687 (diff) | |
download | chromium_src-07398a38454635dcbebac7898cbaa91969741e60.zip chromium_src-07398a38454635dcbebac7898cbaa91969741e60.tar.gz chromium_src-07398a38454635dcbebac7898cbaa91969741e60.tar.bz2 |
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}
Diffstat (limited to 'chromeos')
-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_; |