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

Unified Diff: third_party/WebKit/Source/core/experiments/Experiments.cpp

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More sharing. Created 5 years 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/experiments/Experiments.cpp
diff --git a/third_party/WebKit/Source/core/experiments/Experiments.cpp b/third_party/WebKit/Source/core/experiments/Experiments.cpp
index cdcfd4fb2abaa2ad65ffdebfbb2dda98b90f7838..fafc05b312f325140e7b971914472c84910a3e9b 100644
--- a/third_party/WebKit/Source/core/experiments/Experiments.cpp
+++ b/third_party/WebKit/Source/core/experiments/Experiments.cpp
@@ -57,6 +57,17 @@ bool hasValidAPIKey(ExecutionContext* executionContext, const String& apiName, S
bool Experiments::isApiEnabled(ExecutionContext* executionContext, const String& apiName, String& errorMessage)
{
+ return isApiEnabledInternal(executionContext, apiName, errorMessage);
+}
+
+bool Experiments::isApiEnabled(ExecutionContext* executionContext, const String& apiName)
+{
+ String errorMessage;
+ return isApiEnabledInternal(executionContext, apiName, errorMessage);
+}
+
+bool Experiments::isApiEnabledInternal(ExecutionContext* executionContext, const String& apiName, String& errorMessage)
+{
if (!RuntimeEnabledFeatures::experimentalFrameworkEnabled()) {
errorMessage = "Experimental Framework is not enabled.";
return false;

Powered by Google App Engine
This is Rietveld 408576698