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

Side by Side Diff: chrome/browser/chromeos/login/auth/login_performer.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 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 | 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 #include "chrome/browser/chromeos/login/auth/login_performer.h" 5 #include "chrome/browser/chromeos/login/auth/login_performer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 delegate_->PolicyLoadFailed(); 214 delegate_->PolicyLoadFailed();
215 else 215 else
216 NOTREACHED(); 216 NOTREACHED();
217 return; 217 return;
218 } else if (status != CrosSettingsProvider::TRUSTED) { 218 } else if (status != CrosSettingsProvider::TRUSTED) {
219 // Value of kAccountsPrefSupervisedUsersEnabled setting is still not 219 // Value of kAccountsPrefSupervisedUsersEnabled setting is still not
220 // verified. Another attempt will be invoked after verification completion. 220 // verified. Another attempt will be invoked after verification completion.
221 return; 221 return;
222 } 222 }
223 223
224 if (!UserManager::Get()->AreLocallyManagedUsersAllowed()) { 224 if (!GetUserManager()->AreLocallyManagedUsersAllowed()) {
225 LOG(ERROR) << "Login attempt of locally managed user detected."; 225 LOG(ERROR) << "Login attempt of locally managed user detected.";
226 delegate_->WhiteListCheckFailed(user_context.GetUserID()); 226 delegate_->WhiteListCheckFailed(user_context.GetUserID());
227 return; 227 return;
228 } 228 }
229 229
230 SupervisedUserLoginFlow* new_flow = 230 SupervisedUserLoginFlow* new_flow =
231 new SupervisedUserLoginFlow(user_context.GetUserID()); 231 new SupervisedUserLoginFlow(user_context.GetUserID());
232 new_flow->set_host( 232 new_flow->set_host(
233 UserManager::Get()->GetUserFlow(user_context.GetUserID())->host()); 233 GetUserManager()->GetUserFlow(user_context.GetUserID())->host());
234 UserManager::Get()->SetUserFlow(user_context.GetUserID(), new_flow); 234 GetUserManager()->SetUserFlow(user_context.GetUserID(), new_flow);
235 235
236 SupervisedUserAuthentication* authentication = UserManager::Get()-> 236 SupervisedUserAuthentication* authentication =
237 GetSupervisedUserManager()->GetAuthentication(); 237 GetUserManager()->GetSupervisedUserManager()->GetAuthentication();
238 238
239 UserContext user_context_copy = authentication->TransformKey(user_context); 239 UserContext user_context_copy = authentication->TransformKey(user_context);
240 240
241 if (authentication->GetPasswordSchema(user_context.GetUserID()) == 241 if (authentication->GetPasswordSchema(user_context.GetUserID()) ==
242 SupervisedUserAuthentication::SCHEMA_SALT_HASHED) { 242 SupervisedUserAuthentication::SCHEMA_SALT_HASHED) {
243 if (extended_authenticator_.get()) { 243 if (extended_authenticator_.get()) {
244 extended_authenticator_->SetConsumer(NULL); 244 extended_authenticator_->SetConsumer(NULL);
245 } 245 }
246 extended_authenticator_ = new ExtendedAuthenticator(this); 246 extended_authenticator_ = new ExtendedAuthenticator(this);
247 // TODO(antrim) : Replace empty callback with explicit method. 247 // TODO(antrim) : Replace empty callback with explicit method.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 policy::WildcardLoginChecker::Result result) { 362 policy::WildcardLoginChecker::Result result) {
363 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) { 363 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) {
364 StartLoginCompletion(); 364 StartLoginCompletion();
365 } else { 365 } else {
366 if (delegate_) 366 if (delegate_)
367 delegate_->WhiteListCheckFailed(user_context_.GetUserID()); 367 delegate_->WhiteListCheckFailed(user_context_.GetUserID());
368 } 368 }
369 } 369 }
370 370
371 } // namespace chromeos 371 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698