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 #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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 Profile* profile = ProfileHelper::GetSigninProfile(); | 345 Profile* profile = ProfileHelper::GetSigninProfile(); |
346 if (delegate_) { | 346 if (delegate_) { |
347 authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); | 347 authenticator_ = LoginUtils::Get()->CreateAuthenticator(this); |
348 BrowserThread::PostTask( | 348 BrowserThread::PostTask( |
349 BrowserThread::UI, FROM_HERE, | 349 BrowserThread::UI, FROM_HERE, |
350 base::Bind(&Authenticator::AuthenticateToLogin, authenticator_.get(), | 350 base::Bind(&Authenticator::AuthenticateToLogin, authenticator_.get(), |
351 profile, | 351 profile, |
352 user_context_)); | 352 user_context_)); |
353 // Make unobtrusive online check. It helps to determine password change | 353 // Make unobtrusive online check. It helps to determine password change |
354 // state in the case when offline login fails. | 354 // state in the case when offline login fails. |
355 online_attempt_host_.Check(profile, user_context_); | 355 online_attempt_host_.Check(profile->GetRequestContext(), user_context_); |
356 } else { | 356 } else { |
357 NOTREACHED(); | 357 NOTREACHED(); |
358 } | 358 } |
359 user_context_.ClearSecrets(); | 359 user_context_.ClearSecrets(); |
360 } | 360 } |
361 | 361 |
362 void LoginPerformer::OnlineWildcardLoginCheckCompleted( | 362 void LoginPerformer::OnlineWildcardLoginCheckCompleted( |
363 policy::WildcardLoginChecker::Result result) { | 363 policy::WildcardLoginChecker::Result result) { |
364 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) { | 364 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) { |
365 StartLoginCompletion(); | 365 StartLoginCompletion(); |
366 } else { | 366 } else { |
367 if (delegate_) | 367 if (delegate_) |
368 delegate_->WhiteListCheckFailed(user_context_.GetUserID()); | 368 delegate_->WhiteListCheckFailed(user_context_.GetUserID()); |
369 } | 369 } |
370 } | 370 } |
371 | 371 |
372 } // namespace chromeos | 372 } // namespace chromeos |
OLD | NEW |