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

Unified Diff: ui/file_manager/file_manager/background/js/volume_manager.js

Issue 681693003: Added debugMe method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added more debug information of VolumeManager. Created 6 years, 2 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 | ui/file_manager/file_manager/common/js/async_util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/volume_manager.js
diff --git a/ui/file_manager/file_manager/background/js/volume_manager.js b/ui/file_manager/file_manager/background/js/volume_manager.js
index 41a0c52ed7be60ab1d352fcc7150c34cf57aee72..9e3f2aa35858077f0d35b45f0ee2d6aa27dfb91d 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager.js
@@ -518,6 +518,16 @@ VolumeManager.getInstanceQueue_ = new AsyncUtil.Queue();
VolumeManager.instance_ = null;
/**
+ * Returns instance of VolumeManager for debug purpose.
+ * This method returns VolumeManager.instance_ which may not be initialized.
+ *
+ * @return {VolumeManager} Volume manager.
+ */
+VolumeManager.getInstanceForDebug = function() {
+ return VolumeManager.instance_;
+};
+
+/**
* @type {Promise}
* @private
*/
@@ -871,6 +881,16 @@ VolumeManager.prototype.invokeRequestCallbacks_ = function(
};
/**
+ * Returns current state of VolumeManager.
+ * @return {string} Current state of VolumeManager.
+ */
+VolumeManager.prototype.toString = function() {
+ return 'VolumeManager\n' +
+ '- MountQueue_:\n' +
+ ' ' + this.mountQueue_.toString().replace(/\n/g, '\n ');
mtomasz 2014/10/28 06:09:03 nit: What's the purpose of this regular expression
yawano 2014/10/28 06:11:50 This is for indenting with two spaces. e.g. A\n
+};
+
+/**
* Location information which shows where the path points in FileManager's
* file system.
*
« no previous file with comments | « no previous file | ui/file_manager/file_manager/common/js/async_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698