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

Unified Diff: content/public/browser/user_metrics.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
« no previous file with comments | « content/public/browser/notification_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/user_metrics.h
diff --git a/content/public/browser/user_metrics.h b/content/public/browser/user_metrics.h
index d1f39bfb63d9cb20afd9497b471f08b0b70e720c..931f78b37cca5d25b45d0752d8ec6ce648b9f817 100644
--- a/content/public/browser/user_metrics.h
+++ b/content/public/browser/user_metrics.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/threading/non_thread_safe.h"
#include "content/common/content_export.h"
namespace content {
@@ -50,6 +51,21 @@ CONTENT_EXPORT void RecordAction(const UserMetricsAction& action);
// chrome/tools/extract_actions.py.
CONTENT_EXPORT void RecordComputedAction(const std::string& action);
+class UserMetricsObserver : public base::NonThreadSafe {
+ public:
+ // Called when the user does a gesture resulting in a noteworthy action
+ // taking place.
+ virtual void UserAction(const std::string& action);
jam 2013/01/29 23:53:25 since this is just one method on the interface, a
+
+ protected:
+ // Constructor and destructor automatically handle registration
+ // and deregistration of the observer.
+ UserMetricsObserver();
+ virtual ~UserMetricsObserver();
+
+ DISALLOW_COPY_AND_ASSIGN(UserMetricsObserver);
+};
+
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_USER_METRICS_H_
« no previous file with comments | « content/public/browser/notification_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698