diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:25:27 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:25:27 +0000 |
commit | 196ff47a071e91358c2b9cdd95ddf5fcc3667c15 (patch) | |
tree | ee2a3f362f74bc9b6076ba8c8d84aca038913cb0 /chrome/browser/chromeos/external_metrics.h | |
parent | a68dfce63e3ea34605e423f9fa1f8787f3d213ff (diff) | |
download | chromium_src-196ff47a071e91358c2b9cdd95ddf5fcc3667c15.zip chromium_src-196ff47a071e91358c2b9cdd95ddf5fcc3667c15.tar.gz chromium_src-196ff47a071e91358c2b9cdd95ddf5fcc3667c15.tar.bz2 |
chromeos: Simplify user action code.
This makes us (almost) just forward through user actions that
we receive from other programs rather than having them listed
in Chrome's source. Note that new actions that aren't
present in Chrome still need to be added to
chrome/tools/extract_actions.py, which needs to be rerun to
generate new hashes.
I say "almost" above because metrics still need to be added
to external_metrics.cc due to http://crosbug.com/11095. Once
it's fixed, that requirement can be easily removed.
I also cleaned up some earlier additions that I made to
extract_actions.py and re-ran it to pick up missing actions.
BUG=chromium-os:10403
TEST=built it. checked that i see no errors in chrome's log when using the window manager to report a valid user action, but that i still see an error when running "metrics_client -u BogusMetric"
Review URL: http://codereview.chromium.org/6266011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/external_metrics.h')
-rw-r--r-- | chrome/browser/chromeos/external_metrics.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/external_metrics.h b/chrome/browser/chromeos/external_metrics.h index ccd58d3..cdb6046 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); @@ -85,6 +78,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_; |