Commit 66e7407f authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Qualify #includes in files generated by make_qualified_names.py.

Also, fix include guards.
This CL has no behavior changes.

Bug: 836071
Change-Id: I21d78c16c302405e9fb375843388aaaaaf093500
Reviewed-on: https://chromium-review.googlesource.com/1037047Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555288}
parent 8e759628
......@@ -81,14 +81,17 @@ class MakeQualifiedNamesWriter(json5_generator.Writer):
(self.namespace.lower() + "_names.h"): self.generate_header,
(self.namespace.lower() + "_names.cc"): self.generate_implementation,
}
qualified_header = self._relative_output_dir + self.namespace.lower() + '_names.h'
self._template_context = {
'attrs': self.attrs_json5_file.name_dictionaries,
'export': self._metadata('export'),
'header_guard': self.make_header_guard(qualified_header),
'input_files': self._input_files,
'namespace': self.namespace,
'namespace_prefix': namespace_prefix,
'namespace_uri': namespace_uri,
'tags': self.tags_json5_file.name_dictionaries if self.tags_json5_file else [],
'this_include_path': qualified_header,
'use_namespace_for_attrs': use_namespace_for_attrs,
}
......
......@@ -3,11 +3,12 @@
{{source_files_for_generated_file(template_file, input_files)}}
#include "{{namespace|lower}}_names.h"
#include "{{this_include_path}}"
#include <memory>
#include "third_party/blink/renderer/platform/wtf/static_constructors.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include <memory>
namespace blink {
namespace {{namespace}}Names {
......@@ -103,5 +104,5 @@ void init() {
DCHECK_EQ(attr_i, {{namespace}}AttrsCount);
}
} // {{namespace}}
} // namespace blink
} // namespace {{namespace}}Names
} // namespace blink
......@@ -3,8 +3,8 @@
{{source_files_for_generated_file(template_file, input_files)}}
#ifndef BLINK_CORE_{{namespace|upper}}_NAMES_H_
#define BLINK_CORE_{{namespace|upper}}_NAMES_H_
#ifndef {{header_guard}}
#define {{header_guard}}
{% if export == 'CORE_EXPORT' %}
#include "third_party/blink/renderer/core/core_export.h"
......@@ -44,7 +44,7 @@ std::unique_ptr<const QualifiedName*[]> get{{namespace}}Attrs();
void init();
} // {{namespace}}Names
} // namespace blink
} // namespace {{namespace}}Names
} // namespace blink
#endif
#endif // {{header_guard}}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment