Early out from FlagsState::GenerateFlagsToSwitchesMapping

Don't fill name_to_switch_map when enabled_entries are empty as it won't
be used.

Change-Id: Ia5c3339646073d42108588893a09a08a76197c2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3071285
Commit-Queue: Oleg Maximenko <[email protected]>
Reviewed-by: Elly Fong-Jones <[email protected]>
Cr-Commit-Position: refs/heads/master@{#910220}
diff --git a/components/flags_ui/flags_state.h b/components/flags_ui/flags_state.h
index 610ff779..507cda7b 100644
--- a/components/flags_ui/flags_state.h
+++ b/components/flags_ui/flags_state.h
@@ -218,6 +218,7 @@
   // from |flags_storage|. On output, |enabled_entries| will contain the
   // internal names of enabled flags and |name_to_switch_map| will contain
   // information on how they map to command-line flags or features.
+  // When |enabled_entries| is empty |name_to_switch_map| won't be filled.
   void GenerateFlagsToSwitchesMapping(
       FlagsStorage* flags_storage,
       std::set<std::string>* enabled_entries,