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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Issue 493613002: Add an enrolling state for consumer management section in settings page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dn
Patch Set: Created 6 years, 3 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
OLDNEW
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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (test_expects_complete_login_) 381 if (test_expects_complete_login_)
382 SubmitLoginFormForTest(); 382 SubmitLoginFormForTest();
383 } 383 }
384 384
385 void GaiaScreenHandler::OnSetOwnerDone(const std::string& typed_email, 385 void GaiaScreenHandler::OnSetOwnerDone(const std::string& typed_email,
386 const std::string& password, 386 const std::string& password,
387 bool using_saml, 387 bool using_saml,
388 bool success) { 388 bool success) {
389 CHECK(consumer_management_); 389 CHECK(consumer_management_);
390 if (success) { 390 if (success) {
391 consumer_management_->SetEnrollmentState( 391 consumer_management_->SetEnrollmentStage(
392 policy::ConsumerManagementService::ENROLLMENT_OWNER_STORED); 392 policy::ConsumerManagementService::ENROLLMENT_STAGE_OWNER_STORED);
393 } else { 393 } else {
394 LOG(ERROR) << "Failed to write owner e-mail to boot lockbox."; 394 LOG(ERROR) << "Failed to write owner e-mail to boot lockbox.";
395 consumer_management_->SetEnrollmentState( 395 consumer_management_->SetEnrollmentStage(
396 policy::ConsumerManagementService::ENROLLMENT_BOOT_LOCKBOX_FAILED); 396 policy::ConsumerManagementService::
397 ENROLLMENT_STAGE_BOOT_LOCKBOX_FAILED);
397 // We should continue logging in the user, as there's not much we can do 398 // We should continue logging in the user, as there's not much we can do
398 // here. 399 // here.
399 } 400 }
400 DoCompleteLogin(typed_email, password, using_saml); 401 DoCompleteLogin(typed_email, password, using_saml);
401 } 402 }
402 403
403 void GaiaScreenHandler::DoCompleteLogin(const std::string& typed_email, 404 void GaiaScreenHandler::DoCompleteLogin(const std::string& typed_email,
404 const std::string& password, 405 const std::string& password,
405 bool using_saml) { 406 bool using_saml) {
406 if (!Delegate()) 407 if (!Delegate())
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 616
616 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { 617 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() {
617 DCHECK(signin_screen_handler_); 618 DCHECK(signin_screen_handler_);
618 return signin_screen_handler_->delegate_; 619 return signin_screen_handler_->delegate_;
619 } 620 }
620 621
621 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { 622 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) {
622 signin_screen_handler_ = handler; 623 signin_screen_handler_ = handler;
623 } 624 }
624 } // namespace chromeos 625 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698