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

Unified Diff: ui/gl/gl_surface.cc

Issue 1485093003: ui: use base's ContainsValue helper function instead of std::find (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: ui/gl/gl_surface.cc
diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc
index 9c25ff07d6380d380588cb022c86d2920a33affe..467dd29ee023321d685ff73b6dcac883343a610e 100644
--- a/ui/gl/gl_surface.cc
+++ b/ui/gl/gl_surface.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/threading/thread_local.h"
#include "base/trace_event/trace_event.h"
#include "ui/gfx/swap_result.h"
@@ -50,9 +51,7 @@ bool GLSurface::InitializeOneOff() {
impl = kGLImplementationEGLGLES2;
} else {
impl = GetNamedGLImplementation(requested_implementation_name);
- if (std::find(allowed_impls.begin(),
- allowed_impls.end(),
- impl) == allowed_impls.end()) {
+ if (!ContainsValue(allowed_impls, impl)) {
sky 2015/12/01 22:08:31 nit: nuke {}
tfarina 2015/12/02 20:31:41 Done.
LOG(ERROR) << "Requested GL implementation is not available.";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698