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

Unified Diff: headless/lib/browser/types_h.template

Issue 2219843002: headless: Make API generator more robust against weird enum literals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « headless/lib/browser/type_conversions_h.template ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/types_h.template
diff --git a/headless/lib/browser/types_h.template b/headless/lib/browser/types_h.template
index 25b341d89dd4360752f1afe9b2c8bf0a92af5d95..51bd895d033f08f4f5c66fe33ea0c9d2346fcb95 100644
--- a/headless/lib/browser/types_h.template
+++ b/headless/lib/browser/types_h.template
@@ -39,7 +39,7 @@ namespace {{domain.domain | camelcase_to_hacker_style}} {
{% if "enum" in type %}
enum class {{type.id}} {
{% for literal in type.enum %}
- {{ literal | dash_to_camelcase | camelcase_to_hacker_style | upper | mangle_enum}}{{',' if not loop.last}}
+ {{ literal | sanitize_literal | dash_to_camelcase | camelcase_to_hacker_style | upper }}{{',' if not loop.last}}
{% endfor %}
};
« no previous file with comments | « headless/lib/browser/type_conversions_h.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698