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

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

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use namespace alias Created 4 years, 8 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
Index: components/policy/core/common/cloud/cloud_policy_validator.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_validator.cc b/components/policy/core/common/cloud/cloud_policy_validator.cc
index ba1f986ed50bb7994b514b415eaf7b19192f2139..798cbac72f5aeea77f7d8a46e6e125e93e994a4b 100644
--- a/components/policy/core/common/cloud/cloud_policy_validator.cc
+++ b/components/policy/core/common/cloud/cloud_policy_validator.cc
@@ -150,7 +150,7 @@ void CloudPolicyValidatorBase::ValidateAgainstCurrentPolicy(
}
CloudPolicyValidatorBase::CloudPolicyValidatorBase(
- scoped_ptr<em::PolicyFetchResponse> policy_response,
+ std::unique_ptr<em::PolicyFetchResponse> policy_response,
google::protobuf::MessageLite* payload,
scoped_refptr<base::SequencedTaskRunner> background_task_runner)
: status_(VALIDATION_OK),
@@ -170,13 +170,13 @@ void CloudPolicyValidatorBase::PostValidationTask(
background_task_runner_->PostTask(
FROM_HERE,
base::Bind(&CloudPolicyValidatorBase::PerformValidation,
- base::Passed(scoped_ptr<CloudPolicyValidatorBase>(this)),
+ base::Passed(std::unique_ptr<CloudPolicyValidatorBase>(this)),
base::ThreadTaskRunnerHandle::Get(), completion_callback));
}
// static
void CloudPolicyValidatorBase::PerformValidation(
- scoped_ptr<CloudPolicyValidatorBase> self,
+ std::unique_ptr<CloudPolicyValidatorBase> self,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const base::Closure& completion_callback) {
// Run the validation activities on this thread.
@@ -192,7 +192,7 @@ void CloudPolicyValidatorBase::PerformValidation(
// static
void CloudPolicyValidatorBase::ReportCompletion(
- scoped_ptr<CloudPolicyValidatorBase> self,
+ std::unique_ptr<CloudPolicyValidatorBase> self,
const base::Closure& completion_callback) {
completion_callback.Run();
}

Powered by Google App Engine
This is Rietveld 408576698