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

Unified Diff: tools/json_schema_compiler/cpp_bundle_generator.py

Issue 2275063002: [Extensions] Don't generate a list for each generated schema (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: woot 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 | « extensions/common/extension_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_bundle_generator.py
diff --git a/tools/json_schema_compiler/cpp_bundle_generator.py b/tools/json_schema_compiler/cpp_bundle_generator.py
index 5bc5a7c56ea290958823a3449f7a8769a103358a..89501e2cf14b2c086fd3c2172475b74367e625fa 100644
--- a/tools/json_schema_compiler/cpp_bundle_generator.py
+++ b/tools/json_schema_compiler/cpp_bundle_generator.py
@@ -326,9 +326,8 @@ class _SchemasCCGenerator(object):
c.Append('namespace {')
for api in self._bundle._api_defs:
namespace = self._bundle._model.namespaces[api.get('namespace')]
- # JSON parsing code expects lists of schemas, so dump a singleton list.
- json_content = json.dumps([_PrefixSchemaWithNamespace(
- _RemoveUnneededFields(api))],
+ json_content = json.dumps(_PrefixSchemaWithNamespace(
+ _RemoveUnneededFields(api)),
separators=(',', ':'))
# Escape all double-quotes and backslashes. For this to output a valid
# JSON C string, we need to escape \ and ". Note that some schemas are
« no previous file with comments | « extensions/common/extension_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698