| OLD | NEW |
| 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 #include "chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/common/system/chromeos/devicetype_utils.h" | 9 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 return; | 338 return; |
| 339 case policy::EnrollmentStatus::STATUS_STORE_TOKEN_AND_ID_FAILED: | 339 case policy::EnrollmentStatus::STATUS_STORE_TOKEN_AND_ID_FAILED: |
| 340 // This error should not happen for enterprise enrollment. | 340 // This error should not happen for enterprise enrollment. |
| 341 ShowError(IDS_ENTERPRISE_ENROLLMENT_STATUS_STORE_TOKEN_AND_ID_FAILED, | 341 ShowError(IDS_ENTERPRISE_ENROLLMENT_STATUS_STORE_TOKEN_AND_ID_FAILED, |
| 342 true); | 342 true); |
| 343 NOTREACHED(); | 343 NOTREACHED(); |
| 344 return; | 344 return; |
| 345 case policy::EnrollmentStatus::STATUS_ATTRIBUTE_UPDATE_FAILED: | 345 case policy::EnrollmentStatus::STATUS_ATTRIBUTE_UPDATE_FAILED: |
| 346 ShowErrorForDevice(IDS_ENTERPRISE_ENROLLMENT_ATTRIBUTE_ERROR, false); | 346 ShowErrorForDevice(IDS_ENTERPRISE_ENROLLMENT_ATTRIBUTE_ERROR, false); |
| 347 return; | 347 return; |
| 348 case policy::EnrollmentStatus::STATUS_NO_MACHINE_IDENTIFICATION: |
| 349 ShowError(IDS_ENTERPRISE_ENROLLMENT_STATUS_NO_MACHINE_IDENTIFICATION, |
| 350 false); |
| 351 return; |
| 348 } | 352 } |
| 349 NOTREACHED(); | 353 NOTREACHED(); |
| 350 } | 354 } |
| 351 | 355 |
| 352 // EnrollmentScreenHandler BaseScreenHandler implementation ----- | 356 // EnrollmentScreenHandler BaseScreenHandler implementation ----- |
| 353 | 357 |
| 354 void EnrollmentScreenHandler::Initialize() { | 358 void EnrollmentScreenHandler::Initialize() { |
| 355 if (show_on_init_) { | 359 if (show_on_init_) { |
| 356 Show(); | 360 Show(); |
| 357 show_on_init_ = false; | 361 show_on_init_ = false; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 | 574 |
| 571 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); | 575 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); |
| 572 if (first_show_) { | 576 if (first_show_) { |
| 573 first_show_ = false; | 577 first_show_ = false; |
| 574 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); | 578 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); |
| 575 } | 579 } |
| 576 histogram_helper_->OnScreenShow(); | 580 histogram_helper_->OnScreenShow(); |
| 577 } | 581 } |
| 578 | 582 |
| 579 } // namespace chromeos | 583 } // namespace chromeos |
| OLD | NEW |