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

Unified Diff: chrome/browser/ui/webui/conflicts_handler.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 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/conflicts_handler.cc
diff --git a/chrome/browser/ui/webui/conflicts_handler.cc b/chrome/browser/ui/webui/conflicts_handler.cc
index 75c06bdebc937ab6e7474e47456dd36247566de1..b6bb36ecf4f0941c5d98f50f579087675b639333 100644
--- a/chrome/browser/ui/webui/conflicts_handler.cc
+++ b/chrome/browser/ui/webui/conflicts_handler.cc
@@ -41,9 +41,7 @@ void ConflictsHandler::HandleRequestModuleList(const base::ListValue* args) {
void ConflictsHandler::SendModuleList() {
auto* loaded_modules = EnumerateModulesModel::GetInstance();
- base::ListValue* list = loaded_modules->GetModuleList();
- base::DictionaryValue results;
- results.Set("moduleList", list);
+ std::unique_ptr<base::ListValue> list = loaded_modules->GetModuleList();
// Add the section title and the total count for bad modules found.
int confirmed_bad = loaded_modules->confirmed_bad_modules_detected();
@@ -59,6 +57,8 @@ void ConflictsHandler::SendModuleList() {
base::IntToString16(list->GetSize()),
base::IntToString16(confirmed_bad), base::IntToString16(suspected_bad));
}
+ base::DictionaryValue results;
+ results.Set("moduleList", std::move(list));
results.SetString("modulesTableTitle", table_title);
web_ui()->CallJavascriptFunctionUnsafe("returnModuleList", results);
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/metadata_database.cc ('k') | chrome/browser/win/enumerate_modules_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698