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

Unified Diff: chrome/browser/chromeos/external_metrics.h

Issue 6266011: chromeos: Simplify user action code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser
Patch Set: only insert user actions when metrics collection is started Created 9 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/chromeos/external_metrics.h
diff --git a/chrome/browser/chromeos/external_metrics.h b/chrome/browser/chromeos/external_metrics.h
index eac8c64d5d7b2f09167db69aa631db2a955ef87c..fb99563a832088289036be32584bcd5faf637f3f 100644
--- a/chrome/browser/chromeos/external_metrics.h
+++ b/chrome/browser/chromeos/external_metrics.h
@@ -26,7 +26,7 @@ class ExternalMetrics : public base::RefCountedThreadSafe<ExternalMetrics> {
friend class base::RefCountedThreadSafe<ExternalMetrics>;
public:
- ExternalMetrics() : test_recorder_(NULL) {}
+ ExternalMetrics();
// Begins the external data collection. This service is started and stopped
// by the chrome metrics service. Calls to RecordAction originate in the
@@ -44,13 +44,6 @@ class ExternalMetrics : public base::RefCountedThreadSafe<ExternalMetrics> {
~ExternalMetrics() {}
- // Registers a user action by associating the action name with a function
- // that records instances of that action.
- void DefineUserAction(const std::string& name, RecordFunctionType f);
-
- // Registers all user actions external to the browser.
- void InitializeUserActions();
-
// Passes an action event to the UMA service on the UI thread.
void RecordActionUI(std::string action_string);
@@ -78,6 +71,9 @@ class ExternalMetrics : public base::RefCountedThreadSafe<ExternalMetrics> {
// Maps histogram or action names to recorder structs.
base::hash_map<std::string, RecordFunctionType> action_recorders_;
+ // Set containing known user actions.
+ base::hash_set<std::string> valid_user_actions_;
+
// Used for testing only.
RecorderType test_recorder_;
FilePath test_path_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/external_metrics.cc » ('j') | chrome/browser/chromeos/external_metrics.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698