From ea4a1d01a2d1aad09c92821a51bb44c4412785f8 Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Tue, 23 Mar 2010 03:02:10 +0000 Subject: Revert r42300: "HttpRequestHeaders refactor." Broke access-control-basic-whitelist-request-headers.html layout test. BUG=22588 Review URL: http://codereview.chromium.org/1110012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42305 0039d316-1c4b-4281-b951-d872f2087c98 --- base/string_util.cc | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) (limited to 'base/string_util.cc') diff --git a/base/string_util.cc b/base/string_util.cc index 494d09d..19c1735 100644 --- a/base/string_util.cc +++ b/base/string_util.cc @@ -1324,54 +1324,6 @@ void SplitStringDontTrim(const std::string& str, SplitStringT(str, s, false, r); } -template -static void SplitStringUsingSubstrT(const STR& str, - const STR& s, - std::vector* r) { - typename STR::size_type begin_index = 0; - while (true) { - const typename STR::size_type end_index = str.find(s, begin_index); - if (end_index == STR::npos) { - const STR term = str.substr(begin_index); - STR tmp; - TrimWhitespace(term, TRIM_ALL, &tmp); - r->push_back(tmp); - return; - } - const STR term = str.substr(begin_index, end_index - begin_index); - STR tmp; - TrimWhitespace(term, TRIM_ALL, &tmp); - r->push_back(tmp); - begin_index = end_index + s.size(); - } -} - -void SplitStringUsingSubstr(const string16& str, - const string16& s, - std::vector* r) { - SplitStringUsingSubstrT(str, s, r); -} - -void SplitStringUsingSubstr(const std::string& str, - const std::string& s, - std::vector* r) { - SplitStringUsingSubstrT(str, s, r); -} - -std::vector SplitStringUsingSubstr(const string16& str, - const string16& s) { - std::vector result; - SplitStringUsingSubstr(str, s, &result); - return result; -} - -std::vector SplitStringUsingSubstr(const std::string& str, - const std::string& s) { - std::vector result; - SplitStringUsingSubstr(str, s, &result); - return result; -} - template static size_t TokenizeT(const STR& str, const STR& delimiters, -- cgit v1.1