From 2500a0f7c4ac54a55d621069dc044ddc6702a518 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Tue, 10 Nov 2009 01:43:15 +0000 Subject: Clean up recent string conversion function changes, part 1: Remove unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used. This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/escape.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net/base/escape.cc') diff --git a/net/base/escape.cc b/net/base/escape.cc index 5196eb6..0327fc2 100644 --- a/net/base/escape.cc +++ b/net/base/escape.cc @@ -252,10 +252,10 @@ std::wstring UnescapeAndDecodeUTF8URLComponent(const std::string& text, size_t* offset_for_adjustment) { std::wstring result; size_t original_offset = offset_for_adjustment ? *offset_for_adjustment : 0; - if (base::CodepageToWideAndAdjustOffset( - UnescapeURLImpl(text, rules, offset_for_adjustment), - "UTF-8", base::OnStringConversionError::FAIL, &result, - offset_for_adjustment)) + std::string unescaped_url( + UnescapeURLImpl(text, rules, offset_for_adjustment)); + if (UTF8ToWideAndAdjustOffset(unescaped_url.data(), unescaped_url.length(), + &result, offset_for_adjustment)) return result; // Character set looks like it's valid. // Not valid. Return the escaped version. Undo our changes to -- cgit v1.1