summaryrefslogtreecommitdiffstats
path: root/net/http/http_transaction_winhttp.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 15:29:49 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 15:29:49 +0000
commit6b27db809e959efaf7183ea2de64c6ab3947ef3d (patch)
treeed2ed10f826f6eb40884231ee0c98d86afef44a7 /net/http/http_transaction_winhttp.cc
parent65b1094478e054ef1f924d3681f8d34ec88d9fcf (diff)
downloadchromium_src-6b27db809e959efaf7183ea2de64c6ab3947ef3d.zip
chromium_src-6b27db809e959efaf7183ea2de64c6ab3947ef3d.tar.gz
chromium_src-6b27db809e959efaf7183ea2de64c6ab3947ef3d.tar.bz2
Remove the old NativeMB functions from string util, and use the new ones in sys_strings.h. I also removed duplicated code from the sandbox that can now use this, and fixed one case in the bug reporter that should not have been using the native multibyte encoding.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_transaction_winhttp.cc')
-rw-r--r--net/http/http_transaction_winhttp.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/http/http_transaction_winhttp.cc b/net/http/http_transaction_winhttp.cc
index 1c0914b..0d7fda2 100644
--- a/net/http/http_transaction_winhttp.cc
+++ b/net/http/http_transaction_winhttp.cc
@@ -35,6 +35,7 @@
#include "base/memory_debug.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "base/sys_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "net/base/auth_cache.h"
#include "net/base/cert_status_flags.h"
@@ -1155,7 +1156,7 @@ bool HttpTransactionWinHttp::OpenRequest() {
// Add request headers. WinHttp is known to convert the headers to bytes
// using the system charset converter, so we use the same converter to map
// our request headers to UTF-16 before handing the data to WinHttp.
- std::wstring request_headers = NativeMBToWide(GetRequestHeaders());
+ std::wstring request_headers = base::SysNativeMBToWide(GetRequestHeaders());
DWORD len = static_cast<DWORD>(request_headers.size());
if (!WinHttpAddRequestHeaders(request_handle_,
@@ -1490,7 +1491,8 @@ int HttpTransactionWinHttp::DidReceiveHeaders() {
// From experimentation, it appears that WinHttp translates non-ASCII bytes
// found in the response headers to UTF-16 assuming that they are encoded
// using the default system charset. We attempt to undo that here.
- response_.headers = new HttpResponseHeaders(WideToNativeMB(raw_headers));
+ response_.headers =
+ new HttpResponseHeaders(base::SysWideToNativeMB(raw_headers));
// WinHTTP truncates a response longer than 2GB. Perhaps it stores the
// response's content length in a signed 32-bit integer. We fail rather