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

Unified Diff: chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h

Issue 12039079: content: convert user action notification to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/user_actions/user_actions_ui_handler.h
diff --git a/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h b/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h
index de145ea6e5770272670a3e3063edcc2741639351..6ac5c143a05a3d620234ae3c3609abe252878eff 100644
--- a/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h
+++ b/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h
@@ -5,33 +5,26 @@
#ifndef CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_HANDLER_H_
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_ui_message_handler.h"
// UI Handler for chrome://user-actions/
// It listens to user action notifications and passes those notifications
// into the Javascript to update the page.
-class UserActionsUIHandler : public content::NotificationObserver,
+class UserActionsUIHandler : public content::UserMetricsObserver,
public content::WebUIMessageHandler {
public:
UserActionsUIHandler();
virtual ~UserActionsUIHandler();
- // NotificationObserver implementation:
- // Listens for user action notifications and passes the message to
- // observeUserAction in user_actions.js.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // content::UserMetricsObserver implementation:
+ virtual void UserAction(const std::string& action) OVERRIDE;
// WebUIMessageHandler implementation:
// Does nothing for now.
virtual void RegisterMessages() OVERRIDE;
private:
- content::NotificationRegistrar registrar_;
-
DISALLOW_COPY_AND_ASSIGN(UserActionsUIHandler);
};

Powered by Google App Engine
This is Rietveld 408576698