Index: chrome/browser/resources/file_manager/js/file_manager.js |
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js |
index 136978c48faa6bdf9309133dc9a8d694c222794e..909d888895ed7c47e25944089684afef25cb8aa8 100644 |
--- a/chrome/browser/resources/file_manager/js/file_manager.js |
+++ b/chrome/browser/resources/file_manager/js/file_manager.js |
@@ -694,7 +694,8 @@ FileManager.prototype = { |
return; |
metrics.startInterval('Load.GData'); |
- chrome.fileBrowserPrivate.addMount('', 'gdata', {}); |
+ chrome.fileBrowserPrivate.addMount('', 'gdata', {}, |
+ function(sourcePath) {}); |
// This timer could fire before the mount succeeds. We will silently |
// replace the error message with the correct directory contents. |
@@ -2550,7 +2551,7 @@ FileManager.prototype = { |
this.gdataMounted_ = true; |
this.gdataMountInfo_ = { |
'mountPath': event.mountPath, |
- 'sourceUrl': event.sourceUrl, |
+ 'sourcePath': event.sourcePath, |
'mountType': event.mountType, |
'mountCondition': event.status |
}; |
@@ -2584,7 +2585,7 @@ FileManager.prototype = { |
if (event.eventType == 'mount') { |
// Mount request finished - remove it. |
// Currently we only request mounts for archive files. |
- var index = self.mountRequests_.indexOf(event.sourceUrl); |
+ var index = self.mountRequests_.indexOf(event.sourcePath); |
if (index != -1) { |
self.mountRequests_.splice(index, 1); |
if (event.status == 'success') { |
@@ -2592,7 +2593,7 @@ FileManager.prototype = { |
changeDirectoryTo = event.mountPath; |
} else { |
// Request initiated from this tab failed, report the error. |
- var fileName = event.sourceUrl.split('/').pop(); |
+ var fileName = event.sourcePath.split('/').pop(); |
self.alert.show( |
strf('ARCHIVE_MOUNT_FAILED', fileName, event.status)); |
} |
@@ -2621,7 +2622,7 @@ FileManager.prototype = { |
return; |
} |
// Current directory just unmounted. Move to the 'Downloads'. |
- changeDirectoryTo = this.directoryModel_.getDefaultDirectory(); |
+ changeDirectoryTo = self.directoryModel_.getDefaultDirectory(); |
} |
} |
@@ -2657,8 +2658,10 @@ FileManager.prototype = { |
// Url in MountCompleted event won't be escaped, so let's make sure |
// we don't use escaped one in mountRequests_. |
var unescapedUrl = unescape(urls[index]); |
- self.mountRequests_.push(unescapedUrl); |
- chrome.fileBrowserPrivate.addMount(unescapedUrl, 'file', {}); |
+ chrome.fileBrowserPrivate.addMount(unescapedUrl, 'file', {}, |
+ function(sourcePath) { |
+ self.mountRequests_.push(sourcePath); |
+ }); |
} |
}); |
} else if (id == 'format-device') { |