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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 // Do not use AddF for this string as it will be rendered by the JS code. | 381 // 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); | 382 builder->Add("oauthEnrollAbeSuccess", IDS_ENTERPRISE_ENROLLMENT_ABE_SUCCESS); |
383 builder->Add("oauthEnrollWorking", IDS_ENTERPRISE_ENROLLMENT_WORKING_MESSAGE); | |
xiyuan
2016/09/16 19:45:15
nit: Move this before L 381.
kumarniranjan
2016/09/16 20:53:40
Done.
| |
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 && |
391 network_error_model_->GetParentScreen() == | 392 network_error_model_->GetParentScreen() == |
392 OobeScreen::SCREEN_OOBE_ENROLLMENT); | 393 OobeScreen::SCREEN_OOBE_ENROLLMENT); |
(...skipping 176 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 |