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

Unified Diff: util/net/http_transport_win.cc

Issue 983103004: win: fixes for Windows x64 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: mac Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/net/http_multipart_builder.cc ('k') | util/win/process_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/net/http_transport_win.cc
diff --git a/util/net/http_transport_win.cc b/util/net/http_transport_win.cc
index 2fe89deb22ed165e3ac203e464aaa1065d98dcf0..2b6e372f50ff9b9ba4265d01f042e7a496f87b91 100644
--- a/util/net/http_transport_win.cc
+++ b/util/net/http_transport_win.cc
@@ -18,6 +18,7 @@
#include <winhttp.h>
#include "base/logging.h"
+#include "base/numerics/safe_conversions.h"
#include "base/scoped_generic.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -149,10 +150,11 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
for (const auto& pair : headers()) {
std::wstring header_string =
base::UTF8ToUTF16(pair.first) + L": " + base::UTF8ToUTF16(pair.second);
- if (!WinHttpAddRequestHeaders(request.get(),
- header_string.c_str(),
- header_string.size(),
- WINHTTP_ADDREQ_FLAG_ADD)) {
+ if (!WinHttpAddRequestHeaders(
+ request.get(),
+ header_string.c_str(),
+ base::checked_cast<DWORD>(header_string.size()),
+ WINHTTP_ADDREQ_FLAG_ADD)) {
LogErrorWinHttpMessage("WinHttpAddRequestHeaders");
return false;
}
@@ -178,8 +180,8 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
WINHTTP_NO_ADDITIONAL_HEADERS,
0,
&post_data[0],
- post_data.size(),
- post_data.size(),
+ base::checked_cast<DWORD>(post_data.size()),
+ base::checked_cast<DWORD>(post_data.size()),
0)) {
LogErrorWinHttpMessage("WinHttpSendRequest");
return false;
« no previous file with comments | « util/net/http_multipart_builder.cc ('k') | util/win/process_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698