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

Unified Diff: google_apis/drive/test_util.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes 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 | « extensions/renderer/dispatcher.cc ('k') | google_apis/gaia/fake_gaia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/test_util.cc
diff --git a/google_apis/drive/test_util.cc b/google_apis/drive/test_util.cc
index ae96409ce05a847621e821c68cffa5a48d3107bd..e77aedfdeb015d5b455cd1f13779c1df40ef6e1d 100644
--- a/google_apis/drive/test_util.cc
+++ b/google_apis/drive/test_util.cc
@@ -133,17 +133,16 @@ bool ParseContentRangeHeader(const std::string& value,
if (!RemovePrefix(value, "bytes ", &remaining))
return false;
- std::vector<std::string> parts;
- base::SplitString(remaining, '/', &parts);
+ std::vector<base::StringPiece> parts = base::SplitStringPiece(
+ remaining, "/", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (parts.size() != 2U)
return false;
- const std::string range = parts[0];
if (!base::StringToInt64(parts[1], length))
return false;
- parts.clear();
- base::SplitString(range, '-', &parts);
+ parts = base::SplitStringPiece(parts[0], "-", base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_ALL);
if (parts.size() != 2U)
return false;
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | google_apis/gaia/fake_gaia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698