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: ui/file_manager/file_manager/background/js/mock_media_scanner.js

Issue 918713003: Files.app: Add analytics code to instrument cloud import flows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorg/rename metrics events. Fix a metrics loading bug. Created 5 years, 10 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
Index: ui/file_manager/file_manager/background/js/mock_media_scanner.js
diff --git a/ui/file_manager/file_manager/background/js/mock_media_scanner.js b/ui/file_manager/file_manager/background/js/mock_media_scanner.js
index 407c02f886273ed279fa0c4976f368ab1c35574c..20191507ff32d0853509951aafb04a63411d301d 100644
--- a/ui/file_manager/file_manager/background/js/mock_media_scanner.js
+++ b/ui/file_manager/file_manager/background/js/mock_media_scanner.js
@@ -115,6 +115,9 @@ function TestScanResult(fileEntries) {
/** @type {number} */
this.scanDuration = 100;
+ /** @type {number} */
+ this.duplicateFileCount = 0;
+
/** @type {function} */
this.resolveResult_;
@@ -144,16 +147,6 @@ TestScanResult.prototype.getFileEntries = function() {
};
/** @override */
-TestScanResult.prototype.getTotalBytes = function() {
- return this.totalBytes;
-};
-
-/** @override */
-TestScanResult.prototype.getScanDurationMs = function() {
- return this.scanDuration;
-};
-
-/** @override */
TestScanResult.prototype.finalize = function() {
return this.resolveResult_(this);
};
@@ -173,6 +166,16 @@ TestScanResult.prototype.isInvalidated = function() {
return false;
};
+/** @override */
+TestScanResult.prototype.getStatistics = function() {
+ return {
+ scanDuration: this.scanDuration,
+ newFileCount: this.fileEntries.length,
+ duplicateFileCount: this.duplicateFileCount,
+ sizeBytes: this.totalBytes
+ };
+};
+
/**
* @constructor
* @implements {importer.DirectoryWatcher}

Powered by Google App Engine
This is Rietveld 408576698