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. |
* |