[extensions] Use base::fixed_flat_map in cpp_bundle_generator
This change makes use of the recently added base::fixed_flat_map in cpp_bundle_generator. The generated code for GeneratedSchemas::Get will now look as follows: // static base::StringPiece GeneratedSchemas::Get(base::StringPiece name) { static constexpr auto kSchemas = base::MakeFixedFlatMap<base::StringPiece, base::StringPiece>({ ... {"namespace", kNamespace}, ... }); auto it = kSchemas.find(name); return it != kSchemas.end() ? it->second : base::StringPiece(); } Change-Id: I73ced3f7f40eacbd630089968ad46a6e664743a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532076Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#828097}
Showing
Please register or sign in to comment