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

Unified Diff: Source/core/fetch/XSLStyleSheetResource.cpp

Issue 1170503003: Remove resource type-specific fetching logic from ResourceFetcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check Document::loader() before calling startPreload() Created 5 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 | « Source/core/fetch/XSLStyleSheetResource.h ('k') | Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/XSLStyleSheetResource.cpp
diff --git a/Source/core/fetch/XSLStyleSheetResource.cpp b/Source/core/fetch/XSLStyleSheetResource.cpp
index df4062a82f466a939263a63b376935e664e3c870..972dd8af758f4751f4bdba2c13f98ed3e95051f9 100644
--- a/Source/core/fetch/XSLStyleSheetResource.cpp
+++ b/Source/core/fetch/XSLStyleSheetResource.cpp
@@ -27,13 +27,22 @@
#include "config.h"
#include "core/fetch/XSLStyleSheetResource.h"
+#include "core/fetch/FetchRequest.h"
#include "core/fetch/ResourceClientWalker.h"
+#include "core/fetch/ResourceFetcher.h"
#include "core/fetch/StyleSheetResourceClient.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/SharedBuffer.h"
namespace blink {
+ResourcePtr<XSLStyleSheetResource> XSLStyleSheetResource::fetch(FetchRequest& request, ResourceFetcher* fetcher)
+{
+ ASSERT(RuntimeEnabledFeatures::xsltEnabled());
+ request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestContextXSLT);
+ return toXSLStyleSheetResource(fetcher->requestResource(request, XSLStyleSheetResourceFactory()));
+}
+
XSLStyleSheetResource::XSLStyleSheetResource(const ResourceRequest& resourceRequest, const String& charset)
: StyleSheetResource(resourceRequest, XSLStyleSheet, "text/xsl", charset)
{
« no previous file with comments | « Source/core/fetch/XSLStyleSheetResource.h ('k') | Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698