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

Unified Diff: third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.cpp

Issue 2744593005: Merge mutableResourceRequest() calls in XSLStyleSheetResource (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.cpp b/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.cpp
index ca116558e88f60fe4a804bf3b46f77d84ae7a8ca..e099c7939e34f6ac347b669736b77f760c55542a 100644
--- a/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.cpp
@@ -35,7 +35,7 @@
namespace blink {
-static void applyXSLRequestProperties(ResourceRequest& request) {
+static void applyXSLRequestProperties(FetchRequest& request) {
request.setRequestContext(WebURLRequest::RequestContextXSLT);
// TODO(japhet): Accept: headers can be set manually on XHRs from script, in
// the browser process, and... here. The browser process can't tell the
@@ -45,13 +45,13 @@ static void applyXSLRequestProperties(ResourceRequest& request) {
DEFINE_STATIC_LOCAL(const AtomicString, acceptXSLT,
("text/xml, application/xml, application/xhtml+xml, "
"text/xsl, application/rss+xml, application/atom+xml"));
- request.setHTTPAccept(acceptXSLT);
+ request.mutableResourceRequest().setHTTPAccept(acceptXSLT);
}
XSLStyleSheetResource* XSLStyleSheetResource::fetchSynchronously(
FetchRequest& request,
ResourceFetcher* fetcher) {
- applyXSLRequestProperties(request.mutableResourceRequest());
+ applyXSLRequestProperties(request);
request.makeSynchronous();
XSLStyleSheetResource* resource = toXSLStyleSheetResource(
fetcher->requestResource(request, XSLStyleSheetResourceFactory()));
@@ -63,7 +63,7 @@ XSLStyleSheetResource* XSLStyleSheetResource::fetchSynchronously(
XSLStyleSheetResource* XSLStyleSheetResource::fetch(FetchRequest& request,
ResourceFetcher* fetcher) {
DCHECK(RuntimeEnabledFeatures::xsltEnabled());
- applyXSLRequestProperties(request.mutableResourceRequest());
+ applyXSLRequestProperties(request);
return toXSLStyleSheetResource(
fetcher->requestResource(request, XSLStyleSheetResourceFactory()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698