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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template

Issue 1730383003: DevTools: consistently use Maybe for optional values in the protocol generator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 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: third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
index d0a630c8f76e914bae0505f0c988b2a81b8b6c35..72a99a1f48c5095de2743a37c6f0f8e6dbeddade 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
@@ -32,12 +32,7 @@ public:
void {{event.name}}(
{%- for parameter in event.parameters -%}
{%- if "optional" in parameter -%}
- {{resolve_type(parameter).optional_pass_type}}
- {%- if resolve_type(parameter).nullable -%}
- {{parameter.name}} = nullptr
- {%- else -%}
- {{parameter.name}} = {{resolve_type(parameter).optional_type}}()
- {%- endif %}
+ const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
{%- else -%}
{{resolve_type(parameter).pass_type}} {{parameter.name}}
{%- endif -%}{%- if not loop.last -%}, {% endif -%}

Powered by Google App Engine
This is Rietveld 408576698