OLD | NEW |
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 CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 virtual ~Delegate() {} | 50 virtual ~Delegate() {} |
51 virtual void WhiteListCheckFailed(const std::string& email) = 0; | 51 virtual void WhiteListCheckFailed(const std::string& email) = 0; |
52 virtual void PolicyLoadFailed() = 0; | 52 virtual void PolicyLoadFailed() = 0; |
53 virtual void OnOnlineChecked(const std::string& email, bool success) = 0; | 53 virtual void OnOnlineChecked(const std::string& email, bool success) = 0; |
54 }; | 54 }; |
55 | 55 |
56 explicit LoginPerformer(Delegate* delegate); | 56 explicit LoginPerformer(Delegate* delegate); |
57 virtual ~LoginPerformer(); | 57 virtual ~LoginPerformer(); |
58 | 58 |
59 // AuthStatusConsumer implementation: | 59 // AuthStatusConsumer implementation: |
60 virtual void OnAuthFailure(const AuthFailure& error) OVERRIDE; | 60 virtual void OnAuthFailure(const AuthFailure& error) override; |
61 virtual void OnRetailModeAuthSuccess( | 61 virtual void OnRetailModeAuthSuccess( |
62 const UserContext& user_context) OVERRIDE; | 62 const UserContext& user_context) override; |
63 virtual void OnAuthSuccess(const UserContext& user_context) OVERRIDE; | 63 virtual void OnAuthSuccess(const UserContext& user_context) override; |
64 virtual void OnOffTheRecordAuthSuccess() OVERRIDE; | 64 virtual void OnOffTheRecordAuthSuccess() override; |
65 virtual void OnPasswordChangeDetected() OVERRIDE; | 65 virtual void OnPasswordChangeDetected() override; |
66 | 66 |
67 // Performs a login for |user_context|. | 67 // Performs a login for |user_context|. |
68 // If auth_mode is AUTH_MODE_EXTENSION, there are no further auth checks, | 68 // If auth_mode is AUTH_MODE_EXTENSION, there are no further auth checks, |
69 // AUTH_MODE_INTERNAL will perform auth checks. | 69 // AUTH_MODE_INTERNAL will perform auth checks. |
70 void PerformLogin(const UserContext& user_context, | 70 void PerformLogin(const UserContext& user_context, |
71 AuthorizationMode auth_mode); | 71 AuthorizationMode auth_mode); |
72 | 72 |
73 // Performs supervised user login with a given |user_context|. | 73 // Performs supervised user login with a given |user_context|. |
74 void LoginAsSupervisedUser(const UserContext& user_context); | 74 void LoginAsSupervisedUser(const UserContext& user_context); |
75 | 75 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 int password_changed_callback_count() { | 108 int password_changed_callback_count() { |
109 return password_changed_callback_count_; | 109 return password_changed_callback_count_; |
110 } | 110 } |
111 | 111 |
112 void set_delegate(Delegate* delegate) { delegate_ = delegate; } | 112 void set_delegate(Delegate* delegate) { delegate_ = delegate; } |
113 | 113 |
114 AuthorizationMode auth_mode() const { return auth_mode_; } | 114 AuthorizationMode auth_mode() const { return auth_mode_; } |
115 | 115 |
116 protected: | 116 protected: |
117 // Implements OnlineAttemptHost::Delegate. | 117 // Implements OnlineAttemptHost::Delegate. |
118 virtual void OnChecked(const std::string& username, bool success) OVERRIDE; | 118 virtual void OnChecked(const std::string& username, bool success) override; |
119 | 119 |
120 private: | 120 private: |
121 // Starts login completion of externally authenticated user. | 121 // Starts login completion of externally authenticated user. |
122 void StartLoginCompletion(); | 122 void StartLoginCompletion(); |
123 | 123 |
124 // Starts authentication. | 124 // Starts authentication. |
125 void StartAuthentication(); | 125 void StartAuthentication(); |
126 | 126 |
127 // Completion callback for the online wildcard login check for enterprise | 127 // Completion callback for the online wildcard login check for enterprise |
128 // devices. Continues the login process or signals whitelist check failure | 128 // devices. Continues the login process or signals whitelist check failure |
(...skipping 30 matching lines...) Expand all Loading... |
159 scoped_ptr<policy::WildcardLoginChecker> wildcard_login_checker_; | 159 scoped_ptr<policy::WildcardLoginChecker> wildcard_login_checker_; |
160 | 160 |
161 base::WeakPtrFactory<LoginPerformer> weak_factory_; | 161 base::WeakPtrFactory<LoginPerformer> weak_factory_; |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(LoginPerformer); | 163 DISALLOW_COPY_AND_ASSIGN(LoginPerformer); |
164 }; | 164 }; |
165 | 165 |
166 } // namespace chromeos | 166 } // namespace chromeos |
167 | 167 |
168 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ | 168 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ |
OLD | NEW |