Index: headless/lib/browser/devtools_api/domain_cc.template |
diff --git a/headless/lib/browser/devtools_api/domain_cc.template b/headless/lib/browser/devtools_api/domain_cc.template |
index dc04d6e9d7bc2f7cb4a0613a6c89520055aa2564..f9b70377917432a5880ec35a0444a4386c9bccbf 100644 |
--- a/headless/lib/browser/devtools_api/domain_cc.template |
+++ b/headless/lib/browser/devtools_api/domain_cc.template |
@@ -45,7 +45,7 @@ void Domain::RegisterEventHandlersIfNeeded() { |
{% if "redirect" in command %}{% continue %}{% endif %} |
{% set class_name = 'ExperimentalDomain' if command.experimental else 'Domain' %} |
- {% set method_name = command.name | to_title_case %} |
+ {% set method_name = command.name | sanitize_literal | to_title_case %} |
void {{class_name}}::{{method_name}}(std::unique_ptr<{{method_name}}Params> params, base::Callback<void(std::unique_ptr<{{method_name}}Result>)> callback) { |
dispatcher_->SendMessage("{{domain.domain}}.{{command.name}}", params->Serialize(), base::Bind(&Domain::Handle{{method_name}}Response, callback)); |
} |
@@ -96,7 +96,7 @@ void {{class_name}}::{{method_name}}(std::unique_ptr<{{method_name}}Params> para |
{# Generate response handlers for commands that need them. #} |
{% for command in domain.commands %} |
{% if not "returns" in command %}{% continue %}{% endif %} |
- {% set method_name = command.name | to_title_case %} |
+ {% set method_name = command.name | sanitize_literal | to_title_case %} |
// static |
void Domain::Handle{{method_name}}Response(base::Callback<void(std::unique_ptr<{{method_name}}Result>)> callback, const base::Value& response) { |