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 bb89e7e023897fe271a5b79d2c07d5ba665b05d0..e76a551838c4f15ad2e7aca667c31b1a8971df68 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; |