Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 47a448deb3739c3e64c4a476f885106f1e1db386..ace02a32afd8e55e70e7d774eb27afe6ae100a43 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2476,11 +2476,11 @@ |
if (headers.empty()) { |
params->set_prefer_cache(true); |
} else { |
- for (const base::StringPiece& key_value : |
- base::SplitStringPiece( |
- headers, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { |
- std::vector<std::string> pair = base::SplitString( |
- key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
+ std::vector<std::string> key_value_list; |
+ base::SplitString(headers, '\n', &key_value_list); |
+ for (const auto& key_value : key_value_list) { |
+ std::vector<std::string> pair; |
+ base::SplitString(key_value, ':', &pair); |
DCHECK_EQ(2ul, pair.size()); |
params->add_request_header(pair[0], pair[1]); |
} |