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

Unified Diff: third_party/mojo/src/mojo/edk/test/test_support_impl.cc

Issue 1284833004: Remove remaining legacy SplitString calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « sql/connection.cc ('k') | tools/android/memdump/memdump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mojo/src/mojo/edk/test/test_support_impl.cc
diff --git a/third_party/mojo/src/mojo/edk/test/test_support_impl.cc b/third_party/mojo/src/mojo/edk/test/test_support_impl.cc
index 34b32cee543835c76c36a5d1090dcaf711e987dc..2f1c63e5960f7db5bfc81bc95e7871c8c07880dc 100644
--- a/third_party/mojo/src/mojo/edk/test/test_support_impl.cc
+++ b/third_party/mojo/src/mojo/edk/test/test_support_impl.cc
@@ -28,12 +28,10 @@ base::FilePath ResolveSourceRootRelativePath(const char* relative_path) {
if (!PathService::Get(base::DIR_SOURCE_ROOT, &path))
return base::FilePath();
- std::vector<std::string> components;
- base::SplitString(relative_path, '/', &components);
-
- for (size_t i = 0; i < components.size(); ++i) {
- if (!components[i].empty())
- path = path.AppendASCII(components[i]);
+ for (const base::StringPiece& component : base::SplitStringPiece(
+ relative_path, "/", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
+ if (!component.empty())
+ path = path.AppendASCII(component);
}
return path;
« no previous file with comments | « sql/connection.cc ('k') | tools/android/memdump/memdump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698