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

Side by Side Diff: webkit/child/ftp_directory_listing_response_delegate.cc

Issue 102993018: Remove UTF string conversion functions from the global namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aaaaaaaaaa Created 6 years, 12 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/child/ftp_directory_listing_response_delegate.h" 5 #include "webkit/child/ftp_directory_listing_response_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/i18n/icu_encoding_detection.h" 9 #include "base/i18n/icu_encoding_detection.h"
10 #include "base/i18n/icu_string_conversions.h" 10 #include "base/i18n/icu_string_conversions.h"
(...skipping 30 matching lines...) Expand all
41 if (base::DetectEncoding(path, &encoding) && !encoding.empty()) { 41 if (base::DetectEncoding(path, &encoding) && !encoding.empty()) {
42 base::string16 path_utf16; 42 base::string16 path_utf16;
43 if (base::CodepageToUTF16(path, encoding.c_str(), 43 if (base::CodepageToUTF16(path, encoding.c_str(),
44 base::OnStringConversionError::SUBSTITUTE, 44 base::OnStringConversionError::SUBSTITUTE,
45 &path_utf16)) { 45 &path_utf16)) {
46 return path_utf16; 46 return path_utf16;
47 } 47 }
48 } 48 }
49 49
50 // Use system native encoding as the last resort. 50 // Use system native encoding as the last resort.
51 return WideToUTF16Hack(base::SysNativeMBToWide(path)); 51 return base::WideToUTF16Hack(base::SysNativeMBToWide(path));
52 } 52 }
53 53
54 } // namespace 54 } // namespace
55 55
56 namespace webkit_glue { 56 namespace webkit_glue {
57 57
58 FtpDirectoryListingResponseDelegate::FtpDirectoryListingResponseDelegate( 58 FtpDirectoryListingResponseDelegate::FtpDirectoryListingResponseDelegate(
59 WebURLLoaderClient* client, 59 WebURLLoaderClient* client,
60 WebURLLoader* loader, 60 WebURLLoader* loader,
61 const WebURLResponse& response) 61 const WebURLResponse& response)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 base::ASCIIToUTF16(".."), std::string(), false, 0, base::Time())); 114 base::ASCIIToUTF16(".."), std::string(), false, 0, base::Time()));
115 } 115 }
116 } 116 }
117 117
118 void FtpDirectoryListingResponseDelegate::SendDataToClient( 118 void FtpDirectoryListingResponseDelegate::SendDataToClient(
119 const std::string& data) { 119 const std::string& data) {
120 client_->didReceiveData(loader_, data.data(), data.length(), -1); 120 client_->didReceiveData(loader_, data.data(), data.length(), -1);
121 } 121 }
122 122
123 } // namespace webkit_glue 123 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/browser/database/databases_table_unittest.cc ('k') | webkit/common/database/database_connections_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698