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

Unified Diff: net/tools/disk_cache_memory_test/disk_cache_memory_test.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 | « native_client_sdk/src/libraries/sdk_util/string_util.h ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/disk_cache_memory_test/disk_cache_memory_test.cc
diff --git a/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc b/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc
index 0c1fedb5da2484466546075433116ba6aaa580ca..cf1864225a07ff9cad6848bb828602a42b2182b9 100644
--- a/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc
+++ b/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc
@@ -20,6 +20,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
+#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
#include "net/base/cache_type.h"
@@ -137,8 +138,8 @@ scoped_ptr<Backend> CreateAndInitBackend(const CacheSpec& spec) {
bool ParseRangeLine(const std::string& line,
std::vector<std::string>* tokens,
bool* is_anonymous_read_write) {
- tokens->clear();
- base::SplitStringAlongWhitespace(line, tokens);
+ *tokens = base::SplitString(line, base::kWhitespaceASCII,
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
if (tokens->size() == 5) {
const std::string& mode = (*tokens)[1];
*is_anonymous_read_write = !mode.compare(0, 3, kReadWrite);
@@ -163,8 +164,8 @@ bool ParseRangeProperty(const std::string& line,
std::vector<std::string>* tokens,
uint64* size,
bool* is_private_dirty) {
- tokens->clear();
- base::SplitStringAlongWhitespace(line, tokens);
+ *tokens = base::SplitString(line, base::kWhitespaceASCII,
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
// If the line is long, attempt to parse new range outside of this scope.
if (tokens->size() > 3)
« no previous file with comments | « native_client_sdk/src/libraries/sdk_util/string_util.h ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698