| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| index dc2fdece34394575665044b27b4eea25786baba3..f4fbea1496a6099e7c72a156a881b0cf5aadcff2 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| @@ -175,6 +175,16 @@ Background = function() {
|
| * @private
|
| */
|
| this.focusRecoveryMap_ = new WeakMap();
|
| +
|
| + // Record a metric with the mode we're in on startup.
|
| + var useNext = localStorage['useNext'] !== 'false';
|
| + chrome.metricsPrivate.recordValue(
|
| + { metricName: 'Accessibility.CrosChromeVoxNext',
|
| + type: chrome.metricsPrivate.MetricTypeType.HISTOGRAM_LINEAR,
|
| + min: 1, // According to histogram.h, this should be 1 for enums.
|
| + max: 2, // Maximum should be exclusive.
|
| + buckets: 3 }, // Number of buckets: 0, 1 and overflowing 2.
|
| + useNext ? 1 : 0);
|
| };
|
|
|
| /**
|
| @@ -349,6 +359,14 @@ Background.prototype = {
|
| else
|
| useNext = localStorage['useNext'] !== 'true';
|
|
|
| + if (useNext) {
|
| + chrome.metricsPrivate.recordUserAction(
|
| + 'Accessibility.ChromeVox.ToggleNextOn');
|
| + } else {
|
| + chrome.metricsPrivate.recordUserAction(
|
| + 'Accessibility.ChromeVox.ToggleNextOff');
|
| + }
|
| +
|
| localStorage['useNext'] = useNext;
|
| if (useNext)
|
| this.setCurrentRangeToFocus_();
|
|
|