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

Unified Diff: base/string_util.cc

Issue 28310: Fixes Issue 7377: Regression: Omnibox trims URL ending with 0x85 (Take 2)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « base/string_util.h ('k') | base/string_util_icu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.cc
===================================================================
--- base/string_util.cc (revision 10694)
+++ base/string_util.cc (working copy)
@@ -367,8 +367,6 @@
0x0C,
0x0D,
0x20, // Space
- '\x85', // <control-0085>
- '\xa0', // No-Break Space
0
};
const char* const kCodepageUTF8 = "UTF-8";
@@ -423,10 +421,18 @@
return TrimStringT(input, kWhitespaceWide, positions, output);
}
+TrimPositions TrimWhitespaceASCII(const std::string& input,
+ TrimPositions positions,
+ std::string* output) {
+ return TrimStringT(input, kWhitespaceASCII, positions, output);
+}
+
+// This function is only for backward-compatibility.
+// To be removed when all callers are updated.
TrimPositions TrimWhitespace(const std::string& input,
TrimPositions positions,
std::string* output) {
- return TrimStringT(input, kWhitespaceASCII, positions, output);
+ return TrimWhitespaceASCII(input, positions, output);
}
std::wstring CollapseWhitespace(const std::wstring& text,
« no previous file with comments | « base/string_util.h ('k') | base/string_util_icu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698