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

Unified Diff: ash/common/accelerators/accelerator_router.h

Issue 2683233008: Add "Search" key press/hold UMA metrics. (Closed)
Patch Set: use enum Created 3 years, 10 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 | « no previous file | ash/common/accelerators/accelerator_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_router.h
diff --git a/ash/common/accelerators/accelerator_router.h b/ash/common/accelerators/accelerator_router.h
index 048145f8f9fdbafe9b08315c16b0adad52fdd049..a849d5afa52d22e0911d32a8b1e91f364039baa3 100644
--- a/ash/common/accelerators/accelerator_router.h
+++ b/ash/common/accelerators/accelerator_router.h
@@ -7,6 +7,7 @@
#include "ash/ash_export.h"
#include "base/macros.h"
+#include "base/time/time.h"
namespace ui {
class Accelerator;
@@ -41,6 +42,14 @@ class ASH_EXPORT AcceleratorRouter {
const ui::KeyEvent& event,
const ui::Accelerator& accelerator);
+ // Records a histogram on how long the "Search" key is held when a user
+ // presses an accelerator that involes the "Search" key.
+ void RecordSearchKeyStats(const ui::Accelerator& accelerator);
+
+ enum SearchKeyState { RELEASED = 0, PRESSED, RECORDED };
+ SearchKeyState search_key_state_ = RELEASED;
+ base::TimeTicks search_key_pressed_timestamp_;
+
DISALLOW_COPY_AND_ASSIGN(AcceleratorRouter);
};
« no previous file with comments | « no previous file | ash/common/accelerators/accelerator_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698