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

Unified Diff: net/tools/quic/quic_socket_utils.cc

Issue 2229553003: Deprecate --quic_socket_walltimestamps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@128998762
Patch Set: Created 4 years, 4 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 | « net/tools/quic/quic_socket_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_socket_utils.cc
diff --git a/net/tools/quic/quic_socket_utils.cc b/net/tools/quic/quic_socket_utils.cc
index 28a6f2588b5bb4302e5cdc0e9a9a4127d4a45623..327d95606fdf1f21b3808915e588cb1038e3a2f8 100644
--- a/net/tools/quic/quic_socket_utils.cc
+++ b/net/tools/quic/quic_socket_utils.cc
@@ -27,9 +27,7 @@ namespace net {
void QuicSocketUtils::GetAddressAndTimestampFromMsghdr(
struct msghdr* hdr,
IPAddress* address,
- QuicTime* timestamp,
- QuicWallTime* walltimestamp,
- bool latched_walltimestamps) {
+ QuicWallTime* walltimestamp) {
if (hdr->msg_controllen > 0) {
for (cmsghdr* cmsg = CMSG_FIRSTHDR(hdr); cmsg != nullptr;
cmsg = CMSG_NXTHDR(hdr, cmsg)) {
@@ -52,12 +50,7 @@ void QuicSocketUtils::GetAddressAndTimestampFromMsghdr(
timespec* ts = &lts->systime;
int64_t usec = (static_cast<int64_t>(ts->tv_sec) * 1000 * 1000) +
(static_cast<int64_t>(ts->tv_nsec) / 1000);
- if (latched_walltimestamps) {
- *walltimestamp = QuicWallTime::FromUNIXMicroseconds(usec);
- } else {
- *timestamp =
- QuicTime::Zero() + QuicTime::Delta::FromMicroseconds(usec);
- }
+ *walltimestamp = QuicWallTime::FromUNIXMicroseconds(usec);
}
}
}
@@ -122,9 +115,7 @@ int QuicSocketUtils::ReadPacket(int fd,
size_t buf_len,
QuicPacketCount* dropped_packets,
IPAddress* self_address,
- QuicTime* timestamp,
QuicWallTime* walltimestamp,
- bool latched_walltimestamps,
IPEndPoint* peer_address) {
DCHECK(peer_address != nullptr);
char cbuf[kSpaceForCmsg];
@@ -176,13 +167,7 @@ int QuicSocketUtils::ReadPacket(int fd,
walltimestamp = &stack_walltimestamp;
}
- QuicTime stack_timestamp = QuicTime::Zero();
- if (timestamp == nullptr) {
- timestamp = &stack_timestamp;
- }
-
- GetAddressAndTimestampFromMsghdr(&hdr, self_address, timestamp, walltimestamp,
- latched_walltimestamps);
+ GetAddressAndTimestampFromMsghdr(&hdr, self_address, walltimestamp);
if (raw_address.ss_family == AF_INET) {
CHECK(peer_address->FromSockAddr(
« no previous file with comments | « net/tools/quic/quic_socket_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698