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

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

Issue 8491038: Cleanup FileBrowser.Create.* UMA events (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 | chrome/browser/resources/file_manager/js/metrics.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 59b042f05ae28c0e5b1a2fe5ea7c010ae18f3b8d..41fd6f3c47a007ec15af898b2d2df861eb3554ae 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -56,7 +56,12 @@ function FileManager(dialogDom, filesystem, rootEntries) {
this.document_ = dialogDom.ownerDocument;
this.dialogType_ = this.params_.type || FileManager.DialogType.FULL_PAGE;
- metrics.recordAction('Create.' + this.dialogType_);
+ metrics.recordEnum('Create', this.dialogType_,
+ [FileManager.DialogType.SELECT_FOLDER,
+ FileManager.DialogType.SELECT_SAVEAS_FILE,
+ FileManager.DialogType.SELECT_OPEN_FILE,
+ FileManager.DialogType.SELECT_OPEN_MULTI_FILE,
+ FileManager.DialogType.FULL_PAGE]);
this.initDialogs_();
@@ -2927,13 +2932,19 @@ FileManager.prototype = {
var self = this;
var reader;
+ function rescanDone() {
+ metrics.recordTime('ScanDirectory');
+ if (self.currentDirEntry_.fullPath == DOWNLOADS_DIRECTORY)
+ metrics.reportCount("DownloadsCount", self.dataModel_.length);
+ if (opt_callback)
+ opt_callback();
+ }
+
metrics.startInterval('ScanDirectory');
function onReadSome(entries) {
if (entries.length == 0) {
- metrics.recordTime('ScanDirectory');
- if (opt_callback)
- opt_callback();
+ rescanDone();
return;
}
@@ -2982,9 +2993,7 @@ FileManager.prototype = {
spliceArgs.unshift(0, 0); // index, deleteCount
self.dataModel_.splice.apply(self.dataModel_, spliceArgs);
- metrics.recordTime('ScanDirectory');
- if (opt_callback)
- opt_callback();
+ rescanDone();
};
FileManager.prototype.findListItem_ = function(event) {
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/metrics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698