[c++] Permit heterogeneous container lookup and use it in base::CommandLine.
base::CommandLine works around the fact that std::map did not previously
support lookup by a key type other than the one stored in the map (like
const char* or base::StringPiece), and maintained a second map to allow
lookup by StringPiece without allocation. This can now be done directly
on |switches_| using C++14 heterogeneous lookup.
Sites which refer to base::CommandLine::SwitchMap without using the alias
are rewritten to refer to the alias, since this affects the type of the
map. (This is more concise anyhow.)
Bug: 554717
Change-Id: Ieee179206cc5a35b4ab9ded183d5f46529a730ce
Reviewed-on: https://chromium-review.googlesource.com/616262
Reviewed-by: Alexei Svitkine <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: danakj <[email protected]>
Commit-Queue: Jeremy Roman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#512906}
diff --git a/components/flags_ui/flags_state.h b/components/flags_ui/flags_state.h
index b888a0ae..8540ce8 100644
--- a/components/flags_ui/flags_state.h
+++ b/components/flags_ui/flags_state.h
@@ -84,8 +84,7 @@
void SetFeatureEntryEnabled(FlagsStorage* flags_storage,
const std::string& internal_name,
bool enable);
- void RemoveFlagsSwitches(
- std::map<std::string, base::CommandLine::StringType>* switch_list);
+ void RemoveFlagsSwitches(base::CommandLine::SwitchMap* switch_list);
void ResetAllFlags(FlagsStorage* flags_storage);
void Reset();