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

Unified Diff: components/policy/core/common/cloud/cloud_policy_manager.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_manager.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_manager.cc b/components/policy/core/common/cloud/cloud_policy_manager.cc
index bfe95ea3e075be252f2353c2ed1baccf0e8fcfa5..4069e98cf6ffc491db23826dea10ddb1bebbd363 100644
--- a/components/policy/core/common/cloud/cloud_policy_manager.cc
+++ b/components/policy/core/common/cloud/cloud_policy_manager.cc
@@ -96,7 +96,7 @@ void CloudPolicyManager::OnComponentCloudPolicyUpdated() {
void CloudPolicyManager::CheckAndPublishPolicy() {
if (IsInitializationComplete(POLICY_DOMAIN_CHROME) &&
!waiting_for_policy_refresh_) {
- scoped_ptr<PolicyBundle> bundle(new PolicyBundle);
+ std::unique_ptr<PolicyBundle> bundle(new PolicyBundle);
GetChromePolicy(
&bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())));
if (component_policy_service_)
@@ -131,7 +131,7 @@ void CloudPolicyManager::CreateComponentCloudPolicyService(
// TODO(joaodasilva): Move the |file_task_runner_| to the blocking pool.
// Currently it's not possible because the ComponentCloudPolicyStore is
// NonThreadSafe and doesn't support getting calls from different threads.
- scoped_ptr<ResourceCache> resource_cache(
+ std::unique_ptr<ResourceCache> resource_cache(
new ResourceCache(policy_cache_path, file_task_runner_));
component_policy_service_.reset(new ComponentCloudPolicyService(
this, schema_registry(), core(), client, std::move(resource_cache),

Powered by Google App Engine
This is Rietveld 408576698