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

Unified Diff: ui/file_manager/file_manager/common/js/importer_common.js

Issue 1045663002: Cancel scans when directory changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also, cancel scans when window closes...and add test coverage. Created 5 years, 9 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/common/js/importer_common.js
diff --git a/ui/file_manager/file_manager/common/js/importer_common.js b/ui/file_manager/file_manager/common/js/importer_common.js
index 47e300c417dbe9d58bfe176f2904e287e3528dda..05387d8fe6ab6986b416fca8c2f4883b5519d916 100644
--- a/ui/file_manager/file_manager/common/js/importer_common.js
+++ b/ui/file_manager/file_manager/common/js/importer_common.js
@@ -344,7 +344,7 @@ importer.getMachineId = function() {
if (id) {
return id;
}
- var id = importer.generateMachineId_();
+ var id = importer.generateId();
return storage.set(importer.Setting.MACHINE_ID, id)
.then(
function() {
@@ -377,11 +377,9 @@ importer.getDebugLogFilename = function(logId) {
};
/**
- * @return {number} A relatively unique six digit integer that is most likely
- * unique to this machine among a user's machines. Used only to segregate
- * log files on sync storage.
+ * @return {number} A relatively random six digit integer.
*/
-importer.generateMachineId_ = function() {
+importer.generateId = function() {
return Math.floor(Math.random() * 899999) + 100000;
};

Powered by Google App Engine
This is Rietveld 408576698