diff options
Diffstat (limited to 'chromium/components/prefs/json_pref_store.cc')
-rw-r--r-- | chromium/components/prefs/json_pref_store.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chromium/components/prefs/json_pref_store.cc b/chromium/components/prefs/json_pref_store.cc index 2f1f2c72fa9..d21899a86ba 100644 --- a/chromium/components/prefs/json_pref_store.cc +++ b/chromium/components/prefs/json_pref_store.cc @@ -139,8 +139,12 @@ const char* GetHistogramSuffix(const base::FilePath& path) { &spaceless_basename); static constexpr std::array<const char*, 3> kAllowList{ "Secure_Preferences", "Preferences", "Local_State"}; - const char* const* it = base::ranges::find(kAllowList, spaceless_basename); - return it != kAllowList.end() ? *it : ""; + for (int i = 0; i < kAllowList.size(); ++i) { + if (spaceless_basename == kAllowList[i]) + return kAllowList[i]; + } + + return ""; } } // namespace |