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

Unified Diff: chrome/browser/ui/webui/options/clear_browser_data_handler.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/options/clear_browser_data_handler.cc
diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
index fb1914e444c150b25cbcb614bfa9fa0bcc13514c..527531ccb060338e0ac4dbaae42f8c1460d0d66a 100644
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
@@ -199,7 +199,7 @@ void ClearBrowserDataHandler::GetLocalizedValues(
IDS_CLEAR_BROWSING_DATA_HISTORY_NOTICE,
base::ASCIIToUTF16(kMyActivityUrlInDialog)));
- base::ListValue* time_list = new base::ListValue;
+ auto time_list = base::MakeUnique<base::ListValue>();
for (int i = 0; i < 5; i++) {
base::string16 label_string;
switch (i) {
@@ -224,7 +224,7 @@ void ClearBrowserDataHandler::GetLocalizedValues(
option->AppendString(label_string);
time_list->Append(std::move(option));
}
- localized_strings->Set("clearBrowserDataTimeList", time_list);
+ localized_strings->Set("clearBrowserDataTimeList", std::move(time_list));
localized_strings->SetBoolean("showDeleteBrowsingHistoryCheckboxes",
!Profile::FromWebUI(web_ui())->IsSupervised());
}
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc ('k') | chrome/browser/ui/webui/options/core_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698