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

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc

Issue 2736873004: Remove custom shortcut for Chromad (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/policy/device_cloud_policy_initializer.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void DeviceCloudPolicyInitializer::StartEnrollment( 99 void DeviceCloudPolicyInitializer::StartEnrollment(
100 DeviceManagementService* device_management_service, 100 DeviceManagementService* device_management_service,
101 chromeos::ActiveDirectoryJoinDelegate* ad_join_delegate, 101 chromeos::ActiveDirectoryJoinDelegate* ad_join_delegate,
102 const EnrollmentConfig& enrollment_config, 102 const EnrollmentConfig& enrollment_config,
103 const std::string& auth_token, 103 const std::string& auth_token,
104 const EnrollmentCallback& enrollment_callback) { 104 const EnrollmentCallback& enrollment_callback) {
105 DCHECK(is_initialized_); 105 DCHECK(is_initialized_);
106 DCHECK(!enrollment_handler_); 106 DCHECK(!enrollment_handler_);
107 107
108 manager_->core()->Disconnect(); 108 manager_->core()->Disconnect();
109 // TODO(rsorokin): Remove that once DM server does not require requisition.
110 // See crbug.com/668455
111 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
112 chromeos::switches::kEnableAd)) {
113 manager_->SetDeviceRequisition("chrome_ad");
114 }
115 109
116 enrollment_handler_.reset(new EnrollmentHandlerChromeOS( 110 enrollment_handler_.reset(new EnrollmentHandlerChromeOS(
117 device_store_, install_attributes_, state_keys_broker_, 111 device_store_, install_attributes_, state_keys_broker_,
118 attestation_flow_.get(), CreateClient(device_management_service), 112 attestation_flow_.get(), CreateClient(device_management_service),
119 background_task_runner_, ad_join_delegate, enrollment_config, auth_token, 113 background_task_runner_, ad_join_delegate, enrollment_config, auth_token,
120 install_attributes_->GetDeviceId(), manager_->GetDeviceRequisition(), 114 install_attributes_->GetDeviceId(), manager_->GetDeviceRequisition(),
121 base::Bind(&DeviceCloudPolicyInitializer::EnrollmentCompleted, 115 base::Bind(&DeviceCloudPolicyInitializer::EnrollmentCompleted,
122 base::Unretained(this), enrollment_callback))); 116 base::Unretained(this), enrollment_callback)));
123 enrollment_handler_->StartEnrollment(); 117 enrollment_handler_->StartEnrollment();
124 } 118 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (success && (success = att_signed_data.ParseFromString(signed_data))) { 332 if (success && (success = att_signed_data.ParseFromString(signed_data))) {
339 em_signed_data.set_data(att_signed_data.data()); 333 em_signed_data.set_data(att_signed_data.data());
340 em_signed_data.set_signature(att_signed_data.signature()); 334 em_signed_data.set_signature(att_signed_data.signature());
341 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() - 335 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() -
342 data.size()); 336 data.size());
343 } 337 }
344 callback.Run(success, em_signed_data); 338 callback.Run(success, em_signed_data);
345 } 339 }
346 340
347 } // namespace policy 341 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698