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

Unified Diff: third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp

Issue 2249913003: Remove blink::Resource::Type::LinkPrefetch and replace it by a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp b/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp
index 02d01ed41877041e7a48087076a45174150654d8..2241638e203cb74e2c2ebe6df11e129e7d6774e3 100644
--- a/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp
@@ -12,7 +12,7 @@ namespace blink {
Resource* LinkFetchResource::fetch(Resource::Type type, FetchRequest& request, ResourceFetcher* fetcher)
{
- ASSERT(type == LinkPrefetch);
+ DCHECK(request.isPrefetch());
ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone);
fetcher->determineRequestContext(request.mutableResourceRequest(), type);
return fetcher->requestResource(request, LinkResourceFactory(type));
@@ -27,4 +27,9 @@ LinkFetchResource::~LinkFetchResource()
{
}
+bool LinkFetchResource::isPrefetch() const
+{
+ return true;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fetch/LinkFetchResource.h ('k') | third_party/WebKit/Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698