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; |