OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 package org.chromium.net.impl; | 5 package org.chromium.net.impl; |
6 | 6 |
7 import android.support.annotation.Nullable; | 7 import android.support.annotation.Nullable; |
8 | 8 |
9 import org.chromium.base.VisibleForTesting; | 9 import org.chromium.base.VisibleForTesting; |
10 import org.chromium.net.RequestFinishedInfo; | 10 import org.chromium.net.RequestFinishedInfo; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 long sendingEndMs, long pushStartMs, long pushEndMs, long responseSt
artMs, | 92 long sendingEndMs, long pushStartMs, long pushEndMs, long responseSt
artMs, |
93 long responseEndMs, boolean socketReused, long sentBytesCount, | 93 long responseEndMs, boolean socketReused, long sentBytesCount, |
94 long receivedBytesCount) { | 94 long receivedBytesCount) { |
95 // Check that no end times are before corresponding start times, | 95 // Check that no end times are before corresponding start times, |
96 // or exist when start time doesn't. | 96 // or exist when start time doesn't. |
97 assert checkOrder(dnsStartMs, dnsEndMs); | 97 assert checkOrder(dnsStartMs, dnsEndMs); |
98 assert checkOrder(connectStartMs, connectEndMs); | 98 assert checkOrder(connectStartMs, connectEndMs); |
99 assert checkOrder(sslStartMs, sslEndMs); | 99 assert checkOrder(sslStartMs, sslEndMs); |
100 assert checkOrder(sendingStartMs, sendingEndMs); | 100 assert checkOrder(sendingStartMs, sendingEndMs); |
101 assert checkOrder(pushStartMs, pushEndMs); | 101 assert checkOrder(pushStartMs, pushEndMs); |
102 assert checkOrder(responseStartMs, responseEndMs); | 102 // responseEnd always exists, so just check that it's after start |
| 103 assert responseEndMs >= responseStartMs; |
103 // Spot-check some of the other orderings | 104 // Spot-check some of the other orderings |
104 assert dnsStartMs >= requestStartMs || dnsStartMs == -1; | 105 assert dnsStartMs >= requestStartMs || dnsStartMs == -1; |
105 assert sendingStartMs >= requestStartMs || sendingStartMs == -1; | 106 assert sendingStartMs >= requestStartMs || sendingStartMs == -1; |
106 assert sslStartMs >= connectStartMs || sslStartMs == -1; | 107 assert sslStartMs >= connectStartMs || sslStartMs == -1; |
107 assert responseStartMs >= sendingStartMs || responseStartMs == -1; | 108 assert responseStartMs >= sendingStartMs || responseStartMs == -1; |
108 mRequestStartMs = requestStartMs; | 109 mRequestStartMs = requestStartMs; |
109 mDnsStartMs = dnsStartMs; | 110 mDnsStartMs = dnsStartMs; |
110 mDnsEndMs = dnsEndMs; | 111 mDnsEndMs = dnsEndMs; |
111 mConnectStartMs = connectStartMs; | 112 mConnectStartMs = connectStartMs; |
112 mConnectEndMs = connectEndMs; | 113 mConnectEndMs = connectEndMs; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 @Nullable | 219 @Nullable |
219 public Long getSentBytesCount() { | 220 public Long getSentBytesCount() { |
220 return mSentBytesCount; | 221 return mSentBytesCount; |
221 } | 222 } |
222 | 223 |
223 @Nullable | 224 @Nullable |
224 public Long getReceivedBytesCount() { | 225 public Long getReceivedBytesCount() { |
225 return mReceivedBytesCount; | 226 return mReceivedBytesCount; |
226 } | 227 } |
227 } | 228 } |
OLD | NEW |