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

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

Issue 6623015: Add a path for a web page to request the enumeration of a directory. This, t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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: content/browser/renderer_host/render_view_host.cc
===================================================================
--- content/browser/renderer_host/render_view_host.cc (revision 76768)
+++ content/browser/renderer_host/render_view_host.cc (working copy)
@@ -687,6 +687,20 @@
Send(new ViewMsg_RunFileChooserResponse(routing_id(), files));
}
+void RenderViewHost::DirectoryEnumerationFinished(
+ int request_id,
+ const std::vector<FilePath>& files) {
+ // Grant the security access requested to the given files.
+ for (std::vector<FilePath>::const_iterator file = files.begin();
+ file != files.end(); ++file) {
+ ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(
+ process()->id(), *file);
+ }
+ Send(new ViewMsg_EnumerateDirectoryResponse(routing_id(),
+ request_id,
+ files));
+}
+
void RenderViewHost::LoadStateChanged(const GURL& url,
net::LoadState load_state,
uint64 upload_position,

Powered by Google App Engine
This is Rietveld 408576698