| Index: chrome/browser/net/url_fixer_upper.cc
|
| ===================================================================
|
| --- chrome/browser/net/url_fixer_upper.cc (revision 28217)
|
| +++ chrome/browser/net/url_fixer_upper.cc (working copy)
|
| @@ -70,6 +70,20 @@
|
| UTF8ComponentToWideComponent(text_utf8, parts_utf8.ref);
|
| }
|
|
|
| +TrimPositions TrimWhitespaceUTF8(const std::string& input,
|
| + TrimPositions positions,
|
| + std::string* output) {
|
| + // This implementation is not so fast since it converts the text encoding
|
| + // twice. Please feel free to file a bug if this function hurts the
|
| + // performance of Chrome.
|
| + DCHECK(IsStringUTF8(input));
|
| + std::wstring input_wide = UTF8ToWide(input);
|
| + std::wstring output_wide;
|
| + TrimPositions result = TrimWhitespace(input_wide, positions, &output_wide);
|
| + *output = WideToUTF8(output_wide);
|
| + return result;
|
| +}
|
| +
|
| } // namespace
|
|
|
| // does some basic fixes for input that we want to test for file-ness
|
|
|