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

Unified Diff: components/policy/core/common/cloud/cloud_policy_client.cc

Issue 514143002: Manual fixups in components/policy for scoped_refptr operator T* removal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/policy/core/common/cloud/user_cloud_policy_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/cloud/cloud_policy_client.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_client.cc b/components/policy/core/common/cloud/cloud_policy_client.cc
index 3014fd7f1585755d8825c7c6ad01341d57aec0e5..8860963641c285ffaefecb8ef9dfc9944f1ebdac 100644
--- a/components/policy/core/common/cloud/cloud_policy_client.cc
+++ b/components/policy/core/common/cloud/cloud_policy_client.cc
@@ -108,9 +108,11 @@ void CloudPolicyClient::Register(em::DeviceRegisterRequest::Type type,
client_id_ = client_id;
}
+ // TODO(dcheng): Potentially sketchy. This gets passed to
+ // DeviceManagementRequestJobImpl, which only keeps a raw pointer to it.
bartfab (slow) 2014/08/29 08:49:03 The job is owned by |this| and |this| will go away
dcheng 2014/08/29 09:08:36 Done.
request_job_.reset(
service_->CreateJob(DeviceManagementRequestJob::TYPE_REGISTRATION,
- GetRequestContext()));
+ GetRequestContext().get()));
request_job_->SetOAuthToken(auth_token);
request_job_->SetClientID(client_id_);
@@ -150,7 +152,7 @@ void CloudPolicyClient::FetchPolicy() {
request_job_.reset(
service_->CreateJob(DeviceManagementRequestJob::TYPE_POLICY_FETCH,
- GetRequestContext()));
+ GetRequestContext().get()));
request_job_->SetDMToken(dm_token_);
request_job_->SetClientID(client_id_);
request_job_->SetUserAffiliation(user_affiliation_);
@@ -227,9 +229,9 @@ void CloudPolicyClient::FetchRobotAuthCodes(const std::string& auth_token) {
CHECK(is_registered());
DCHECK(!auth_token.empty());
- request_job_.reset(service_->CreateJob(
- DeviceManagementRequestJob::TYPE_API_AUTH_CODE_FETCH,
- GetRequestContext()));
+ request_job_.reset(
+ service_->CreateJob(DeviceManagementRequestJob::TYPE_API_AUTH_CODE_FETCH,
+ GetRequestContext().get()));
// The credentials of a domain user are needed in order to mint a new OAuth2
// authorization token for the robot account.
request_job_->SetOAuthToken(auth_token);
@@ -251,7 +253,7 @@ void CloudPolicyClient::Unregister() {
DCHECK(service_);
request_job_.reset(
service_->CreateJob(DeviceManagementRequestJob::TYPE_UNREGISTRATION,
- GetRequestContext()));
+ GetRequestContext().get()));
request_job_->SetDMToken(dm_token_);
request_job_->SetClientID(client_id_);
request_job_->GetRequest()->mutable_unregister_request();
@@ -265,7 +267,7 @@ void CloudPolicyClient::UploadCertificate(
CHECK(is_registered());
request_job_.reset(
service_->CreateJob(DeviceManagementRequestJob::TYPE_UPLOAD_CERTIFICATE,
- GetRequestContext()));
+ GetRequestContext().get()));
request_job_->SetDMToken(dm_token_);
request_job_->SetClientID(client_id_);
« no previous file with comments | « no previous file | components/policy/core/common/cloud/user_cloud_policy_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698