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

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

Issue 2260133002: Files: Extract VolumeInfo interface from volume_manager.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/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 48049465fc2db4f774ae48ba84d7093b058e1025..b003800df77303b3602d7a1a251797832fb80032 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager.js
@@ -7,6 +7,7 @@
* flush storage", or "mounted zip archive" etc.
*
* @constructor
+ * @implements {VolumeInfo}
* @struct
*
* @param {VolumeManagerCommon.VolumeType} volumeType The type of the volume.
@@ -29,7 +30,7 @@
* @param {boolean} configurable When true, then the volume can be configured.
* @param {VolumeManagerCommon.Source} source Source of the volume's data.
*/
-function VolumeInfo(
+function VolumeInfoImpl(
oka 2016/08/21 22:15:37 Why don't you extract VolumeInfoImpl into a separe
fukino 2016/08/22 05:32:48 I'll split it into a separate file after crbug.com
oka 2016/08/22 06:51:09 Acknowledged.
volumeType,
volumeId,
fileSystem,
@@ -90,7 +91,7 @@ function VolumeInfo(
this.source_ = source;
}
-VolumeInfo.prototype = /** @struct */ {
+VolumeInfoImpl.prototype = /** @struct */ {
/**
* @return {VolumeManagerCommon.VolumeType} Volume type.
*/
@@ -199,7 +200,7 @@ VolumeInfo.prototype = /** @struct */ {
* @param {function(*)=} opt_onFailure Failure callback.
* @return {!Promise.<!DirectoryEntry>}
*/
-VolumeInfo.prototype.resolveDisplayRoot = function(opt_onSuccess,
+VolumeInfoImpl.prototype.resolveDisplayRoot = function(opt_onSuccess,
opt_onFailure) {
if (!this.displayRootPromise_) {
// TODO(mtomasz): Do not add VolumeInfo which failed to resolve root, and
@@ -346,7 +347,7 @@ volumeManagerUtil.createVolumeInfo = function(volumeMetadata) {
error.name);
});
}
- return new VolumeInfo(
+ return new VolumeInfoImpl(
/** @type {VolumeManagerCommon.VolumeType} */
(volumeMetadata.volumeType),
volumeMetadata.volumeId,
@@ -374,7 +375,7 @@ volumeManagerUtil.createVolumeInfo = function(volumeMetadata) {
(error.stack || error));
volumeManagerUtil.reportMountError(volumeMetadata, error);
- return new VolumeInfo(
+ return new VolumeInfoImpl(
/** @type {VolumeManagerCommon.VolumeType} */
(volumeMetadata.volumeType),
volumeMetadata.volumeId,

Powered by Google App Engine
This is Rietveld 408576698