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

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: review + view.cc fix 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
« no previous file with comments | « ui/gl/gl_gl_api_implementation.cc ('k') | ui/message_center/message_center_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface.cc
diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc
index 9c25ff07d6380d380588cb022c86d2920a33affe..b69e93bfe964af2ccb2bb11080389ba2d6bd7845 100644
--- a/ui/gl/gl_surface.cc
+++ b/ui/gl/gl_surface.cc
@@ -4,12 +4,12 @@
#include "ui/gl/gl_surface.h"
-#include <algorithm>
#include <vector>
#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 +50,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)) {
LOG(ERROR) << "Requested GL implementation is not available.";
return false;
}
« no previous file with comments | « ui/gl/gl_gl_api_implementation.cc ('k') | ui/message_center/message_center_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698