summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/url_fixer_upper.cc
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 09:22:56 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 09:22:56 +0000
commit94161ccff85b1afda1f42474c26a948af06bfa45 (patch)
tree2b41c581a805930180e568fee39dab5314aa4a0a /chrome/browser/net/url_fixer_upper.cc
parentb5bdca8334d91521cead662c49e2af90ce9602da (diff)
downloadchromium_src-94161ccff85b1afda1f42474c26a948af06bfa45.zip
chromium_src-94161ccff85b1afda1f42474c26a948af06bfa45.tar.gz
chromium_src-94161ccff85b1afda1f42474c26a948af06bfa45.tar.bz2
Lands <http://codereview.chromium.org/165297> for thiago.farina@gmail.com.
R=me From Thiago: Replaces some TrimWhitespace with TrimWhitespaceASCII or TrimWhitespaceUTF8. BUG=9851 TEST=run base_unittests.exe, unit_tests.exe and ui_tests.exe Review URL: http://codereview.chromium.org/172039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/url_fixer_upper.cc')
-rw-r--r--chrome/browser/net/url_fixer_upper.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc
index fa572c3..498bd6c 100644
--- a/chrome/browser/net/url_fixer_upper.cc
+++ b/chrome/browser/net/url_fixer_upper.cc
@@ -75,9 +75,11 @@ void UTF8PartsToWideParts(const string& text_utf8,
// does some basic fixes for input that we want to test for file-ness
static void PrepareStringForFileOps(const FilePath& text,
FilePath::StringType* output) {
- TrimWhitespace(text.value(), TRIM_ALL, output);
#if defined(OS_WIN)
+ TrimWhitespace(text.value(), TRIM_ALL, output);
replace(output->begin(), output->end(), '/', '\\');
+#else
+ TrimWhitespaceUTF8(text.value(), TRIM_ALL, output);
#endif
}
@@ -430,7 +432,7 @@ string URLFixerUpper::SegmentURL(const string& text,
string URLFixerUpper::FixupURL(const string& text,
const string& desired_tld) {
string trimmed;
- TrimWhitespace(text, TRIM_ALL, &trimmed);
+ TrimWhitespaceUTF8(text, TRIM_ALL, &trimmed);
if (trimmed.empty())
return string(); // Nothing here.