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

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

Issue 209313002: Modified components ui to address concern of all the time disabled check update button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review Created 6 years, 7 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.h
diff --git a/chrome/browser/ui/webui/components_ui.h b/chrome/browser/ui/webui/components_ui.h
index 2e98f211a2070adcbef2c7ba29035aa0626a19f1..0a234c99a7014aa21198b72d6ca4505fa362aa12 100644
--- a/chrome/browser/ui/webui/components_ui.h
+++ b/chrome/browser/ui/webui/components_ui.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_WEBUI_COMPONENTS_UI_H_
#define CHROME_BROWSER_UI_WEBUI_COMPONENTS_UI_H_
+#include "chrome/browser/component_updater/component_updater_service.h"
+#include "chrome/browser/component_updater/crx_update_item.h"
#include "content/public/browser/web_ui_controller.h"
#include "ui/base/layout.h"
@@ -16,16 +18,27 @@ namespace user_prefs {
class PrefRegistrySyncable;
}
-class ComponentsUI : public content::WebUIController {
+class ComponentsUI : public content::WebUIController,
+ public component_updater::ServiceObserver {
public:
explicit ComponentsUI(content::WebUI* web_ui);
+ ~ComponentsUI();
static void OnDemandUpdate(const std::string& component_id);
+ static base::ListValue* LoadComponents();
+
static base::RefCountedMemory* GetFaviconResourceBytes(
ui::ScaleFactor scale_factor);
+ // Override from ServiceObserver
+ virtual void OnEvent(Events event, const std::string& id) OVERRIDE;
+
private:
+ static void ComponentEventToString(Events event,
Sorin Jianu 2014/05/16 16:36:09 We could return a std::string just like the simila
Shrikant Kelkar 2014/05/16 18:58:56 Done.
+ std::string* converted_event);
Sorin Jianu 2014/05/16 16:36:09 We need to rename |converted_event| here as well t
Shrikant Kelkar 2014/05/16 18:58:56 Modified to return string.
+ static std::string ServiceStatusToString(
+ component_updater::CrxUpdateItem::Status status);
DISALLOW_COPY_AND_ASSIGN(ComponentsUI);
};

Powered by Google App Engine
This is Rietveld 408576698