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

Unified Diff: chromeos/login/auth/user_context.cc

Issue 473153002: Inline sign in extracts gaia id from HTTP header and seeds account tracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 2 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
Index: chromeos/login/auth/user_context.cc
diff --git a/chromeos/login/auth/user_context.cc b/chromeos/login/auth/user_context.cc
index 31113f1311b51007ed890e72b35be4721a3a3be7..edeb24ea7924345a44656b4f294543c5094580be 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;
}

Powered by Google App Engine
This is Rietveld 408576698