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

Unified Diff: chrome/browser/extensions/extension_web_ui.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
Index: chrome/browser/extensions/extension_web_ui.cc
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index 1c9abcd7725f228a608bb746ecee0a043185ae14..a562789d5b26db5a107f06938589af36cf231543 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -66,7 +66,8 @@ void InitializeOverridesList(base::ListValue* list) {
base::ListValue migrated;
std::set<std::string> seen_entries;
for (base::Value* val : *list) {
- scoped_ptr<base::DictionaryValue> new_dict(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> new_dict(
+ new base::DictionaryValue());
std::string entry_name;
base::DictionaryValue* existing_dict = nullptr;
if (val->GetAsDictionary(&existing_dict)) {
@@ -108,7 +109,7 @@ void AddOverridesToList(base::ListValue* list,
}
}
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString(kEntry, override);
dict->SetBoolean(kActive, true);
// Add the entry to the front of the list.
@@ -127,7 +128,8 @@ void ValidateOverridesList(const extensions::ExtensionSet* all_extensions,
NOTREACHED();
continue;
}
- scoped_ptr<base::DictionaryValue> new_dict(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> new_dict(
+ new base::DictionaryValue());
new_dict->Swap(dict);
GURL override_url(entry);
if (!override_url.is_valid())
@@ -483,9 +485,9 @@ void ExtensionWebUI::InitializeChromeURLOverrides(Profile* profile) {
// static
void ExtensionWebUI::ValidateChromeURLOverrides(Profile* profile) {
- scoped_ptr<extensions::ExtensionSet> all_extensions =
- extensions::ExtensionRegistry::Get(profile)->
- GenerateInstalledExtensionsSet();
+ std::unique_ptr<extensions::ExtensionSet> all_extensions =
+ extensions::ExtensionRegistry::Get(profile)
+ ->GenerateInstalledExtensionsSet();
ForEachOverrideList(profile,
base::Bind(&ValidateOverridesList, all_extensions.get()));
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.h ('k') | chrome/browser/extensions/extension_web_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698