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

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: rebase Created 4 years, 5 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 3b4bd7d1227acbcbbf72e3128ecd72618fc78aac..53e4cfc88df21d283fbc6c836bcc8dfae7362616 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"
@@ -54,8 +55,6 @@ static RelList::SupportedTokens& supportedTokens()
supportedValuesMap.add("manifest");
supportedValuesMap.add("apple-touch-icon");
supportedValuesMap.add("apple-touch-icon-precomposed");
- if (RuntimeEnabledFeatures::linkServiceWorkerEnabled())
- supportedValuesMap.add("serviceworker");
}
return supportedValuesMap;
@@ -63,7 +62,9 @@ static RelList::SupportedTokens& 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