| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/chromeos/login/gaia_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 if (test_expects_complete_login_) | 385 if (test_expects_complete_login_) |
| 386 SubmitLoginFormForTest(); | 386 SubmitLoginFormForTest(); |
| 387 } | 387 } |
| 388 | 388 |
| 389 void GaiaScreenHandler::OnSetOwnerDone(const std::string& typed_email, | 389 void GaiaScreenHandler::OnSetOwnerDone(const std::string& typed_email, |
| 390 const std::string& password, | 390 const std::string& password, |
| 391 bool using_saml, | 391 bool using_saml, |
| 392 bool success) { | 392 bool success) { |
| 393 CHECK(consumer_management_); | 393 CHECK(consumer_management_); |
| 394 if (success) { | 394 if (success) { |
| 395 consumer_management_->SetEnrollmentState( | 395 consumer_management_->SetEnrollmentStage( |
| 396 policy::ConsumerManagementService::ENROLLMENT_OWNER_STORED); | 396 policy::ConsumerManagementService::ENROLLMENT_STAGE_OWNER_STORED); |
| 397 } else { | 397 } else { |
| 398 LOG(ERROR) << "Failed to write owner e-mail to boot lockbox."; | 398 LOG(ERROR) << "Failed to write owner e-mail to boot lockbox."; |
| 399 consumer_management_->SetEnrollmentState( | 399 consumer_management_->SetEnrollmentStage( |
| 400 policy::ConsumerManagementService::ENROLLMENT_BOOT_LOCKBOX_FAILED); | 400 policy::ConsumerManagementService:: |
| 401 ENROLLMENT_STAGE_BOOT_LOCKBOX_FAILED); |
| 401 // We should continue logging in the user, as there's not much we can do | 402 // We should continue logging in the user, as there's not much we can do |
| 402 // here. | 403 // here. |
| 403 } | 404 } |
| 404 DoCompleteLogin(typed_email, password, using_saml); | 405 DoCompleteLogin(typed_email, password, using_saml); |
| 405 } | 406 } |
| 406 | 407 |
| 407 void GaiaScreenHandler::DoCompleteLogin(const std::string& typed_email, | 408 void GaiaScreenHandler::DoCompleteLogin(const std::string& typed_email, |
| 408 const std::string& password, | 409 const std::string& password, |
| 409 bool using_saml) { | 410 bool using_saml) { |
| 410 if (!Delegate()) | 411 if (!Delegate()) |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 625 |
| 625 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 626 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
| 626 DCHECK(signin_screen_handler_); | 627 DCHECK(signin_screen_handler_); |
| 627 return signin_screen_handler_->delegate_; | 628 return signin_screen_handler_->delegate_; |
| 628 } | 629 } |
| 629 | 630 |
| 630 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { | 631 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { |
| 631 signin_screen_handler_ = handler; | 632 signin_screen_handler_ = handler; |
| 632 } | 633 } |
| 633 } // namespace chromeos | 634 } // namespace chromeos |
| OLD | NEW |