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

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 2954343005: Merge ResourceRequestBodyImpl and ResourceRequestBody. (Closed)
Patch Set: Remove comment Created 3 years, 6 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/child_process_security_policy_impl.cc
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index 210a3c3c7cb5c9e7c2c9ab5e7c957a6a69c6cbc9..94af97eaa2cbc37dcb39c0684b5b0df00f07ca03 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -18,7 +18,6 @@
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "content/browser/site_instance_impl.h"
-#include "content/common/resource_request_body_impl.h"
#include "content/common/site_isolation_policy.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -27,6 +26,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/bindings_policy.h"
+#include "content/public/common/resource_request_body.h"
#include "content/public/common/url_constants.h"
#include "net/base/filename_util.h"
#include "net/url_request/url_request.h"
@@ -763,40 +763,40 @@ bool ChildProcessSecurityPolicyImpl::CanReadAllFiles(
bool ChildProcessSecurityPolicyImpl::CanReadRequestBody(
int child_id,
const storage::FileSystemContext* file_system_context,
- const scoped_refptr<ResourceRequestBodyImpl>& body) {
+ const scoped_refptr<ResourceRequestBody>& body) {
if (!body)
return true;
- for (const ResourceRequestBodyImpl::Element& element : *body->elements()) {
+ for (const ResourceRequestBody::Element& element : *body->elements()) {
switch (element.type()) {
- case ResourceRequestBodyImpl::Element::TYPE_FILE:
+ case ResourceRequestBody::Element::TYPE_FILE:
if (!CanReadFile(child_id, element.path()))
return false;
break;
- case ResourceRequestBodyImpl::Element::TYPE_FILE_FILESYSTEM:
+ case ResourceRequestBody::Element::TYPE_FILE_FILESYSTEM:
if (!CanReadFileSystemFile(child_id, file_system_context->CrackURL(
element.filesystem_url())))
return false;
break;
- case ResourceRequestBodyImpl::Element::TYPE_DISK_CACHE_ENTRY:
+ case ResourceRequestBody::Element::TYPE_DISK_CACHE_ENTRY:
// TYPE_DISK_CACHE_ENTRY can't be sent via IPC according to
// content/common/resource_messages.cc
NOTREACHED();
return false;
- case ResourceRequestBodyImpl::Element::TYPE_BYTES:
- case ResourceRequestBodyImpl::Element::TYPE_BYTES_DESCRIPTION:
+ case ResourceRequestBody::Element::TYPE_BYTES:
+ case ResourceRequestBody::Element::TYPE_BYTES_DESCRIPTION:
// Data is self-contained within |body| - no need to check access.
break;
- case ResourceRequestBodyImpl::Element::TYPE_BLOB:
+ case ResourceRequestBody::Element::TYPE_BLOB:
// No need to validate - the unguessability of the uuid of the blob is a
// sufficient defense against access from an unrelated renderer.
break;
- case ResourceRequestBodyImpl::Element::TYPE_UNKNOWN:
+ case ResourceRequestBody::Element::TYPE_UNKNOWN:
default:
// Fail safe - deny access.
NOTREACHED();
@@ -808,7 +808,7 @@ bool ChildProcessSecurityPolicyImpl::CanReadRequestBody(
bool ChildProcessSecurityPolicyImpl::CanReadRequestBody(
SiteInstance* site_instance,
- const scoped_refptr<ResourceRequestBodyImpl>& body) {
+ const scoped_refptr<ResourceRequestBody>& body) {
DCHECK(site_instance);
DCHECK_CURRENTLY_ON(BrowserThread::UI);
« no previous file with comments | « content/browser/child_process_security_policy_impl.h ('k') | content/browser/frame_host/frame_navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698