| 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 d815653ffc42925125f9655647d4e06bad03325a..2b716f5d6953be2e09b6e36f308d77358615a2a7 100644
|
| --- a/chrome/browser/ui/webui/components_ui.cc
|
| +++ b/chrome/browser/ui/webui/components_ui.cc
|
| @@ -104,8 +104,9 @@
|
|
|
| void ComponentsDOMHandler::HandleRequestComponentsData(
|
| const base::ListValue* args) {
|
| + base::ListValue* list = ComponentsUI::LoadComponents();
|
| base::DictionaryValue result;
|
| - result.Set("components", ComponentsUI::LoadComponents());
|
| + result.Set("components", list);
|
| web_ui()->CallJavascriptFunctionUnsafe("returnComponentsData", result);
|
| }
|
|
|
| @@ -163,14 +164,14 @@
|
| }
|
|
|
| // static
|
| -std::unique_ptr<base::ListValue> ComponentsUI::LoadComponents() {
|
| +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.
|
| - auto component_list = base::MakeUnique<base::ListValue>();
|
| + base::ListValue* component_list = new base::ListValue();
|
| for (size_t j = 0; j < component_ids.size(); ++j) {
|
| update_client::CrxUpdateItem item;
|
| if (cus->GetComponentDetails(component_ids[j], &item)) {
|
|
|