diff options
author | kalman <kalman@chromium.org> | 2015-07-23 11:27:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-23 18:28:16 +0000 |
commit | e58e6223146f09405229146fce6c1bfe6b71e4ce (patch) | |
tree | 8f32850890b2057b11cfdf2bc02cdba3a12c3e1d /extensions/common/manifest_handlers | |
parent | f340ae7cfdf33370ea3aed173ab2e86fe8415936 (diff) | |
download | chromium_src-e58e6223146f09405229146fce6c1bfe6b71e4ce.zip chromium_src-e58e6223146f09405229146fce6c1bfe6b71e4ce.tar.gz chromium_src-e58e6223146f09405229146fce6c1bfe6b71e4ce.tar.bz2 |
Generate all extension schema namespaces as "api" and instead vary the generated bundle names.
At the moment the 3 modules that use extension API schemas, those in
extensions/common/api, chrome/common/extensions/api, and extensions/shell/api,
are generated with different C++ namespaces: "core_api", "api", and
"shell::api" respectively.
This is a pointless distinction to make since as far as JS is concerned they
must all go on the window.chrome object, therefore namespace conflicts are
impossible. It just ends up adding code noise.
The only problem it solves is that all bundle compiles are generated to the
same name, "GeneratedSchemas" and "GeneratedFunctionRegistry". This patch
solves that a different way, by adding a JSON schema compiler option to give
those generated classes a prefix such that they are "GeneratedSchemas",
"ChromeGeneratedSchemas", and "ShellGeneratedSchemas" respectively.
This lets us to a global substitution from "core_api" to just "api".
R=rockot@chromium.org, dpranke@chromium.org
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/1226353004
Cr-Commit-Position: refs/heads/master@{#340119}
Diffstat (limited to 'extensions/common/manifest_handlers')
3 files changed, 3 insertions, 3 deletions
diff --git a/extensions/common/manifest_handlers/content_capabilities_handler.cc b/extensions/common/manifest_handlers/content_capabilities_handler.cc index 05144f5..cfae312 100644 --- a/extensions/common/manifest_handlers/content_capabilities_handler.cc +++ b/extensions/common/manifest_handlers/content_capabilities_handler.cc @@ -23,7 +23,7 @@ namespace extensions { namespace keys = manifest_keys; namespace errors = manifest_errors; -using core_api::extensions_manifest_types::ContentCapabilities; +using api::extensions_manifest_types::ContentCapabilities; ContentCapabilitiesInfo::ContentCapabilitiesInfo() { } diff --git a/extensions/common/manifest_handlers/externally_connectable.cc b/extensions/common/manifest_handlers/externally_connectable.cc index 1314c6d..db0748c 100644 --- a/extensions/common/manifest_handlers/externally_connectable.cc +++ b/extensions/common/manifest_handlers/externally_connectable.cc @@ -37,7 +37,7 @@ const char kErrorWildcardHostsNotAllowed[] = namespace keys = extensions::manifest_keys; namespace errors = externally_connectable_errors; -using core_api::extensions_manifest_types::ExternallyConnectable; +using api::extensions_manifest_types::ExternallyConnectable; namespace { diff --git a/extensions/common/manifest_handlers/options_page_info.cc b/extensions/common/manifest_handlers/options_page_info.cc index a8bb4d6..cb8948e 100644 --- a/extensions/common/manifest_handlers/options_page_info.cc +++ b/extensions/common/manifest_handlers/options_page_info.cc @@ -23,7 +23,7 @@ namespace extensions { namespace keys = manifest_keys; namespace errors = manifest_errors; -using core_api::extensions_manifest_types::OptionsUI; +using api::extensions_manifest_types::OptionsUI; namespace { |