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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 10397002: DragEnter grants both read and navigate permissions to files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | content/browser/renderer_host/render_view_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_view_host_impl.cc (revision 136090)
+++ content/browser/renderer_host/render_view_host_impl.cc (working copy)
@@ -577,13 +577,12 @@
FilterURL(policy, renderer_id, true, &filtered_data.url);
// The filenames vector, on the other hand, does represent a capability to
- // access the given files.
+ // read the given files (but not to navigate to any file:// scheme URL),
std::set<FilePath> filesets;
for (std::vector<WebDropData::FileInfo>::const_iterator iter(
filtered_data.filenames.begin());
iter != filtered_data.filenames.end(); ++iter) {
FilePath path = FilePath::FromUTF8Unsafe(UTF16ToUTF8(iter->path));
- policy->GrantRequestURL(renderer_id, net::FilePathToFileURL(path));
// If the renderer already has permission to read these paths, we don't need
// to re-grant them. This prevents problems with DnD for files in the CrOS
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698