Chromium Code Reviews| Index: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
| diff --git a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
| index 2fd3d3f74625a7ff65c66fd7f1dc518d52bc18c6..a6f2988e405bda531f8c7e4f4213dc2de5ee2767 100644 |
| --- a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
| +++ b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc |
| @@ -26,6 +26,7 @@ |
| #include "ash/common/wm_shell.h" |
| #include "ash/common/wm_window.h" |
| #include "ash/public/cpp/shell_window_ids.h" |
| +#include "base/metrics/histogram_macros.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "grit/ash_resources.h" |
| #include "grit/ash_strings.h" |
| @@ -202,14 +203,18 @@ class ImeButtonsView : public views::View, |
| // extensions. InputMethodManager::ShowKeyboardWithKeyset() will deal with |
| // the |keyset| string to generate the right input view url. |
| std::string keyset; |
| - if (sender == emoji_button_) |
| + if (sender == emoji_button_) { |
| keyset = "emoji"; |
| - else if (sender == voice_button_) |
| + UMA_HISTOGRAM_COUNTS("InputMethod.ImeMenu.EmojiButton", 1); |
| + } else if (sender == voice_button_) { |
| keyset = "voice"; |
| - else if (sender == handwriting_button_) |
| + UMA_HISTOGRAM_COUNTS("InputMethod.ImeMenu.VoiceButton", 1); |
| + } else if (sender == handwriting_button_) { |
| keyset = "hwt"; |
| - else |
| + UMA_HISTOGRAM_COUNTS("InputMethod.ImeMenu.HandwritingButton", 1); |
|
Alexei Svitkine (slow)
2017/01/03 15:47:22
UMA_HISTOGRAM_COUNTS allocates 50 buckets but you'
Azure Wei
2017/01/04 14:02:41
Thanks. I've updated these with enum histogram and
|
| + } else { |
| NOTREACHED(); |
| + } |
| ime_menu_tray_->ShowKeyboardWithKeyset(keyset); |
| } |