Commit 7d908936 authored by kenobi's avatar kenobi Committed by Commit bot

Files.app: Switch analytics to use the chrome version, not the app version, for tracking.

The files.app version in the manifest is not regularly updated.  We'll get more accurate version info by using the chrome major release version.

BUG=469258

Review URL: https://codereview.chromium.org/1035483004

Cr-Commit-Position: refs/heads/master@{#322106}
parent 4f3a803c
......@@ -50,7 +50,12 @@ metrics.getTracker = function() {
* @private
*/
metrics.createTracker_ = function() {
metrics.analytics_ = analytics.getService('Files app');
var chromeVersion = /Chrome\/([0-9]*)\.[0-9.]*/.exec(navigator.userAgent);
if (chromeVersion && chromeVersion[1]) {
metrics.analytics_ = analytics.getService('Files app', chromeVersion[1]);
} else {
metrics.analytics_ = analytics.getService('Files app', '0.0');
}
// Create a tracker, add a filter that only enables analytics when UMA is
// enabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment