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

Unified Diff: templates/TypeBuilder_cpp.template

Issue 2490733002: [inspector_protocol] Allow custom json parser. (Closed)
Patch Set: Created 4 years, 1 month 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 | « lib/Values_h.template ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: templates/TypeBuilder_cpp.template
diff --git a/templates/TypeBuilder_cpp.template b/templates/TypeBuilder_cpp.template
index 1103f202b49cf821bb21f65d9979f3cda76d8624..11fd5995e027d78cd17ed2441dbd139461d573f1 100644
--- a/templates/TypeBuilder_cpp.template
+++ b/templates/TypeBuilder_cpp.template
@@ -106,7 +106,7 @@ std::unique_ptr<{{type.id}}> {{type.id}}::clone() const
std::unique_ptr<API::{{type.id}}> API::{{type.id}}::fromJSONString(const {{config.exported.string_in}}& json)
{
ErrorSupport errors;
- std::unique_ptr<Value> value = parseJSON(json);
+ std::unique_ptr<Value> value = StringUtil::parseJSON(json);
if (!value)
return nullptr;
return protocol::{{domain.domain}}::{{type.id}}::parse(value.get(), &errors);
@@ -355,7 +355,7 @@ DispatchResponse::Status DispatcherImpl::{{command.name}}(int callId, std::uniqu
// static
void Dispatcher::wire(UberDispatcher* dispatcher, Backend* backend)
{
- dispatcher->registerBackend("{{domain.domain}}", wrapUnique(new DispatcherImpl(dispatcher->channel(), backend)));
+ dispatcher->registerBackend("{{domain.domain}}", std::unique_ptr<protocol::DispatcherBase>(new DispatcherImpl(dispatcher->channel(), backend)));
}
} // {{domain.domain}}
« no previous file with comments | « lib/Values_h.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698