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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership Created 4 years, 6 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/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 97bd95c0bbb04c32745d0b65cc8ea151747cf359..990daf5487d587a0cd3dbdabe0bc8aa3914e6e2c 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -334,7 +334,7 @@ bool HostedAppHasPermission(const extensions::Extension& extension,
// the web extent of a hosted |app|.
void AddExceptionForHostedApp(const std::string& url_pattern,
const extensions::Extension& app, base::ListValue* exceptions) {
- base::DictionaryValue* exception = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> exception(new base::DictionaryValue());
std::string setting_string =
content_settings::ContentSettingToString(CONTENT_SETTING_ALLOW);
@@ -346,7 +346,7 @@ void AddExceptionForHostedApp(const std::string& url_pattern,
exception->SetString(site_settings::kSource, "HostedApp");
exception->SetString(kAppName, app.name());
exception->SetString(kAppId, app.id());
- exceptions->Append(exception);
+ exceptions->Append(std::move(exception));
}
// Asks the |profile| for hosted apps which have the |permission| set, and

Powered by Google App Engine
This is Rietveld 408576698