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

Unified Diff: headless/lib/browser/devtools_api/domain_cc.template

Issue 2666503002: Make headless_shell target compile for Windows (Closed)
Patch Set: Fix initlogging placing, always enable logging in Windows Created 3 years, 10 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
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) {
« no previous file with comments | « headless/lib/browser/devtools_api/client_api_generator.py ('k') | headless/lib/browser/devtools_api/domain_h.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698