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

Unified Diff: third_party/WebKit/Source/core/loader/LinkLoader.cpp

Issue 2194473002: Remove LinkPreload runtime flag (status=stable) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/loader/LinkLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
index fd4ec3aab2454b8ac86f0b8ff06decf9549f3745..c9016efe07b01e7702cf0f3d092672e29da90186 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -255,7 +255,6 @@ static Resource* preloadIfNeeded(const LinkRelAttribute& relAttribute, const KUR
return nullptr;
UseCounter::count(document, UseCounter::LinkRelPreload);
- ASSERT(RuntimeEnabledFeatures::linkPreloadEnabled());
if (!href.isValid() || href.isEmpty()) {
document.addConsoleMessage(ConsoleMessage::create(OtherMessageSource, WarningMessageLevel, String("<link rel=preload> has an invalid `href` value")));
return nullptr;
@@ -328,10 +327,8 @@ void LinkLoader::loadLinksFromHeader(const String& headerValue, const KURL& base
}
if (canLoadResources != DoNotLoadResources) {
bool errorOccurred = false;
- if (RuntimeEnabledFeatures::linkPreloadEnabled()) {
- ViewportDescription* viewportDescription = (viewportDescriptionWrapper && viewportDescriptionWrapper->set) ? &(viewportDescriptionWrapper->description) : nullptr;
- preloadIfNeeded(relAttribute, url, *document, header.as(), header.mimeType(), header.media(), crossOriginAttributeValue(header.crossOrigin()), LinkCalledFromHeader, errorOccurred, viewportDescription);
- }
+ ViewportDescription* viewportDescription = (viewportDescriptionWrapper && viewportDescriptionWrapper->set) ? &(viewportDescriptionWrapper->description) : nullptr;
+ preloadIfNeeded(relAttribute, url, *document, header.as(), header.mimeType(), header.media(), crossOriginAttributeValue(header.crossOrigin()), LinkCalledFromHeader, errorOccurred, viewportDescription);
}
// TODO(yoav): Add more supported headers as needed.
}
« no previous file with comments | « third_party/WebKit/Source/core/html/LinkRelAttribute.cpp ('k') | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698