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

Unified Diff: chrome/browser/chromeos/file_manager/file_browser_handlers.cc

Issue 147993003: Clarify and separate the concept of "Drive path" and "Filesystem relative path". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/file_manager/file_browser_handlers.cc
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
index 6e4bf808525bde07b24c63ce9055ec8ad662de29..7087115862aa933d9e3fd891da8851634d069565 100644
--- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
+++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -260,8 +260,7 @@ FileBrowserHandlerExecutor::SetupFileAccessPermissions(
// Grant access to this particular file to target extension. This will
// ensure that the target extension can access only this FS entry and
// prevent from traversing FS hierarchy upward.
- backend->GrantFileAccessToExtension(
- handler_extension->id(), virtual_path);
+ backend->GrantFileAccessToExtension(handler_extension->id(), virtual_path);
// Output values.
FileDefinition file;
@@ -395,9 +394,8 @@ void FileBrowserHandlerExecutor::SetupPermissionsAndDispatchEvent(
file_entries->Append(file_def);
file_def->SetString("fileSystemName", file_system_name);
file_def->SetString("fileSystemRoot", file_system_root.spec());
- base::FilePath root(FILE_PATH_LITERAL("/"));
- base::FilePath full_path = root.Append(iter->virtual_path);
- file_def->SetString("fileFullPath", full_path.value());
+ file_def->SetString("fileFullPath",
+ "/" + iter->virtual_path.AsUTF8Unsafe());
file_def->SetBoolean("fileIsDirectory", iter->is_directory);
}

Powered by Google App Engine
This is Rietveld 408576698