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

Unified Diff: ui/gl/gl_implementation.cc

Issue 2695883003: Change uses of base::JoinString to pass StringPieces where possible. (Closed)
Patch Set: Remove dependency CL. Created 3 years, 9 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 | « remoting/base/capabilities_unittest.cc ('k') | no next file » | 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 9235cb935e55ff4823b11ede7bbc9d399f3d3396..688d8b895e62c0cf79d9986bd1cd70f8a7eee6b5 100644
--- a/ui/gl/gl_implementation.cc
+++ b/ui/gl/gl_implementation.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
@@ -162,10 +163,10 @@ std::string FilterGLExtensionList(
if (extensions == NULL)
return "";
- std::vector<std::string> extension_vec = base::SplitString(
+ std::vector<base::StringPiece> extension_vec = base::SplitStringPiece(
extensions, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
- auto is_disabled = [&disabled_extensions](const std::string& ext) {
+ auto is_disabled = [&disabled_extensions](const base::StringPiece& ext) {
return std::find(disabled_extensions.begin(), disabled_extensions.end(),
ext) != disabled_extensions.end();
};
@@ -201,7 +202,7 @@ std::string GetGLExtensionsFromCurrentContext(GLApi* api) {
GLint num_extensions = 0;
api->glGetIntegervFn(GL_NUM_EXTENSIONS, &num_extensions);
- std::vector<std::string> exts(num_extensions);
+ std::vector<base::StringPiece> exts(num_extensions);
for (GLint i = 0; i < num_extensions; ++i) {
const char* extension =
reinterpret_cast<const char*>(api->glGetStringiFn(GL_EXTENSIONS, i));
« no previous file with comments | « remoting/base/capabilities_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698