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

Unified Diff: extensions/renderer/script_context.cc

Issue 1930213002: [Extensions] More bindings improvements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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
« no previous file with comments | « extensions/renderer/resources/binding.js ('k') | extensions/renderer/v8_schema_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 6a5b631179035859e3b0e53ea7a4cbaef968cac0..a1d8996a5daf4a604d2ad4a417b477dccf3c8d66 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -210,7 +210,7 @@ v8::Local<v8::Value> ScriptContext::CallFunction(
Feature::Availability ScriptContext::GetAvailability(
const std::string& api_name) {
DCHECK(thread_checker_.CalledOnValidThread());
- if (api_name == "test") {
+ if (base::StartsWith(api_name, "test", base::CompareCase::SENSITIVE)) {
bool allowed = base::CommandLine::ForCurrentProcess()->
HasSwitch(::switches::kTestType);
Feature::AvailabilityResult result =
« no previous file with comments | « extensions/renderer/resources/binding.js ('k') | extensions/renderer/v8_schema_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698