| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/experiments/testing/InternalsFrobulate.h" | 5 #include "core/experiments/testing/InternalsFrobulate.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "core/experiments/Experiments.h" | 9 #include "core/experiments/ExperimentalFeatures.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 namespace { | |
| 14 const char* kFrobulateAPIName = "Frobulate"; | |
| 15 } | |
| 16 | |
| 17 // static | 13 // static |
| 18 bool InternalsFrobulate::frobulate(ScriptState* scriptState, Internals& internal
s, ExceptionState& exceptionState) | 14 bool InternalsFrobulate::frobulate(ScriptState* scriptState, Internals& internal
s, ExceptionState& exceptionState) |
| 19 { | 15 { |
| 20 String errorMessage; | 16 String errorMessage; |
| 21 if (!Experiments::isApiEnabled(scriptState->executionContext(), kFrobulateAP
IName, errorMessage)) { | 17 if (!ExperimentalFeatures::experimentalFrameworkSampleAPIEnabled(scriptState
->executionContext(), errorMessage)) { |
| 22 exceptionState.throwDOMException(NotSupportedError, errorMessage); | 18 exceptionState.throwDOMException(NotSupportedError, errorMessage); |
| 23 return false; | 19 return false; |
| 24 } | 20 } |
| 25 return frobulateNoEnabledCheck(internals); | 21 return frobulateNoEnabledCheck(internals); |
| 26 } | 22 } |
| 27 | 23 |
| 28 // static | 24 // static |
| 29 bool InternalsFrobulate::frobulateNoEnabledCheck(Internals& internals) | 25 bool InternalsFrobulate::frobulateNoEnabledCheck(Internals& internals) |
| 30 { | 26 { |
| 31 return true; | 27 return true; |
| 32 } | 28 } |
| 33 | 29 |
| 34 } // namespace blink | 30 } // namespace blink |
| OLD | NEW |