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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_switch_recorder.cc

Issue 2891263002: chromeos: Remove some IME methods from ash::SystemTrayDelegate (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/input_method/input_method_switch_recorder.h"
6
7 #include "base/metrics/histogram_macros.h"
8
9 namespace {
10
11 chromeos::input_method::InputMethodSwitchRecorder*
12 g_input_method_switch_recorder = NULL;
13
14 enum SwitchBy {
15 // The values should not reordered or deleted and new entries should only be
16 // added at the end (otherwise it will cause problems interpreting logs)
17 SWITCH_BY_TRAY = 0,
18 SWITCH_BY_ACCELERATOR = 1,
19 NUM_SWITCH_BY = 2
20 };
21
22 } // namespace
23
24 namespace chromeos {
25 namespace input_method {
26
27 // static
28 InputMethodSwitchRecorder* InputMethodSwitchRecorder::Get() {
29 if (!g_input_method_switch_recorder)
30 g_input_method_switch_recorder = new InputMethodSwitchRecorder();
31 return g_input_method_switch_recorder;
32 }
33
34 InputMethodSwitchRecorder::InputMethodSwitchRecorder() {
35 }
36
37 InputMethodSwitchRecorder::~InputMethodSwitchRecorder() {
38 }
39
40 void InputMethodSwitchRecorder::RecordSwitch(bool by_tray_menu) {
41 UMA_HISTOGRAM_ENUMERATION(
42 "InputMethod.ImeSwitch",
43 by_tray_menu ? SWITCH_BY_TRAY : SWITCH_BY_ACCELERATOR, NUM_SWITCH_BY);
44 }
45
46 } // namespace input_method
47 } // namespace chromeos
48
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_switch_recorder.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698