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

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

Issue 830002: win: string_util.h -> utf_string_conversions.h fix. (Closed)
Patch Set: Don't remove utf_string_conversions.h from string_util.h just yet Created 10 years, 9 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
« no previous file with comments | « net/base/mime_util.cc ('k') | net/base/platform_mime_util_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/base/net_util.h" 5 #include "net/base/net_util.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
11 #include "base/utf_string_conversions.h"
11 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
12 #include "net/base/escape.h" 13 #include "net/base/escape.h"
13 14
14 namespace net { 15 namespace net {
15 16
16 bool FileURLToFilePath(const GURL& url, FilePath* file_path) { 17 bool FileURLToFilePath(const GURL& url, FilePath* file_path) {
17 *file_path = FilePath(); 18 *file_path = FilePath();
18 std::wstring& file_path_str = const_cast<std::wstring&>(file_path->value()); 19 std::wstring& file_path_str = const_cast<std::wstring&>(file_path->value());
19 file_path_str.clear(); 20 file_path_str.clear();
20 21
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // We used to try too hard and see if |path| made up entirely of 61 // We used to try too hard and see if |path| made up entirely of
61 // the 1st 256 characters in the Unicode was a zero-extended UTF-16. 62 // the 1st 256 characters in the Unicode was a zero-extended UTF-16.
62 // If so, we converted it to 'Latin-1' and checked if the result was UTF-8. 63 // If so, we converted it to 'Latin-1' and checked if the result was UTF-8.
63 // If the check passed, we converted the result to UTF-8. 64 // If the check passed, we converted the result to UTF-8.
64 // Otherwise, we treated the result as the native OS encoding. 65 // Otherwise, we treated the result as the native OS encoding.
65 // However, that led to http://crbug.com/4619 and http://crbug.com/14153 66 // However, that led to http://crbug.com/4619 and http://crbug.com/14153
66 return true; 67 return true;
67 } 68 }
68 69
69 } // namespace net 70 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mime_util.cc ('k') | net/base/platform_mime_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698