 Chromium Code Reviews
 Chromium Code Reviews Issue 1345583004:
  Wire up transport sequence number and send time.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1345583004:
  Wire up transport sequence number and send time.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 // This file defines some basic types used by the P2P-related IPC | 5 // This file defines some basic types used by the P2P-related IPC | 
| 6 // messages. | 6 // messages. | 
| 7 | 7 | 
| 8 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 8 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 
| 9 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 9 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 
| 10 | 10 | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 } | 45 } | 
| 46 | 46 | 
| 47 std::string hostname; | 47 std::string hostname; | 
| 48 net::IPEndPoint ip_address; | 48 net::IPEndPoint ip_address; | 
| 49 }; | 49 }; | 
| 50 | 50 | 
| 51 // Stuct which keeps track of metrics during a send operation on P2P sockets. | 51 // Stuct which keeps track of metrics during a send operation on P2P sockets. | 
| 52 // Currently, it only carries packet_id but could be expanded to include | 52 // Currently, it only carries packet_id but could be expanded to include | 
| 53 // timestamps when packet arrives at various points. | 53 // timestamps when packet arrives at various points. | 
| 54 struct P2PSendPacketMetrics { | 54 struct P2PSendPacketMetrics { | 
| 55 P2PSendPacketMetrics() : packet_id(0) {} | 55 P2PSendPacketMetrics() | 
| 56 explicit P2PSendPacketMetrics(uint64_t packet_id) : packet_id(packet_id) {} | 56 : packet_id(0), transport_sequence_number(-1), send_time_ms(-1) {} | 
| 
Sergey Ulanov
2015/09/15 23:38:40
add default initializers where the members are def
 
Stefan
2015/09/17 12:39:24
Done.
 | |
| 57 P2PSendPacketMetrics(uint64_t packet_id, | |
| 58 int32_t transport_sequence_number, | |
| 59 int64_t send_time_ms) | |
| 
Sergey Ulanov
2015/09/15 23:38:40
use base::TimeTicks?
 
Stefan
2015/09/17 12:39:24
Done.
 | |
| 60 : packet_id(packet_id), | |
| 61 transport_sequence_number(transport_sequence_number), | |
| 62 send_time_ms(send_time_ms) {} | |
| 57 | 63 | 
| 58 uint64_t packet_id; | 64 uint64_t packet_id; | 
| 65 int32_t transport_sequence_number; // -1 if not set. | |
| 66 int64_t send_time_ms; // -1 if not set. | |
| 59 }; | 67 }; | 
| 60 | 68 | 
| 61 } // namespace content | 69 } // namespace content | 
| 62 | 70 | 
| 63 #endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 71 #endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 
| OLD | NEW |