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

Side by Side Diff: chromeos/login/auth/user_context.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_
6 #define CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_ 6 #define CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chromeos/chromeos_export.h" 10 #include "chromeos/chromeos_export.h"
(...skipping 23 matching lines...) Expand all
34 UserContext(); 34 UserContext();
35 UserContext(const UserContext& other); 35 UserContext(const UserContext& other);
36 explicit UserContext(const std::string& user_id); 36 explicit UserContext(const std::string& user_id);
37 UserContext(user_manager::UserType user_type, const std::string& user_id); 37 UserContext(user_manager::UserType user_type, const std::string& user_id);
38 ~UserContext(); 38 ~UserContext();
39 39
40 bool operator==(const UserContext& context) const; 40 bool operator==(const UserContext& context) const;
41 bool operator!=(const UserContext& context) const; 41 bool operator!=(const UserContext& context) const;
42 42
43 const std::string& GetUserID() const; 43 const std::string& GetUserID() const;
44 const std::string& GetGaiaID() const;
44 const Key* GetKey() const; 45 const Key* GetKey() const;
45 Key* GetKey(); 46 Key* GetKey();
46 const std::string& GetAuthCode() const; 47 const std::string& GetAuthCode() const;
47 const std::string& GetUserIDHash() const; 48 const std::string& GetUserIDHash() const;
48 bool IsUsingOAuth() const; 49 bool IsUsingOAuth() const;
49 AuthFlow GetAuthFlow() const; 50 AuthFlow GetAuthFlow() const;
50 user_manager::UserType GetUserType() const; 51 user_manager::UserType GetUserType() const;
51 const std::string& GetPublicSessionLocale() const; 52 const std::string& GetPublicSessionLocale() const;
52 const std::string& GetPublicSessionInputMethod() const; 53 const std::string& GetPublicSessionInputMethod() const;
53 54
54 bool HasCredentials() const; 55 bool HasCredentials() const;
55 56
56 void SetUserID(const std::string& user_id); 57 void SetUserID(const std::string& user_id);
58 void SetGaiaID(const std::string& gaia_id);
57 void SetKey(const Key& key); 59 void SetKey(const Key& key);
58 void SetAuthCode(const std::string& auth_code); 60 void SetAuthCode(const std::string& auth_code);
59 void SetUserIDHash(const std::string& user_id_hash); 61 void SetUserIDHash(const std::string& user_id_hash);
60 void SetIsUsingOAuth(bool is_using_oauth); 62 void SetIsUsingOAuth(bool is_using_oauth);
61 void SetAuthFlow(AuthFlow auth_flow); 63 void SetAuthFlow(AuthFlow auth_flow);
62 void SetUserType(user_manager::UserType user_type); 64 void SetUserType(user_manager::UserType user_type);
63 void SetPublicSessionLocale(const std::string& locale); 65 void SetPublicSessionLocale(const std::string& locale);
64 void SetPublicSessionInputMethod(const std::string& input_method); 66 void SetPublicSessionInputMethod(const std::string& input_method);
65 67
66 void ClearSecrets(); 68 void ClearSecrets();
67 69
68 private: 70 private:
69 std::string user_id_; 71 std::string user_id_;
72 std::string gaia_id_;
70 Key key_; 73 Key key_;
71 std::string auth_code_; 74 std::string auth_code_;
72 std::string user_id_hash_; 75 std::string user_id_hash_;
73 bool is_using_oauth_; 76 bool is_using_oauth_;
74 AuthFlow auth_flow_; 77 AuthFlow auth_flow_;
75 user_manager::UserType user_type_; 78 user_manager::UserType user_type_;
76 std::string public_session_locale_; 79 std::string public_session_locale_;
77 std::string public_session_input_method_; 80 std::string public_session_input_method_;
78 }; 81 };
79 82
80 } // namespace chromeos 83 } // namespace chromeos
81 84
82 #endif // CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_ 85 #endif // CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698