Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 2930573005: Use ContainsValue() instead of std::find() in ui/android, ui/base and ui/views (Closed)
Patch Set: Changed EXPECT_FALSE to EXPECT_TRUE Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/models/list_selection_model.cc ('k') | ui/base/x/selection_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 1a24b13c6108c7b236e0df9640138b06856bab64..bf53a1314e39afe87aa4569ac7fa5577eb2c88a4 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -686,9 +686,7 @@ ScaleFactor ResourceBundle::GetMaxScaleFactor() const {
bool ResourceBundle::IsScaleFactorSupported(ScaleFactor scale_factor) {
const std::vector<ScaleFactor>& supported_scale_factors =
ui::GetSupportedScaleFactors();
- return std::find(supported_scale_factors.begin(),
- supported_scale_factors.end(),
- scale_factor) != supported_scale_factors.end();
+ return base::ContainsValue(supported_scale_factors, scale_factor);
}
ResourceBundle::ResourceBundle(Delegate* delegate)
« no previous file with comments | « ui/base/models/list_selection_model.cc ('k') | ui/base/x/selection_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698