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

Unified Diff: chrome/browser/ui/webui/chromeos/drive_internals_ui.cc

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: No ListValue::SetDouble Created 3 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/ui/webui/chromeos/drive_internals_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
index 37156b8328e9f137c8926a4ac7b05c6aa5ee6b28..ac624b64236a66e987c00bfed5968b30f1e66ead 100644
--- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
@@ -352,7 +352,7 @@ void DriveInternalsWebUIHandler::OnGetAppList(
base::DictionaryValue app_list;
app_list.SetString("etag", parsed_app_list->etag());
- base::ListValue* items = new base::ListValue();
+ auto items = base::MakeUnique<base::ListValue>();
for (size_t i = 0; i < parsed_app_list->items().size(); ++i) {
const google_apis::AppResource* app = parsed_app_list->items()[i].get();
auto app_data = base::MakeUnique<base::DictionaryValue>();
@@ -363,7 +363,7 @@ void DriveInternalsWebUIHandler::OnGetAppList(
items->Append(std::move(app_data));
}
- app_list.Set("items", items);
+ app_list.Set("items", std::move(items));
web_ui()->CallJavascriptFunctionUnsafe("updateAppList", app_list);
}

Powered by Google App Engine
This is Rietveld 408576698