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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.h

Issue 561223002: Updates the histograms for IMF and IMEs according to the new design. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: chrome/browser/chromeos/input_method/input_method_manager_impl.h
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.h b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
index 1aa0123660229e22fd2ff9080b16502a0ed28ccf..a1350be809de1c77985ee7e05d96818ea0e07dab 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.h
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
@@ -222,6 +222,9 @@ class InputMethodManagerImpl : public InputMethodManager,
// If state is active, active input method is updated.
void ReconfigureIMFramework(StateImpl* state);
+ // Record input method usage histograms.
+ void RecordInputMethodUsage(std::string input_method_id);
+
scoped_ptr<InputMethodDelegate> delegate_;
// The current UI session status.
@@ -256,6 +259,18 @@ class InputMethodManagerImpl : public InputMethodManager,
typedef std::map<std::string, InputMethodEngineInterface*> EngineMap;
EngineMap engine_map_;
+ // The map from input method id to the input method stat id.
+ // The stat id has the format: <category#><first char after prefix><index>
+ // For example, Chinese Simplified Pinyin IME has the stat id:
+ // 2,'p',1 -> 211201
+ // 2 means it in INPUT_METHOD_CATEGORY_ZH;
+ // 112 means the first char after prefix is 'p' of 'pinyin';
+ // 01 means it's the second pinyin as the first pinyin is for Traditional
+ // Chinese Pinyin IME. Note "zh-hant-t-i0-pinyin" < "zh-t-i0-pinyin".
+ std::map<std::string, int> stat_id_map_;
+
+ base::HistogramBase* stat_id_histogram_;
+
DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698