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

Unified Diff: content/child/web_url_request_util.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
« no previous file with comments | « content/child/web_url_request_util.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_request_util.cc
diff --git a/content/child/web_url_request_util.cc b/content/child/web_url_request_util.cc
index 47fcfe6fb31a599a937d90aa59da22641deb2ad4..d19aef22b2c005829357c7c40090f5519beb9fdd 100644
--- a/content/child/web_url_request_util.cc
+++ b/content/child/web_url_request_util.cc
@@ -232,17 +232,17 @@ int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request) {
}
WebHTTPBody GetWebHTTPBodyForRequestBody(
- const scoped_refptr<ResourceRequestBodyImpl>& input) {
+ const scoped_refptr<ResourceRequestBody>& input) {
WebHTTPBody http_body;
http_body.Initialize();
http_body.SetIdentifier(input->identifier());
http_body.SetContainsPasswordData(input->contains_sensitive_info());
for (const auto& element : *input->elements()) {
switch (element.type()) {
- case ResourceRequestBodyImpl::Element::TYPE_BYTES:
+ case ResourceRequestBody::Element::TYPE_BYTES:
http_body.AppendData(WebData(element.bytes(), element.length()));
break;
- case ResourceRequestBodyImpl::Element::TYPE_FILE:
+ case ResourceRequestBody::Element::TYPE_FILE:
http_body.AppendFileRange(
blink::FilePathToWebString(element.path()), element.offset(),
(element.length() != std::numeric_limits<uint64_t>::max())
@@ -250,7 +250,7 @@ WebHTTPBody GetWebHTTPBodyForRequestBody(
: -1,
element.expected_modification_time().ToDoubleT());
break;
- case ResourceRequestBodyImpl::Element::TYPE_FILE_FILESYSTEM:
+ case ResourceRequestBody::Element::TYPE_FILE_FILESYSTEM:
http_body.AppendFileSystemURLRange(
element.filesystem_url(), element.offset(),
(element.length() != std::numeric_limits<uint64_t>::max())
@@ -258,11 +258,11 @@ WebHTTPBody GetWebHTTPBodyForRequestBody(
: -1,
element.expected_modification_time().ToDoubleT());
break;
- case ResourceRequestBodyImpl::Element::TYPE_BLOB:
+ case ResourceRequestBody::Element::TYPE_BLOB:
http_body.AppendBlob(WebString::FromASCII(element.blob_uuid()));
break;
- case ResourceRequestBodyImpl::Element::TYPE_BYTES_DESCRIPTION:
- case ResourceRequestBodyImpl::Element::TYPE_DISK_CACHE_ENTRY:
+ case ResourceRequestBody::Element::TYPE_BYTES_DESCRIPTION:
+ case ResourceRequestBody::Element::TYPE_DISK_CACHE_ENTRY:
default:
NOTREACHED();
break;
@@ -271,9 +271,9 @@ WebHTTPBody GetWebHTTPBodyForRequestBody(
return http_body;
}
-scoped_refptr<ResourceRequestBodyImpl> GetRequestBodyForWebURLRequest(
+scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest(
const blink::WebURLRequest& request) {
- scoped_refptr<ResourceRequestBodyImpl> request_body;
+ scoped_refptr<ResourceRequestBody> request_body;
if (request.HttpBody().IsNull()) {
return request_body;
@@ -286,10 +286,9 @@ scoped_refptr<ResourceRequestBodyImpl> GetRequestBodyForWebURLRequest(
return GetRequestBodyForWebHTTPBody(request.HttpBody());
}
-scoped_refptr<ResourceRequestBodyImpl> GetRequestBodyForWebHTTPBody(
+scoped_refptr<ResourceRequestBody> GetRequestBodyForWebHTTPBody(
const blink::WebHTTPBody& httpBody) {
- scoped_refptr<ResourceRequestBodyImpl> request_body =
- new ResourceRequestBodyImpl();
+ scoped_refptr<ResourceRequestBody> request_body = new ResourceRequestBody();
size_t i = 0;
WebHTTPBody::Element element;
while (httpBody.ElementAt(i++, element)) {
« no previous file with comments | « content/child/web_url_request_util.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698