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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_tasks.js

Issue 130803008: Fix UMA recoding code for FileBrowser.ViewingFileType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/foreground/js/file_tasks.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
index 474e9d9813f80a4900dbf493245940dffc4f7008..dff222f382bbdfd7cae1be9e335fe06e2d7287dd 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
@@ -133,14 +133,14 @@ FileTasks.prototype.onTasks_ = function(tasks) {
* @type {Array.<string>}
* @private
*/
-FileTasks.knownExtensions_ = [
+FileTasks.UMA_INDEX_KNOWN_EXTENSIONS_ = Object.freeze([
'other', '.3ga', '.3gp', '.aac', '.alac', '.asf', '.avi', '.bmp', '.csv',
- '.doc', '.docx', '.flac', '.gif', '.ico', '.jpeg', '.jpg', '.log', '.m3u',
- '.m3u8', '.m4a', '.m4v', '.mid', '.mkv', '.mov', '.mp3', '.mp4', '.mpg',
- '.odf', '.odp', '.ods', '.odt', '.oga', '.ogg', '.ogv', '.pdf', '.png',
- '.ppt', '.pptx', '.ra', '.ram', '.rar', '.rm', '.rtf', '.wav', '.webm',
- '.webp', '.wma', '.wmv', '.xls', '.xlsx',
-];
+ '.doc', '.docx', '.flac', '.gif', '.jpeg', '.jpg', '.log', '.m3u', '.m3u8',
+ '.m4a', '.m4v', '.mid', '.mkv', '.mov', '.mp3', '.mp4', '.mpg', '.odf',
+ '.odp', '.ods', '.odt', '.oga', '.ogg', '.ogv', '.pdf', '.png', '.ppt',
+ '.pptx', '.ra', '.ram', '.rar', '.rm', '.rtf', '.wav', '.webm', '.webp',
+ '.wma', '.wmv', '.xls', '.xlsx',
+]);
/**
* The list of excutable file extensions.
@@ -172,11 +172,11 @@ FileTasks.recordViewingFileTypeUMA_ = function(entries) {
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
var extension = FileType.getExtension(entry).toLowerCase();
- if (FileTasks.knownExtensions_.indexOf(extension) < 0) {
+ if (FileTasks.UMA_INDEX_KNOWN_EXTENSIONS_.indexOf(extension) < 0) {
extension = 'other';
}
metrics.recordEnum(
- 'ViewingFileType', extension, FileTasks.knownExtensions_);
+ 'ViewingFileType', extension, FileTasks.UMA_INDEX_KNOWN_EXTENSIONS_);
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698