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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10231010: gdata: Apply correct mount label when mounting archives in GData (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: gdata: Apply correct mount label when mounting archives in GData Created 8 years, 8 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: chrome/browser/chromeos/extensions/file_browser_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index e2271d741f518c1ac5cc018893fcd45bdd28267f..4a50e67738b8e0f39e1c381fa94690b6b056173e 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -945,6 +945,9 @@ bool AddMountFunction::RunImpl() {
return false;
}
+ // Set default return source path to the input file_url
+ result_.reset(Value::CreateStringValue(file_url));
+
#if defined(OS_CHROMEOS)
chromeos::MountType mount_type =
DiskMountManager::MountTypeFromString(mount_type_str);
@@ -1048,9 +1051,11 @@ void AddMountFunction::OnMountedStateSet(const std::string& mount_type,
DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance();
// MountPath() takes a std::string.
disk_mount_manager->MountPath(file_path.AsUTF8Unsafe(),
- FilePath(file_name).Extension(),
+ FilePath(file_name).Extension(), file_name,
DiskMountManager::MountTypeFromString(
mount_type));
+ // Pass back the actual source path of the mount point.
tbarzic 2012/04/27 05:44:21 this seems a bit racy. What if mount completed eve
hshi 2012/04/27 18:48:56 Done.
+ result_.reset(Value::CreateStringValue(file_path.value()));
SendResponse(true);
#endif // defined(OS_CHROMEOS)
}

Powered by Google App Engine
This is Rietveld 408576698