Chromium Code Reviews| 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..08c7c80cd0adc1e846be7705bdcf2a75ef40038d 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); |
| + |
| + bool search_key_pressed_ = false; |
| + bool search_key_pressed_recorded_ = false; |
|
oshima
2017/02/14 05:10:57
instead of having two variable, can you use state
|
| + base::TimeTicks search_key_pressed_timestamp_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AcceleratorRouter); |
| }; |