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

Unified Diff: third_party/google_input_tools/src/chrome/os/statistics.js

Issue 899673003: Uprev Google Input Tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « third_party/google_input_tools/src/chrome/os/sounds.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/google_input_tools/src/chrome/os/statistics.js
diff --git a/third_party/google_input_tools/src/chrome/os/statistics.js b/third_party/google_input_tools/src/chrome/os/statistics.js
index 59d3761db7357b4ee1fcebcbb7c8b976872bea62..551f96ef474f4b8ebab69043683361df465c7f31 100644
--- a/third_party/google_input_tools/src/chrome/os/statistics.js
+++ b/third_party/google_input_tools/src/chrome/os/statistics.js
@@ -80,6 +80,24 @@ Statistics.prototype.autoCorrectLevel_ = 0;
/**
+ * Whether recording for physical keyboard specially.
+ *
+ * @private {boolean}
+ */
+Statistics.prototype.isPhysicalKeyboard_ = false;
+
+
+/**
+ * Sets whether recording for physical keyboard.
+ *
+ * @param {boolean} isPhysicalKeyboard .
+ */
+Statistics.prototype.setPhysicalKeyboard = function(isPhysicalKeyboard) {
+ this.isPhysicalKeyboard_ = isPhysicalKeyboard;
+};
+
+
+/**
* Sets the current input method id.
*
* @param {string} inputMethodId .
@@ -160,12 +178,15 @@ Statistics.prototype.recordCommit = function(
return;
}
+ // For latin transliteration, record the logs under the name with 'Pk' which
+ // means Physical Keyboard.
+ var name = this.isPhysicalKeyboard_ ?
+ 'InputMethod.PkCommit.' : 'InputMethod.Commit.';
+
var self = this;
var record = function(suffix) {
- self.recordEnum('InputMethod.Commit.Index' + suffix,
- targetIndex + 1, 20);
- self.recordEnum('InputMethod.Commit.Type' + suffix,
- commitType, CommitTypes.MAX);
+ self.recordEnum(name + 'Index' + suffix, targetIndex + 1, 20);
+ self.recordEnum(name + 'Type' + suffix, commitType, CommitTypes.MAX);
};
record('');
« no previous file with comments | « third_party/google_input_tools/src/chrome/os/sounds.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698