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

Unified Diff: components/gcm_driver/crypto/gcm_message_cryptographer.cc

Issue 1485023003: Misc truncation fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes to four more components/content files Created 5 years 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 | « chrome/test/chromedriver/util.cc ('k') | components/history/core/browser/history_backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/crypto/gcm_message_cryptographer.cc
diff --git a/components/gcm_driver/crypto/gcm_message_cryptographer.cc b/components/gcm_driver/crypto/gcm_message_cryptographer.cc
index 574a25764b00cc5ed0baa6af34b6c1119b5c28e0..b5cbcea294a2f3beadc3d423597fe556b725bcc1 100644
--- a/components/gcm_driver/crypto/gcm_message_cryptographer.cc
+++ b/components/gcm_driver/crypto/gcm_message_cryptographer.cc
@@ -54,11 +54,13 @@ std::string InfoForContentEncoding(
break;
}
- uint16_t local_len = base::HostToNet16(recipient_public_key.size());
+ uint16_t local_len =
+ base::HostToNet16(static_cast<uint16_t>(recipient_public_key.size()));
info_stream.write(reinterpret_cast<char*>(&local_len), sizeof(local_len));
info_stream << recipient_public_key;
- uint16_t peer_len = base::HostToNet16(sender_public_key.size());
+ uint16_t peer_len =
+ base::HostToNet16(static_cast<uint16_t>(sender_public_key.size()));
info_stream.write(reinterpret_cast<char*>(&peer_len), sizeof(peer_len));
info_stream << sender_public_key;
« no previous file with comments | « chrome/test/chromedriver/util.cc ('k') | components/history/core/browser/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698