electron/shell/browser/plugins
Charles Kerr 77833eddfb
perf: avoid unnecessary vector copy in GetMimeTypeToExtensionIdMap() (#46373)
* perf: avoid making an unnecessary copy of the vector

MimeTypesHandler::GetMIMETypeAllowlist() returns a const&, so we can
iterate that directly instead of making a temporary copy of it.

* perf: move the call to ExtensionRegistry::Get() outside of the loop

Also, keep the previous behavior of not calling it at all if there
aren't any whitelisted extensions.

* perf: avoid redundant map lookup

* refactor: const correctness

* refactor: cleanup
2025-03-31 21:52:49 -05:00
..
plugin_utils.cc perf: avoid unnecessary vector copy in GetMimeTypeToExtensionIdMap() (#46373) 2025-03-31 21:52:49 -05:00
plugin_utils.h chore: bump chromium to 98.0.4706.0 (main) (#31555) 2021-11-24 09:45:59 +01:00