| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 void EnrollmentScreenHandler::DoShow() { | 680 void EnrollmentScreenHandler::DoShow() { |
| 681 base::DictionaryValue screen_data; | 681 base::DictionaryValue screen_data; |
| 682 screen_data.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec()); | 682 screen_data.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec()); |
| 683 screen_data.SetString("clientId", | 683 screen_data.SetString("clientId", |
| 684 GaiaUrls::GetInstance()->oauth2_chrome_client_id()); | 684 GaiaUrls::GetInstance()->oauth2_chrome_client_id()); |
| 685 screen_data.SetString("enrollment_mode", | 685 screen_data.SetString("enrollment_mode", |
| 686 EnrollmentModeToUIMode(config_.mode)); | 686 EnrollmentModeToUIMode(config_.mode)); |
| 687 screen_data.SetBoolean("attestationBased", config_.is_mode_attestation()); | 687 screen_data.SetBoolean("attestationBased", config_.is_mode_attestation()); |
| 688 screen_data.SetString("management_domain", config_.management_domain); | 688 screen_data.SetString("management_domain", config_.management_domain); |
| 689 | 689 |
| 690 const bool cfm = g_browser_process->platform_part() | 690 policy::DeviceCloudPolicyManagerChromeOS* policy_manager = |
| 691 ->browser_policy_connector_chromeos() | 691 g_browser_process->platform_part() |
| 692 ->GetDeviceCloudPolicyManager() | 692 ->browser_policy_connector_chromeos() |
| 693 ->IsRemoraRequisition(); | 693 ->GetDeviceCloudPolicyManager(); |
| 694 const bool cfm = policy_manager && policy_manager->IsRemoraRequisition(); |
| 694 screen_data.SetString("flow", cfm ? "cfm" : "enterprise"); | 695 screen_data.SetString("flow", cfm ? "cfm" : "enterprise"); |
| 695 | 696 |
| 696 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); | 697 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); |
| 697 if (first_show_) { | 698 if (first_show_) { |
| 698 first_show_ = false; | 699 first_show_ = false; |
| 699 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); | 700 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); |
| 700 } | 701 } |
| 701 histogram_helper_->OnScreenShow(); | 702 histogram_helper_->OnScreenShow(); |
| 702 } | 703 } |
| 703 | 704 |
| 704 } // namespace chromeos | 705 } // namespace chromeos |
| OLD | NEW |