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

Unified Diff: chrome/browser/extensions/policy_handlers.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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
« no previous file with comments | « chrome/browser/extensions/policy_handlers.h ('k') | chrome/browser/extensions/policy_handlers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/policy_handlers.cc
diff --git a/chrome/browser/extensions/policy_handlers.cc b/chrome/browser/extensions/policy_handlers.cc
index 49f6547d37e0766262519a6a8ebb0931c1a3871f..185bdd8aa861af5febfd62cabd25b4dd2d040e3e 100644
--- a/chrome/browser/extensions/policy_handlers.cc
+++ b/chrome/browser/extensions/policy_handlers.cc
@@ -43,7 +43,7 @@ bool ExtensionListPolicyHandler::CheckPolicySettings(
void ExtensionListPolicyHandler::ApplyPolicySettings(
const policy::PolicyMap& policies,
PrefValueMap* prefs) {
- scoped_ptr<base::ListValue> list;
+ std::unique_ptr<base::ListValue> list;
policy::PolicyErrorMap errors;
if (CheckAndGetList(policies, &errors, &list) && list)
prefs->SetValue(pref_path(), std::move(list));
@@ -56,7 +56,7 @@ const char* ExtensionListPolicyHandler::pref_path() const {
bool ExtensionListPolicyHandler::CheckAndGetList(
const policy::PolicyMap& policies,
policy::PolicyErrorMap* errors,
- scoped_ptr<base::ListValue>* extension_ids) {
+ std::unique_ptr<base::ListValue>* extension_ids) {
if (extension_ids)
extension_ids->reset();
@@ -74,7 +74,7 @@ bool ExtensionListPolicyHandler::CheckAndGetList(
}
// Filter the list, rejecting any invalid extension IDs.
- scoped_ptr<base::ListValue> filtered_list(new base::ListValue());
+ std::unique_ptr<base::ListValue> filtered_list(new base::ListValue());
for (base::ListValue::const_iterator entry(list_value->begin());
entry != list_value->end(); ++entry) {
std::string id;
@@ -121,7 +121,7 @@ void ExtensionInstallForcelistPolicyHandler::ApplyPolicySettings(
const policy::PolicyMap& policies,
PrefValueMap* prefs) {
const base::Value* value = NULL;
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
if (CheckAndGetValue(policies, NULL, &value) &&
value &&
ParseList(value, dict.get(), NULL)) {
@@ -266,7 +266,7 @@ ExtensionSettingsPolicyHandler::~ExtensionSettingsPolicyHandler() {
bool ExtensionSettingsPolicyHandler::CheckPolicySettings(
const policy::PolicyMap& policies,
policy::PolicyErrorMap* errors) {
- scoped_ptr<base::Value> policy_value;
+ std::unique_ptr<base::Value> policy_value;
if (!CheckAndGetValue(policies, errors, &policy_value))
return false;
if (!policy_value)
@@ -320,7 +320,7 @@ bool ExtensionSettingsPolicyHandler::CheckPolicySettings(
void ExtensionSettingsPolicyHandler::ApplyPolicySettings(
const policy::PolicyMap& policies,
PrefValueMap* prefs) {
- scoped_ptr<base::Value> policy_value;
+ std::unique_ptr<base::Value> policy_value;
if (!CheckAndGetValue(policies, NULL, &policy_value) || !policy_value)
return;
prefs->SetValue(pref_names::kExtensionManagement, std::move(policy_value));
« no previous file with comments | « chrome/browser/extensions/policy_handlers.h ('k') | chrome/browser/extensions/policy_handlers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698