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

Side by Side Diff: lib/Parser_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 unified diff | Download patch
« no previous file with comments | « lib/Object_cpp.template ('k') | lib/Parser_h.template » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 {% for namespace in config.protocol.namespace %} 5 {% for namespace in config.protocol.namespace %}
6 namespace {{namespace}} { 6 namespace {{namespace}} {
7 {% endfor %} 7 {% endfor %}
8 8
9 namespace { 9 namespace {
10 10
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 const Char* end = start + length; 531 const Char* end = start + length;
532 const Char *tokenEnd; 532 const Char *tokenEnd;
533 std::unique_ptr<Value> value = buildValue(start, end, &tokenEnd, 0); 533 std::unique_ptr<Value> value = buildValue(start, end, &tokenEnd, 0);
534 if (!value || tokenEnd != end) 534 if (!value || tokenEnd != end)
535 return nullptr; 535 return nullptr;
536 return value; 536 return value;
537 } 537 }
538 538
539 } // anonymous namespace 539 } // anonymous namespace
540 540
541 std::unique_ptr<Value> parseJSON(const uint16_t* characters, unsigned length) 541 std::unique_ptr<Value> parseJSONCharacters(const uint16_t* characters, unsigned length)
542 { 542 {
543 return parseJSONInternal<uint16_t>(characters, length); 543 return parseJSONInternal<uint16_t>(characters, length);
544 } 544 }
545 545
546 std::unique_ptr<Value> parseJSON(const uint8_t* characters, unsigned length) 546 std::unique_ptr<Value> parseJSONCharacters(const uint8_t* characters, unsigned l ength)
547 { 547 {
548 return parseJSONInternal<uint8_t>(characters, length); 548 return parseJSONInternal<uint8_t>(characters, length);
549 } 549 }
550 550
551 {% for namespace in config.protocol.namespace %} 551 {% for namespace in config.protocol.namespace %}
552 } // namespace {{namespace}} 552 } // namespace {{namespace}}
553 {% endfor %} 553 {% endfor %}
OLDNEW
« no previous file with comments | « lib/Object_cpp.template ('k') | lib/Parser_h.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698