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

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

Issue 2208583006: UMA for pin unlock success/failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed patch set 9 errors. Created 4 years, 4 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 const AccountId& GetAccountId() const; 49 const AccountId& GetAccountId() const;
50 const std::string& GetGaiaID() const; 50 const std::string& GetGaiaID() const;
51 const Key* GetKey() const; 51 const Key* GetKey() const;
52 Key* GetKey(); 52 Key* GetKey();
53 const std::string& GetAuthCode() const; 53 const std::string& GetAuthCode() const;
54 const std::string& GetRefreshToken() const; 54 const std::string& GetRefreshToken() const;
55 const std::string& GetAccessToken() const; 55 const std::string& GetAccessToken() const;
56 const std::string& GetUserIDHash() const; 56 const std::string& GetUserIDHash() const;
57 bool IsUsingOAuth() const; 57 bool IsUsingOAuth() const;
58 bool IsUsingPin() const;
58 AuthFlow GetAuthFlow() const; 59 AuthFlow GetAuthFlow() const;
59 user_manager::UserType GetUserType() const; 60 user_manager::UserType GetUserType() const;
60 const std::string& GetPublicSessionLocale() const; 61 const std::string& GetPublicSessionLocale() const;
61 const std::string& GetPublicSessionInputMethod() const; 62 const std::string& GetPublicSessionInputMethod() const;
62 const std::string& GetDeviceId() const; 63 const std::string& GetDeviceId() const;
63 const std::string& GetGAPSCookie() const; 64 const std::string& GetGAPSCookie() const;
64 65
65 bool HasCredentials() const; 66 bool HasCredentials() const;
66 67
67 void SetAccountId(const AccountId& account_id); 68 void SetAccountId(const AccountId& account_id);
68 void SetKey(const Key& key); 69 void SetKey(const Key& key);
69 void SetAuthCode(const std::string& auth_code); 70 void SetAuthCode(const std::string& auth_code);
70 void SetRefreshToken(const std::string& refresh_token); 71 void SetRefreshToken(const std::string& refresh_token);
71 void SetAccessToken(const std::string& access_token); 72 void SetAccessToken(const std::string& access_token);
72 void SetUserIDHash(const std::string& user_id_hash); 73 void SetUserIDHash(const std::string& user_id_hash);
73 void SetIsUsingOAuth(bool is_using_oauth); 74 void SetIsUsingOAuth(bool is_using_oauth);
75 void SetIsUsingPin(bool is_using_pin);
74 void SetAuthFlow(AuthFlow auth_flow); 76 void SetAuthFlow(AuthFlow auth_flow);
75 void SetUserType(user_manager::UserType user_type); 77 void SetUserType(user_manager::UserType user_type);
76 void SetPublicSessionLocale(const std::string& locale); 78 void SetPublicSessionLocale(const std::string& locale);
77 void SetPublicSessionInputMethod(const std::string& input_method); 79 void SetPublicSessionInputMethod(const std::string& input_method);
78 void SetDeviceId(const std::string& device_id); 80 void SetDeviceId(const std::string& device_id);
79 void SetGAPSCookie(const std::string& gaps_cookie); 81 void SetGAPSCookie(const std::string& gaps_cookie);
80 82
81 void ClearSecrets(); 83 void ClearSecrets();
82 84
83 private: 85 private:
84 AccountId account_id_; 86 AccountId account_id_;
85 Key key_; 87 Key key_;
86 std::string auth_code_; 88 std::string auth_code_;
87 std::string refresh_token_; 89 std::string refresh_token_;
88 std::string access_token_; // OAuthLogin scoped access token. 90 std::string access_token_; // OAuthLogin scoped access token.
89 std::string user_id_hash_; 91 std::string user_id_hash_;
90 bool is_using_oauth_ = true; 92 bool is_using_oauth_ = true;
93 bool is_using_pin_ = false;
91 AuthFlow auth_flow_ = AUTH_FLOW_OFFLINE; 94 AuthFlow auth_flow_ = AUTH_FLOW_OFFLINE;
92 user_manager::UserType user_type_ = user_manager::USER_TYPE_REGULAR; 95 user_manager::UserType user_type_ = user_manager::USER_TYPE_REGULAR;
93 std::string public_session_locale_; 96 std::string public_session_locale_;
94 std::string public_session_input_method_; 97 std::string public_session_input_method_;
95 std::string device_id_; 98 std::string device_id_;
96 std::string gaps_cookie_; 99 std::string gaps_cookie_;
97 }; 100 };
98 101
99 } // namespace chromeos 102 } // namespace chromeos
100 103
101 #endif // CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_ 104 #endif // CHROMEOS_LOGIN_AUTH_USER_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc ('k') | chromeos/login/auth/user_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698