| Index: net/http/http_request_headers.cc
|
| diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc
|
| index c2eee59af95f8408a9d11ad774986e302270175b..ce646dc20817144e0fb51aa971994c8a88f8f86d 100644
|
| --- a/net/http/http_request_headers.cc
|
| +++ b/net/http/http_request_headers.cc
|
| @@ -154,15 +154,10 @@ void HttpRequestHeaders::AddHeaderFromString(
|
|
|
| void HttpRequestHeaders::AddHeadersFromString(
|
| const base::StringPiece& headers) {
|
| - // TODO(willchan): Consider adding more StringPiece support in string_util.h
|
| - // to eliminate copies.
|
| - std::vector<std::string> header_line_vector;
|
| - base::SplitStringUsingSubstr(headers.as_string(), "\r\n",
|
| - &header_line_vector);
|
| - for (std::vector<std::string>::const_iterator it = header_line_vector.begin();
|
| - it != header_line_vector.end(); ++it) {
|
| - if (!it->empty())
|
| - AddHeaderFromString(*it);
|
| + for (const base::StringPiece& header :
|
| + base::SplitStringPieceUsingSubstr(headers, "\r\n")) {
|
| + if (!header.empty())
|
| + AddHeaderFromString(header);
|
| }
|
| }
|
|
|
|
|