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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_client.cc

Issue 2412623003: Rename cert_based_register_request to match server proto. (Closed)
Patch Set: Created 4 years, 2 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 (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 "components/policy/core/common/cloud/cloud_policy_client.h" 5 #include "components/policy/core/common/cloud/cloud_policy_client.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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 OnRegisterCompleted(DM_STATUS_CANNOT_SIGN_REQUEST, 0, response); 178 OnRegisterCompleted(DM_STATUS_CANNOT_SIGN_REQUEST, 0, response);
179 return; 179 return;
180 } 180 }
181 181
182 policy_fetch_request_job_.reset( 182 policy_fetch_request_job_.reset(
183 service_->CreateJob( 183 service_->CreateJob(
184 DeviceManagementRequestJob::TYPE_CERT_BASED_REGISTRATION, 184 DeviceManagementRequestJob::TYPE_CERT_BASED_REGISTRATION,
185 GetRequestContext())); 185 GetRequestContext()));
186 policy_fetch_request_job_->SetClientID(client_id_); 186 policy_fetch_request_job_->SetClientID(client_id_);
187 em::SignedData* signed_request = policy_fetch_request_job_->GetRequest()-> 187 em::SignedData* signed_request = policy_fetch_request_job_->GetRequest()->
188 mutable_cert_based_register_request()->mutable_signed_request(); 188 mutable_certificate_based_register_request()->mutable_signed_request();
189 signed_request->set_data(signed_data.data()); 189 signed_request->set_data(signed_data.data());
190 signed_request->set_signature(signed_data.signature()); 190 signed_request->set_signature(signed_data.signature());
191 signed_request->set_extra_data_bytes(signed_data.extra_data_bytes()); 191 signed_request->set_extra_data_bytes(signed_data.extra_data_bytes());
192 policy_fetch_request_job_->SetRetryCallback( 192 policy_fetch_request_job_->SetRetryCallback(
193 base::Bind(&CloudPolicyClient::OnRetryRegister, 193 base::Bind(&CloudPolicyClient::OnRetryRegister,
194 weak_ptr_factory_.GetWeakPtr())); 194 weak_ptr_factory_.GetWeakPtr()));
195 policy_fetch_request_job_->Start( 195 policy_fetch_request_job_->Start(
196 base::Bind(&CloudPolicyClient::OnRegisterCompleted, 196 base::Bind(&CloudPolicyClient::OnRegisterCompleted,
197 weak_ptr_factory_.GetWeakPtr())); 197 weak_ptr_factory_.GetWeakPtr()));
198 } 198 }
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 776
777 void CloudPolicyClient::NotifyRobotAuthCodesFetched() { 777 void CloudPolicyClient::NotifyRobotAuthCodesFetched() {
778 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this)); 778 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this));
779 } 779 }
780 780
781 void CloudPolicyClient::NotifyClientError() { 781 void CloudPolicyClient::NotifyClientError() {
782 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this)); 782 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this));
783 } 783 }
784 784
785 } // namespace policy 785 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/test/policy_testserver.py ('k') | components/policy/core/common/cloud/cloud_policy_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698