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

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_store_base.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/user_cloud_policy_store_base.cc
diff --git a/components/policy/core/common/cloud/user_cloud_policy_store_base.cc b/components/policy/core/common/cloud/user_cloud_policy_store_base.cc
index 9384eeec23437f5fbb3cb8b394c2c2c755dc50d7..5b83a08863d128a1388525a90bfbc49d2c16d3fa 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_store_base.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_store_base.cc
@@ -26,8 +26,9 @@ UserCloudPolicyStoreBase::UserCloudPolicyStoreBase(
UserCloudPolicyStoreBase::~UserCloudPolicyStoreBase() {
}
-scoped_ptr<UserCloudPolicyValidator> UserCloudPolicyStoreBase::CreateValidator(
- scoped_ptr<enterprise_management::PolicyFetchResponse> policy,
+std::unique_ptr<UserCloudPolicyValidator>
+UserCloudPolicyStoreBase::CreateValidator(
+ std::unique_ptr<enterprise_management::PolicyFetchResponse> policy,
CloudPolicyValidatorBase::ValidateTimestampOption timestamp_option) {
// Configure the validator.
UserCloudPolicyValidator* validator = UserCloudPolicyValidator::Create(
@@ -38,12 +39,12 @@ scoped_ptr<UserCloudPolicyValidator> UserCloudPolicyStoreBase::CreateValidator(
timestamp_option,
CloudPolicyValidatorBase::DM_TOKEN_REQUIRED);
validator->ValidatePayload();
- return scoped_ptr<UserCloudPolicyValidator>(validator);
+ return std::unique_ptr<UserCloudPolicyValidator>(validator);
}
void UserCloudPolicyStoreBase::InstallPolicy(
- scoped_ptr<enterprise_management::PolicyData> policy_data,
- scoped_ptr<enterprise_management::CloudPolicySettings> payload) {
+ std::unique_ptr<enterprise_management::PolicyData> policy_data,
+ std::unique_ptr<enterprise_management::CloudPolicySettings> payload) {
// Decode the payload.
policy_map_.Clear();
DecodePolicy(*payload, external_data_manager(), &policy_map_);

Powered by Google App Engine
This is Rietveld 408576698