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

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: Remove 'return undefined and print a message' on constructors. 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..882e2345d34da2f4d70c71ebc1ed3276998f5284 100644
--- a/third_party/WebKit/Source/core/experiments/Experiments.cpp
+++ b/third_party/WebKit/Source/core/experiments/Experiments.cpp
@@ -75,6 +75,12 @@ bool Experiments::isApiEnabled(ExecutionContext* executionContext, const String&
return hasValidAPIKey(executionContext, apiName, errorMessage);
}
+bool Experiments::isApiEnabledWithoutMessage(ExecutionContext* executionContext, const String& apiName)
+{
+ String errorMessage;
+ return isApiEnabled(executionContext, apiName, errorMessage);
+}
+
DOMException* Experiments::createApiDisabledException(const String& apiName)
{
return DOMException::create(NotSupportedError, getDisabledMessage(apiName));

Powered by Google App Engine
This is Rietveld 408576698