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

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

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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/stub_authenticator.cc ('k') | chromeos/login/auth/user_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/login/auth/user_context.h
diff --git a/chromeos/login/auth/user_context.h b/chromeos/login/auth/user_context.h
index 4dbd71b272a698111f1a76abf808937ff33599cf..a4440cc26228c534a851d9239412bb327c010dea 100644
--- a/chromeos/login/auth/user_context.h
+++ b/chromeos/login/auth/user_context.h
@@ -9,12 +9,16 @@
#include "chromeos/chromeos_export.h"
#include "chromeos/login/auth/key.h"
+#include "components/signin/core/account_id/account_id.h"
#include "components/user_manager/user_type.h"
+class AccountId;
+
namespace chromeos {
// Information that is passed around while authentication is in progress. The
-// credentials may consist of a |user_id_|, |key_| pair or a GAIA |auth_code_|.
+// credentials may consist of a |account_id_|, |key_| pair or a GAIA
+// |auth_code_|.
// The |user_id_hash_| is used to locate the user's home directory
// mount point for the user. It is set when the mount has been completed.
class CHROMEOS_EXPORT UserContext {
@@ -35,14 +39,14 @@ class CHROMEOS_EXPORT UserContext {
UserContext();
UserContext(const UserContext& other);
- explicit UserContext(const std::string& user_id);
+ explicit UserContext(const AccountId& account_id);
UserContext(user_manager::UserType user_type, const std::string& user_id);
~UserContext();
bool operator==(const UserContext& context) const;
bool operator!=(const UserContext& context) const;
- const std::string& GetUserID() const;
+ const AccountId& GetAccountId() const;
const std::string& GetGaiaID() const;
const Key* GetKey() const;
Key* GetKey();
@@ -78,16 +82,16 @@ class CHROMEOS_EXPORT UserContext {
void ClearSecrets();
private:
- std::string user_id_;
+ AccountId account_id_;
std::string gaia_id_;
Key key_;
std::string auth_code_;
std::string refresh_token_;
std::string access_token_; // OAuthLogin scoped access token.
std::string user_id_hash_;
- bool is_using_oauth_;
- AuthFlow auth_flow_;
- user_manager::UserType user_type_;
+ bool is_using_oauth_ = true;
+ AuthFlow auth_flow_ = AUTH_FLOW_OFFLINE;
+ user_manager::UserType user_type_ = user_manager::USER_TYPE_REGULAR;
std::string public_session_locale_;
std::string public_session_input_method_;
std::string device_id_;
« no previous file with comments | « chromeos/login/auth/stub_authenticator.cc ('k') | chromeos/login/auth/user_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698