summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 23:30:25 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 23:30:25 +0000
commit90a792541bf27389f57427bf838350b3aaa03608 (patch)
tree64ff98c2543eae7cd32fc2cb9493ac2d6ada9899 /webkit/fileapi
parentc7a56cd941b91b028e31f19c6da5a6432acf5771 (diff)
downloadchromium_src-90a792541bf27389f57427bf838350b3aaa03608.zip
chromium_src-90a792541bf27389f57427bf838350b3aaa03608.tar.gz
chromium_src-90a792541bf27389f57427bf838350b3aaa03608.tar.bz2
Display only the sandboxed portion of the URL when listing
a filesystem: URL that refers to a directory. This avoids leaking implementation details of the sandboxed filesystem. Review URL: http://codereview.chromium.org/6537011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r--webkit/fileapi/file_system_dir_url_request_job.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/webkit/fileapi/file_system_dir_url_request_job.cc b/webkit/fileapi/file_system_dir_url_request_job.cc
index 73b1fa4..d61dac0 100644
--- a/webkit/fileapi/file_system_dir_url_request_job.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job.cc
@@ -116,12 +116,12 @@ void FileSystemDirURLRequestJob::DidReadDirectory(
}
#if defined(OS_WIN)
- const string16& title = absolute_dir_path_.value();
+ const string16& title = relative_dir_path_.value();
#elif defined(OS_POSIX)
const string16& title = WideToUTF16(
- base::SysNativeMBToWide(absolute_dir_path_.value()));
+ base::SysNativeMBToWide(relative_dir_path_.value()));
#endif
- data_.append(net::GetDirectoryListingHeader(title));
+ data_.append(net::GetDirectoryListingHeader(ASCIIToUTF16("/") + title));
typedef std::vector<base::FileUtilProxy::Entry>::const_iterator EntryIterator;
for (EntryIterator it = entries.begin(); it != entries.end(); ++it) {