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

Unified Diff: ui/gl/gl_implementation.cc

Issue 2930273002: Use ContainsValue() instead of std::find() in ui/accessibility, ui/gl and ui/ozone (Closed)
Patch Set: Rebase patch 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/accessibility/ax_tree_unittest.cc ('k') | ui/gl/test/egl_initialization_displays_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_implementation.cc
diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc
index 688d8b895e62c0cf79d9986bd1cd70f8a7eee6b5..8942d7e8733209d9b3612fecee037d54fa471bbb 100644
--- a/ui/gl/gl_implementation.cc
+++ b/ui/gl/gl_implementation.cc
@@ -6,7 +6,6 @@
#include <stddef.h>
-#include <algorithm>
#include <string>
#include "base/at_exit.h"
@@ -14,6 +13,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -167,8 +167,7 @@ std::string FilterGLExtensionList(
extensions, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
auto is_disabled = [&disabled_extensions](const base::StringPiece& ext) {
- return std::find(disabled_extensions.begin(), disabled_extensions.end(),
- ext) != disabled_extensions.end();
+ return base::ContainsValue(disabled_extensions, ext);
};
extension_vec.erase(
std::remove_if(extension_vec.begin(), extension_vec.end(), is_disabled),
« no previous file with comments | « ui/accessibility/ax_tree_unittest.cc ('k') | ui/gl/test/egl_initialization_displays_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698