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

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

Issue 318143003: Make CUS interface more resilient by returning a copy of the data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/components_ui.cc
diff --git a/chrome/browser/ui/webui/components_ui.cc b/chrome/browser/ui/webui/components_ui.cc
index 43bc6cf3018c5a3448f54944b0596bcf3e16957a..e6207aea2248a6a694724a28ebe4ac6dfe06b63c 100644
--- a/chrome/browser/ui/webui/components_ui.cc
+++ b/chrome/browser/ui/webui/components_ui.cc
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/component_updater/component_updater_service.h"
@@ -168,7 +169,7 @@ 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 =
+ const base::WeakPtr<component_updater::CrxUpdateItem> item =
cus->GetComponentDetails(component_ids[j]);
if (item) {
base::DictionaryValue* component_entry = new base::DictionaryValue();

Powered by Google App Engine
This is Rietveld 408576698