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

Side by Side Diff: net/base/net_util_win.cc

Issue 6317016: Change UTF8ToUTF16 to accept const StringPiece&. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm>
6
5 #include "net/base/net_util.h" 7 #include "net/base/net_util.h"
6 8
7 #include "base/file_path.h" 9 #include "base/file_path.h"
8 #include "base/string_piece.h" 10 #include "base/string_piece.h"
9 #include "base/string_util.h" 11 #include "base/string_util.h"
10 #include "base/sys_string_conversions.h" 12 #include "base/sys_string_conversions.h"
11 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
12 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
13 #include "net/base/escape.h" 15 #include "net/base/escape.h"
14 16
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // We used to try too hard and see if |path| made up entirely of 63 // We used to try too hard and see if |path| made up entirely of
62 // the 1st 256 characters in the Unicode was a zero-extended UTF-16. 64 // the 1st 256 characters in the Unicode was a zero-extended UTF-16.
63 // If so, we converted it to 'Latin-1' and checked if the result was UTF-8. 65 // If so, we converted it to 'Latin-1' and checked if the result was UTF-8.
64 // If the check passed, we converted the result to UTF-8. 66 // If the check passed, we converted the result to UTF-8.
65 // Otherwise, we treated the result as the native OS encoding. 67 // Otherwise, we treated the result as the native OS encoding.
66 // However, that led to http://crbug.com/4619 and http://crbug.com/14153 68 // However, that led to http://crbug.com/4619 and http://crbug.com/14153
67 return true; 69 return true;
68 } 70 }
69 71
70 } // namespace net 72 } // namespace net
OLDNEW
« no previous file with comments | « net/base/cookie_monster_perftest.cc ('k') | net/tools/dnssec_chain_verify/dnssec_chain_verify.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698