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

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

Issue 1229883003: ChromeOS: should send old user GAPS cookie to GAIA on user reauthentication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years, 5 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 | « chromeos/login/auth/user_context.h ('k') | components/user_manager/user_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/login/auth/user_context.cc
diff --git a/chromeos/login/auth/user_context.cc b/chromeos/login/auth/user_context.cc
index e5b3fe0951949df8a3a14685971a20c757e66721..1f630c278ec127526483c132308a11605c36f18d 100644
--- a/chromeos/login/auth/user_context.cc
+++ b/chromeos/login/auth/user_context.cc
@@ -26,7 +26,8 @@ UserContext::UserContext(const UserContext& other)
user_type_(other.user_type_),
public_session_locale_(other.public_session_locale_),
public_session_input_method_(other.public_session_input_method_),
- device_id_(other.device_id_) {
+ device_id_(other.device_id_),
+ gaps_cookie_(other.gaps_cookie_) {
}
UserContext::UserContext(const std::string& user_id)
@@ -122,6 +123,10 @@ const std::string& UserContext::GetDeviceId() const {
return device_id_;
}
+const std::string& UserContext::GetGAPSCookie() const {
+ return gaps_cookie_;
+}
+
bool UserContext::HasCredentials() const {
return (!user_id_.empty() && !key_.GetSecret().empty()) ||
!auth_code_.empty();
@@ -179,6 +184,10 @@ void UserContext::SetDeviceId(const std::string& device_id) {
device_id_ = device_id;
}
+void UserContext::SetGAPSCookie(const std::string& gaps_cookie) {
+ gaps_cookie_ = gaps_cookie;
+}
+
void UserContext::ClearSecrets() {
key_.ClearSecret();
auth_code_.clear();
« no previous file with comments | « chromeos/login/auth/user_context.h ('k') | components/user_manager/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698