summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 10:59:28 +0000
committerdgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 10:59:28 +0000
commit5ca728fd925b34561624c618ba72cb61beb16523 (patch)
tree673e00dc3ffabd279cea3fba882196d83a206f52
parent1dd8cc3c49db74aa5542a6e180cdeeeb895befca (diff)
downloadchromium_src-5ca728fd925b34561624c618ba72cb61beb16523.zip
chromium_src-5ca728fd925b34561624c618ba72cb61beb16523.tar.gz
chromium_src-5ca728fd925b34561624c618ba72cb61beb16523.tar.bz2
[filebrowser] Fix a bug in unmount handling.
We used to check the wrong sourceUrl instead of mountPath for unmount requests. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9969004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129826 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/file_manager/js/file_manager.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 09d3f52..0275f75 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -1538,7 +1538,7 @@ FileManager.prototype = {
var entry =
this.getRootEntry_(this.rootsList_.selectionModel.selectedIndex);
- this.unmountVolume_(entry.toURL());
+ this.unmountVolume_(entry);
return;
case 'format':
@@ -1964,7 +1964,7 @@ FileManager.prototype = {
eject.className = 'root-eject';
eject.addEventListener('click', function(event) {
event.stopPropagation();
- this.unmountVolume_(entry.toURL());
+ this.unmountVolume_(entry);
}.bind(this));
// Block other mouse handlers.
eject.addEventListener('mouseup', function(e) { e.stopPropagation() });
@@ -1995,9 +1995,9 @@ FileManager.prototype = {
* Unmounts device.
* @param {string} url The url of removable storage to unmount.
*/
- FileManager.prototype.unmountVolume_ = function(url) {
- this.unmountRequests_.push(url);
- chrome.fileBrowserPrivate.removeMount(url);
+ FileManager.prototype.unmountVolume_ = function(entry) {
+ this.unmountRequests_.push(entry.fullPath);
+ chrome.fileBrowserPrivate.removeMount(entry.toURL());
};
FileManager.prototype.styleGDataItem_ = function(entry, element) {
@@ -2734,7 +2734,7 @@ FileManager.prototype = {
if (event.eventType == 'unmount') {
// Unmount request finished - remove it.
- var index = self.unmountRequests_.indexOf(event.sourceUrl);
+ var index = self.unmountRequests_.indexOf(event.mountPath);
if (index != -1) {
self.unmountRequests_.splice(index, 1);
if (event.status != 'success')