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

Unified Diff: content/browser/child_process_security_policy_impl.h

Issue 2905763002: Deduplicating CanReadRequestBody code. (Closed)
Patch Set: Rebasing... Created 3 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/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_security_policy_impl.h
diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h
index 15c8d886d9b36f78c86a90db583482106e06e31b..bd7a17fc7cbd6871a21fac1eec45fd5c7f15c121 100644
--- a/content/browser/child_process_security_policy_impl.h
+++ b/content/browser/child_process_security_policy_impl.h
@@ -94,12 +94,15 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
// Returns if |child_id| can read all of the |files|.
bool CanReadAllFiles(int child_id, const std::vector<base::FilePath>& files);
+ // Validate that |child_id| in |file_system_context| is allowed to access
+ // data in the POST body specified by |body|. Can be called on any thread.
+ bool CanReadRequestBody(int child_id,
+ const storage::FileSystemContext* file_system_context,
+ const scoped_refptr<ResourceRequestBodyImpl>& body);
+
// Validate that the renderer process for |site_instance| is allowed to access
// data in the POST body specified by |body|. Has to be called on the UI
// thread.
- // TODO(lukasza): Remove code duplication - the method below should be reused
- // by RenderFrameHostImpl::OnBeginNavigation and
- // ResourceDispatcherHostImpl::ShouldServiceRequest.
bool CanReadRequestBody(SiteInstance* site_instance,
const scoped_refptr<ResourceRequestBodyImpl>& body);
@@ -247,12 +250,6 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
const std::string& filesystem_id,
int permission);
- // Validate that |child_id| in |file_system_context| is allowed to access
- // data in the POST body specified by |body|. Can be called on any thread.
- bool CanReadRequestBody(int child_id,
- const storage::FileSystemContext* file_system_context,
- const scoped_refptr<ResourceRequestBodyImpl>& body);
-
// You must acquire this lock before reading or writing any members of this
// class. You must not block while holding this lock.
base::Lock lock_;
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698