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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1278973003: Revert of Update SplitString calls to new form (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 | « content/browser/service_worker/service_worker_database.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
}
« no previous file with comments | « content/browser/service_worker/service_worker_database.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698