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

Unified Diff: components/policy/core/browser/configuration_policy_pref_store.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/browser/configuration_policy_pref_store.cc
diff --git a/components/policy/core/browser/configuration_policy_pref_store.cc b/components/policy/core/browser/configuration_policy_pref_store.cc
index 70fe24642199d140d5cf58831529cf8437e93588..6184dc92bf2f04e36d4674b72a8afc62f4d0c811 100644
--- a/components/policy/core/browser/configuration_policy_pref_store.cc
+++ b/components/policy/core/browser/configuration_policy_pref_store.cc
@@ -97,7 +97,7 @@ ConfigurationPolicyPrefStore::~ConfigurationPolicyPrefStore() {
}
void ConfigurationPolicyPrefStore::Refresh() {
- scoped_ptr<PrefValueMap> new_prefs(CreatePreferencesFromPolicies());
+ std::unique_ptr<PrefValueMap> new_prefs(CreatePreferencesFromPolicies());
std::vector<std::string> changed_prefs;
new_prefs->GetDifferingKeys(prefs_.get(), &changed_prefs);
prefs_.swap(new_prefs);
@@ -112,13 +112,13 @@ void ConfigurationPolicyPrefStore::Refresh() {
}
PrefValueMap* ConfigurationPolicyPrefStore::CreatePreferencesFromPolicies() {
- scoped_ptr<PrefValueMap> prefs(new PrefValueMap);
+ std::unique_ptr<PrefValueMap> prefs(new PrefValueMap);
PolicyMap filtered_policies;
filtered_policies.CopyFrom(policy_service_->GetPolicies(
PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())));
filtered_policies.FilterLevel(level_);
- scoped_ptr<PolicyErrorMap> errors(new PolicyErrorMap);
+ std::unique_ptr<PolicyErrorMap> errors(new PolicyErrorMap);
handler_list_->ApplyPolicySettings(filtered_policies,
prefs.get(),

Powered by Google App Engine
This is Rietveld 408576698