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

Unified Diff: third_party/WebKit/Source/core/html/RelList.cpp

Issue 2116503004: Make Foreign Fetch an origin trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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/html/RelList.cpp
diff --git a/third_party/WebKit/Source/core/html/RelList.cpp b/third_party/WebKit/Source/core/html/RelList.cpp
index a05e349c6f3c23545d03395e5c5487875aa25aa4..4d1cf239c45a76fc0a7ee249ae8515ee5cd0ea49 100644
--- a/third_party/WebKit/Source/core/html/RelList.cpp
+++ b/third_party/WebKit/Source/core/html/RelList.cpp
@@ -5,6 +5,7 @@
#include "core/html/RelList.h"
#include "core/dom/Document.h"
+#include "core/origin_trials/OriginTrials.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "wtf/HashMap.h"
@@ -57,8 +58,6 @@ static HashSet<AtomicString>& supportedTokens()
"apple-touch-icon",
"apple-touch-icon-precomposed",
};
- if (RuntimeEnabledFeatures::linkServiceWorkerEnabled())
- tokens.add("serviceworker");
}
return tokens;
@@ -66,7 +65,9 @@ static HashSet<AtomicString>& supportedTokens()
bool RelList::validateTokenValue(const AtomicString& tokenValue, ExceptionState&) const
{
- return supportedTokens().contains(tokenValue);
+ if (supportedTokens().contains(tokenValue))
+ return true;
+ return OriginTrials::linkServiceWorkerEnabled(m_element->getExecutionContext()) && tokenValue == "serviceworker";
}
DEFINE_TRACE(RelList)

Powered by Google App Engine
This is Rietveld 408576698