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

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

Issue 745053002: Grant access to files in PageState, which have already been validated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 6 years, 1 month 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_impl.h
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index c6fdf055b0d0b95348057ca7466421f22af2b5da..bb2013a700d8c2550b4c7b2e66bad14ad2c58442 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -388,8 +388,16 @@ class CONTENT_EXPORT RenderViewHostImpl
// to fire.
static const int64 kUnloadTimeoutMS;
+ // Returns whether the current RenderProcessHost has read access to the files
+ // reported in |state|.
bool CanAccessFilesOfPageState(const PageState& state) const;
+ // Grants the current RenderProcessHost read access to any file listed in
+ // |validated_state|. It is important that the PageState has been validated
+ // upon receipt from the renderer process to prevent it from forging access to
+ // files without the user's consent.
+ void GrantFileAccessFromPageState(const PageState& validated_state);
+
// The number of RenderFrameHosts which have a reference to this RVH.
int frames_ref_count_;

Powered by Google App Engine
This is Rietveld 408576698