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

Side by Side Diff: chrome/browser/chromeos/login/login_performer.h

Issue 148843002: Make an online wildcard login check for enterprise devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 6 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LOGIN_PERFORMER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/chromeos/login/authenticator.h" 13 #include "chrome/browser/chromeos/login/authenticator.h"
13 #include "chrome/browser/chromeos/login/login_status_consumer.h" 14 #include "chrome/browser/chromeos/login/login_status_consumer.h"
14 #include "chrome/browser/chromeos/login/online_attempt_host.h" 15 #include "chrome/browser/chromeos/login/online_attempt_host.h"
15 #include "chrome/browser/chromeos/login/user.h" 16 #include "chrome/browser/chromeos/login/user.h"
16 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
17 #include "content/public/browser/notification_observer.h" 18 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
19 #include "google_apis/gaia/google_service_auth_error.h" 20 #include "google_apis/gaia/google_service_auth_error.h"
20 21
22 namespace policy {
23 class WildcardLoginChecker;
24 }
25
21 namespace chromeos { 26 namespace chromeos {
22 27
23 // This class encapsulates sign in operations. 28 // This class encapsulates sign in operations.
24 // Sign in is performed in a way that offline auth is executed first. 29 // Sign in is performed in a way that offline auth is executed first.
25 // Once offline auth is OK - user homedir is mounted, UI is launched. 30 // Once offline auth is OK - user homedir is mounted, UI is launched.
26 // At this point LoginPerformer |delegate_| is destroyed and it releases 31 // At this point LoginPerformer |delegate_| is destroyed and it releases
27 // LP instance ownership. LP waits for online login result. 32 // LP instance ownership. LP waits for online login result.
28 // If auth is succeeded, cookie fetcher is executed, LP instance deletes itself. 33 // If auth is succeeded, cookie fetcher is executed, LP instance deletes itself.
29 // 34 //
30 // If |delegate_| is not NULL it will handle error messages, password input. 35 // If |delegate_| is not NULL it will handle error messages, password input.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Implements OnlineAttemptHost::Delegate. 115 // Implements OnlineAttemptHost::Delegate.
111 virtual void OnChecked(const std::string& username, bool success) OVERRIDE; 116 virtual void OnChecked(const std::string& username, bool success) OVERRIDE;
112 117
113 private: 118 private:
114 // Starts login completion of externally authenticated user. 119 // Starts login completion of externally authenticated user.
115 void StartLoginCompletion(); 120 void StartLoginCompletion();
116 121
117 // Starts authentication. 122 // Starts authentication.
118 void StartAuthentication(); 123 void StartAuthentication();
119 124
125 // Completion callback for the online wildcard login check for enterprise
126 // devices. Continues the login process or signals whitelist check failure
127 // depending on the value of |result|.
128 void OnlineWildcardLoginCheckCompleted(bool result);
129
120 // Used for logging in. 130 // Used for logging in.
121 scoped_refptr<Authenticator> authenticator_; 131 scoped_refptr<Authenticator> authenticator_;
122 132
123 // Used to make auxiliary online check. 133 // Used to make auxiliary online check.
124 OnlineAttemptHost online_attempt_host_; 134 OnlineAttemptHost online_attempt_host_;
125 135
126 // Represents last login failure that was encountered when communicating to 136 // Represents last login failure that was encountered when communicating to
127 // sign-in server. LoginFailure.LoginFailureNone() by default. 137 // sign-in server. LoginFailure.LoginFailureNone() by default.
128 LoginFailure last_login_failure_; 138 LoginFailure last_login_failure_;
129 139
130 // User credentials for the current login attempt. 140 // User credentials for the current login attempt.
131 UserContext user_context_; 141 UserContext user_context_;
132 142
133 // Notifications receiver. 143 // Notifications receiver.
134 Delegate* delegate_; 144 Delegate* delegate_;
135 145
136 // True if password change has been detected. 146 // True if password change has been detected.
137 // Once correct password is entered homedir migration is executed. 147 // Once correct password is entered homedir migration is executed.
138 bool password_changed_; 148 bool password_changed_;
139 int password_changed_callback_count_; 149 int password_changed_callback_count_;
140 150
141 // Authorization mode type. 151 // Authorization mode type.
142 AuthorizationMode auth_mode_; 152 AuthorizationMode auth_mode_;
143 153
154 // Used to verify logins that matched wildcard on the login whitelist.
155 scoped_ptr<policy::WildcardLoginChecker> wildcard_login_checker_;
156
144 base::WeakPtrFactory<LoginPerformer> weak_factory_; 157 base::WeakPtrFactory<LoginPerformer> weak_factory_;
145 158
146 DISALLOW_COPY_AND_ASSIGN(LoginPerformer); 159 DISALLOW_COPY_AND_ASSIGN(LoginPerformer);
147 }; 160 };
148 161
149 } // namespace chromeos 162 } // namespace chromeos
150 163
151 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_ 164 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_PERFORMER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | chrome/browser/chromeos/login/login_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698