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

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

Issue 2655573003: Fix crash in EnrollmentScreenHandler for Active Directory devices. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698