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

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

Issue 12717014: Launch packaged app with files on Drive on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/external_filesystem_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b3286af15160b414d7b239227e835adcf2e1ef7d..282315f1c50c6eb09ca46f044494d2abdba8eb73 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_proxy.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system_proxy.cc
@@ -693,11 +693,17 @@ DriveFileSystemProxy::~DriveFileSystemProxy() {
bool DriveFileSystemProxy::ValidateUrl(
const FileSystemURL& url, base::FilePath* file_path) {
// what platform you're on.
- if (!url.is_valid() || url.type() != fileapi::kFileSystemTypeDrive) {
+ 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.
+ // TODO(kinaba): fix other uses of virtual_path() as in
+ // https://codereview.chromium.org/12483010/
+ *file_path = util::ExtractDrivePath(url.path());
+ return !file_path->empty();
}
void DriveFileSystemProxy::CallDriveFileSystemMethodOnUIThread(
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/external_filesystem_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698