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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 2086763002: Don't use deprecated ListValue::Append(Value*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index ca5d12b0cbbd78a1a809faf658e715ed652092c2..4301948b27e9512faa4f77e6d5760160290344a8 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -379,8 +379,7 @@ void AppLauncherHandler::FillAppDictionary(base::DictionaryValue* dictionary) {
const Extension* extension = extension_service_->GetInstalledExtension(*it);
if (extension && extensions::ui_util::ShouldDisplayInNewTabPage(
extension, profile)) {
- base::DictionaryValue* app_info = GetAppInfo(extension);
- list->Append(app_info);
+ list->Append(GetAppInfo(extension));
}
}
@@ -401,14 +400,12 @@ void AppLauncherHandler::FillAppDictionary(base::DictionaryValue* dictionary) {
}
}
-base::DictionaryValue* AppLauncherHandler::GetAppInfo(
+std::unique_ptr<base::DictionaryValue> AppLauncherHandler::GetAppInfo(
const Extension* extension) {
- base::DictionaryValue* app_info = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> app_info(new base::DictionaryValue());
// CreateAppInfo can change the extension prefs.
base::AutoReset<bool> auto_reset(&ignore_changes_, true);
- CreateAppInfo(extension,
- extension_service_,
- app_info);
+ CreateAppInfo(extension, extension_service_, app_info.get());
return app_info;
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/browser/ui/webui/options/autofill_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698