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

Unified Diff: chrome/browser/chromeos/drive/drive_file_system_proxy.cc

Issue 12258021: Fix filesystem API file_handlers to work for drive on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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/drive/drive_file_system_proxy.cc
diff --git a/chrome/browser/chromeos/drive/drive_file_system_proxy.cc b/chrome/browser/chromeos/drive/drive_file_system_proxy.cc
index 6a616508d9bc2d70940b190af5ccd2646b05cbe9..567cfa74eb16c6ead1cddcf9f606a9ac0971a6ea 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_proxy.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system_proxy.cc
@@ -179,6 +179,7 @@ void DriveFileSystemProxy::DetachFromFileSystem() {
void DriveFileSystemProxy::GetFileInfo(const FileSystemURL& file_url,
const FileSystemOperation::GetMetadataCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+
base::FilePath file_path;
if (!ValidateUrl(file_url, &file_path)) {
MessageLoopProxy::current()->PostTask(FROM_HERE,
@@ -697,8 +698,13 @@ bool DriveFileSystemProxy::ValidateUrl(
if (!url.is_valid() || url.type() != fileapi::kFileSystemTypeDrive) {
return false;
}
- *file_path = url.virtual_path();
- return true;
+
+ // |url.virtual_path()| cannot be used directly because in the case the url is
+ // isolated file system url, the virtual path will be formatted as
+ // <isolated_file_system_id>/<file_name> and thus unusable by drive file
+ // system.
+ *file_path = util::ExtractDrivePath(url.path());
+ return !file_path->empty();
}
void DriveFileSystemProxy::CallDriveFileSystemMethodOnUIThread(

Powered by Google App Engine
This is Rietveld 408576698