Chromium Code Reviews| 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 43bc6cf3018c5a3448f54944b0596bcf3e16957a..39efd93ef3aa0dde1a5699212cdc4fc5861f1848 100644 |
| --- a/chrome/browser/ui/webui/components_ui.cc |
| +++ b/chrome/browser/ui/webui/components_ui.cc |
| @@ -168,18 +168,14 @@ base::ListValue* ComponentsUI::LoadComponents() { |
| // Construct DictionaryValues to return to UI. |
| base::ListValue* component_list = new base::ListValue(); |
| for (size_t j = 0; j < component_ids.size(); ++j) { |
| - const component_updater::CrxUpdateItem* item = |
| - cus->GetComponentDetails(component_ids[j]); |
| - if (item) { |
| + component_updater::CrxUpdateItem item; |
| + const bool res = cus->GetComponentDetails(component_ids[j], &item); |
|
James Hawkins
2014/06/11 17:50:39
What does 'res' mean? Can we get a better variabl
Sorin Jianu
2014/06/11 21:39:41
Done.
|
| + if (res) { |
| base::DictionaryValue* component_entry = new base::DictionaryValue(); |
| component_entry->SetString("id", component_ids[j]); |
| - component_entry->SetString("name", item->component.name); |
| - component_entry->SetString("version", |
| - item->component.version.GetString()); |
| - |
| - component_entry->SetString("status", |
| - ServiceStatusToString(item->status)); |
| - |
| + component_entry->SetString("name", item.component.name); |
| + component_entry->SetString("version", item.component.version.GetString()); |
| + component_entry->SetString("status", ServiceStatusToString(item.status)); |
| component_list->Append(component_entry); |
| } |
| } |