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

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

Issue 10536065: Fix file handler executer setting wrong cache path permissions on drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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/gdata/gdata_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_handler_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_handler_util.cc b/chrome/browser/chromeos/extensions/file_handler_util.cc
index e56facd66c29c413a1a9c231cecbc6a80f96bad9..08db70e8071fe9277c7b2c216a62ad115924204a 100644
--- a/chrome/browser/chromeos/extensions/file_handler_util.cc
+++ b/chrome/browser/chromeos/extensions/file_handler_util.cc
@@ -465,8 +465,7 @@ class FileTaskExecutor::ExecuteTasksFileSystemCallbackDispatcher {
GURL base_url = fileapi::GetFileSystemRootURI(target_origin_url,
fileapi::kFileSystemTypeExternal);
file->target_file_url = GURL(base_url.spec() + virtual_path.value());
- FilePath root(FILE_PATH_LITERAL("/"));
- file->virtual_path = root.Append(virtual_path);
+ file->virtual_path = virtual_path;
file->is_directory = file_info.is_directory;
file->absolute_path = final_file_path;
return true;
@@ -624,7 +623,9 @@ void FileTaskExecutor::SetupPermissionsAndDispatchEvent(
files_urls->Append(file_def);
file_def->SetString("fileSystemName", file_system_name);
file_def->SetString("fileSystemRoot", file_system_root.spec());
- file_def->SetString("fileFullPath", iter->virtual_path.value());
+ FilePath root(FILE_PATH_LITERAL("/"));
+ FilePath full_path = root.Append(iter->virtual_path);
+ file_def->SetString("fileFullPath", full_path.value());
file_def->SetBoolean("fileIsDirectory", iter->is_directory);
}
// Get tab id.
@@ -665,7 +666,7 @@ void FileTaskExecutor::InitHandlerHostFileAccessPermissions(
// If the file is on gdata mount point, we'll have to give handler host
// permissions for file's gdata cache paths.
// This has to be called on UI thread.
- gdata::util::InsertGDataCachePathsPermissions(profile_, iter->absolute_path,
+ gdata::util::InsertGDataCachePathsPermissions(profile_, iter->virtual_path,
&handler_host_permissions_);
}
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698