| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 builder->Add("oauthEnrollDeviceInformation", | 371 builder->Add("oauthEnrollDeviceInformation", |
| 372 IDS_ENTERPRISE_ENROLLMENT_DEVICE_INFORMATION); | 372 IDS_ENTERPRISE_ENROLLMENT_DEVICE_INFORMATION); |
| 373 builder->Add("oauthEnrollExplainAttributeLink", | 373 builder->Add("oauthEnrollExplainAttributeLink", |
| 374 IDS_ENTERPRISE_ENROLLMENT_EXPLAIN_ATTRIBUTE_LINK); | 374 IDS_ENTERPRISE_ENROLLMENT_EXPLAIN_ATTRIBUTE_LINK); |
| 375 builder->Add("oauthEnrollAttributeExplanation", | 375 builder->Add("oauthEnrollAttributeExplanation", |
| 376 IDS_ENTERPRISE_ENROLLMENT_ATTRIBUTE_EXPLANATION); | 376 IDS_ENTERPRISE_ENROLLMENT_ATTRIBUTE_EXPLANATION); |
| 377 builder->Add("oauthEnrollAssetIdLabel", | 377 builder->Add("oauthEnrollAssetIdLabel", |
| 378 IDS_ENTERPRISE_ENROLLMENT_ASSET_ID_LABEL); | 378 IDS_ENTERPRISE_ENROLLMENT_ASSET_ID_LABEL); |
| 379 builder->Add("oauthEnrollLocationLabel", | 379 builder->Add("oauthEnrollLocationLabel", |
| 380 IDS_ENTERPRISE_ENROLLMENT_LOCATION_LABEL); | 380 IDS_ENTERPRISE_ENROLLMENT_LOCATION_LABEL); |
| 381 builder->Add("oauthEnrollWorking", IDS_ENTERPRISE_ENROLLMENT_WORKING_MESSAGE); |
| 381 // Do not use AddF for this string as it will be rendered by the JS code. | 382 // Do not use AddF for this string as it will be rendered by the JS code. |
| 382 builder->Add("oauthEnrollAbeSuccess", IDS_ENTERPRISE_ENROLLMENT_ABE_SUCCESS); | 383 builder->Add("oauthEnrollAbeSuccess", IDS_ENTERPRISE_ENROLLMENT_ABE_SUCCESS); |
| 383 } | 384 } |
| 384 | 385 |
| 385 bool EnrollmentScreenHandler::IsOnEnrollmentScreen() const { | 386 bool EnrollmentScreenHandler::IsOnEnrollmentScreen() const { |
| 386 return (GetCurrentScreen() == OobeScreen::SCREEN_OOBE_ENROLLMENT); | 387 return (GetCurrentScreen() == OobeScreen::SCREEN_OOBE_ENROLLMENT); |
| 387 } | 388 } |
| 388 | 389 |
| 389 bool EnrollmentScreenHandler::IsEnrollmentScreenHiddenByError() const { | 390 bool EnrollmentScreenHandler::IsEnrollmentScreenHiddenByError() const { |
| 390 return (GetCurrentScreen() == OobeScreen::SCREEN_ERROR_MESSAGE && | 391 return (GetCurrentScreen() == OobeScreen::SCREEN_ERROR_MESSAGE && |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 570 |
| 570 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); | 571 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); |
| 571 if (first_show_) { | 572 if (first_show_) { |
| 572 first_show_ = false; | 573 first_show_ = false; |
| 573 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); | 574 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); |
| 574 } | 575 } |
| 575 histogram_helper_->OnScreenShow(); | 576 histogram_helper_->OnScreenShow(); |
| 576 } | 577 } |
| 577 | 578 |
| 578 } // namespace chromeos | 579 } // namespace chromeos |
| OLD | NEW |