| Index: chrome/browser/ui/webui/components_ui.cc
|
| diff --git a/chrome/browser/ui/webui/components_ui.cc b/chrome/browser/ui/webui/components_ui.cc
|
| index 2b716f5d6953be2e09b6e36f308d77358615a2a7..d815653ffc42925125f9655647d4e06bad03325a 100644
|
| --- a/chrome/browser/ui/webui/components_ui.cc
|
| +++ b/chrome/browser/ui/webui/components_ui.cc
|
| @@ -104,9 +104,8 @@ void ComponentsDOMHandler::RegisterMessages() {
|
|
|
| void ComponentsDOMHandler::HandleRequestComponentsData(
|
| const base::ListValue* args) {
|
| - base::ListValue* list = ComponentsUI::LoadComponents();
|
| base::DictionaryValue result;
|
| - result.Set("components", list);
|
| + result.Set("components", ComponentsUI::LoadComponents());
|
| web_ui()->CallJavascriptFunctionUnsafe("returnComponentsData", result);
|
| }
|
|
|
| @@ -164,14 +163,14 @@ void ComponentsUI::OnDemandUpdate(const std::string& component_id) {
|
| }
|
|
|
| // static
|
| -base::ListValue* ComponentsUI::LoadComponents() {
|
| +std::unique_ptr<base::ListValue> ComponentsUI::LoadComponents() {
|
| component_updater::ComponentUpdateService* cus =
|
| g_browser_process->component_updater();
|
| std::vector<std::string> component_ids;
|
| component_ids = cus->GetComponentIDs();
|
|
|
| // Construct DictionaryValues to return to UI.
|
| - base::ListValue* component_list = new base::ListValue();
|
| + auto component_list = base::MakeUnique<base::ListValue>();
|
| for (size_t j = 0; j < component_ids.size(); ++j) {
|
| update_client::CrxUpdateItem item;
|
| if (cus->GetComponentDetails(component_ids[j], &item)) {
|
|
|