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

Unified Diff: media/cast/net/pacing/paced_sender.cc

Issue 1684793003: Add comments for struct members that were changed from size_t to uin32_t or uint64_t for IPC safety. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « media/cast/logging/logging_defines.h ('k') | media/cast/receiver/frame_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/net/pacing/paced_sender.cc
diff --git a/media/cast/net/pacing/paced_sender.cc b/media/cast/net/pacing/paced_sender.cc
index 108490150257360f752026bf53d2c178a149c521..6de395602286cf25abb4694345715eb929b617e9 100644
--- a/media/cast/net/pacing/paced_sender.cc
+++ b/media/cast/net/pacing/paced_sender.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/debug/dump_without_crashing.h"
#include "base/message_loop/message_loop.h"
+#include "base/numerics/safe_conversions.h"
namespace media {
namespace cast {
@@ -354,7 +355,7 @@ void PacedSender::LogPacketEvent(const Packet& packet, CastLoggingEvent type) {
success &= reader.Skip(2);
success &= reader.ReadU16(&event.packet_id);
success &= reader.ReadU16(&event.max_packet_id);
- event.size = packet.size();
+ event.size = base::checked_cast<uint32_t>(packet.size());
DCHECK(success);
}
« no previous file with comments | « media/cast/logging/logging_defines.h ('k') | media/cast/receiver/frame_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698