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

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

Issue 1183893005: ChromeOS: user whitelist check should happen before entering password. (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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LOGIN_PERFORMER_H_ 5 #ifndef CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_
6 #define CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ 6 #define 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // "password changed detected" event from further attempts to enter old 110 // "password changed detected" event from further attempts to enter old
111 // password for cryptohome migration (when > 1). 111 // password for cryptohome migration (when > 1).
112 int password_changed_callback_count() { 112 int password_changed_callback_count() {
113 return password_changed_callback_count_; 113 return password_changed_callback_count_;
114 } 114 }
115 115
116 void set_delegate(Delegate* delegate) { delegate_ = delegate; } 116 void set_delegate(Delegate* delegate) { delegate_ = delegate; }
117 117
118 AuthorizationMode auth_mode() const { return auth_mode_; } 118 AuthorizationMode auth_mode() const { return auth_mode_; }
119 119
120 // Check if user is allowed to sign in on device. |wildcard_match| will
121 // contain additional information whether this user is explicitly listed or
122 // not (may be relevant for extension-based sign-in).
123 virtual bool IsUserWhitelisted(const std::string& user_id,
124 bool* wildcard_match) = 0;
125
120 protected: 126 protected:
121 // Implements OnlineAttemptHost::Delegate. 127 // Implements OnlineAttemptHost::Delegate.
122 void OnChecked(const std::string& user_id, bool success) override; 128 void OnChecked(const std::string& user_id, bool success) override;
123 129
124 // Platform-dependant methods to be implemented by concrete class. 130 // Platform-dependant methods to be implemented by concrete class.
125 131
126 // Run trusted check for a platform. If trusted check have to be performed 132 // Run trusted check for a platform. If trusted check have to be performed
127 // asynchronously, |false| will be returned, and either delegate's 133 // asynchronously, |false| will be returned, and either delegate's
128 // PolicyLoadFailed() or |callback| will be called upon actual check. 134 // PolicyLoadFailed() or |callback| will be called upon actual check.
129 virtual bool RunTrustedCheck(const base::Closure& callback) = 0; 135 virtual bool RunTrustedCheck(const base::Closure& callback) = 0;
130 136
131 // Check if user is allowed to sign in on device. |wildcard_match| will
132 // contain additional information whether this user is explicitly listed or
133 // not (may be relevant for extension-based sign-in).
134 virtual bool IsUserWhitelisted(const std::string& user_id,
135 bool* wildcard_match) = 0;
136
137 // This method should run addional online check if user can sign in on device. 137 // This method should run addional online check if user can sign in on device.
138 // Either |success_callback| or |failure_callback| should be called upon this 138 // Either |success_callback| or |failure_callback| should be called upon this
139 // check. 139 // check.
140 virtual void RunOnlineWhitelistCheck( 140 virtual void RunOnlineWhitelistCheck(
141 const std::string& user_id, 141 const std::string& user_id,
142 bool wildcard_match, 142 bool wildcard_match,
143 const std::string& refresh_token, 143 const std::string& refresh_token,
144 const base::Closure& success_callback, 144 const base::Closure& success_callback,
145 const base::Closure& failure_callback) = 0; 145 const base::Closure& failure_callback) = 0;
146 146
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // TODO(antrim): remove once we got rid of /ClientLogin. 230 // TODO(antrim): remove once we got rid of /ClientLogin.
231 bool disable_client_login_; 231 bool disable_client_login_;
232 232
233 base::WeakPtrFactory<LoginPerformer> weak_factory_; 233 base::WeakPtrFactory<LoginPerformer> weak_factory_;
234 DISALLOW_COPY_AND_ASSIGN(LoginPerformer); 234 DISALLOW_COPY_AND_ASSIGN(LoginPerformer);
235 }; 235 };
236 236
237 } // namespace chromeos 237 } // namespace chromeos
238 238
239 #endif // CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_ 239 #endif // CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698