| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/net/load_timing_observer.h" | 5 #include "chrome/browser/net/load_timing_observer.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "net/base/load_flags.h" | 9 #include "net/base/load_flags.h" |
| 10 #include "net/url_request/url_request_netlog_params.h" | 10 #include "net/url_request/url_request_netlog_params.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 if (!record->socket_reused) { | 154 if (!record->socket_reused) { |
| 155 SocketToRecordMap::iterator it = | 155 SocketToRecordMap::iterator it = |
| 156 socket_to_record_.find(record->socket_log_id); | 156 socket_to_record_.find(record->socket_log_id); |
| 157 if (it != socket_to_record_.end() && !it->second.ssl_start.is_null()) { | 157 if (it != socket_to_record_.end() && !it->second.ssl_start.is_null()) { |
| 158 timing.ssl_start = TimeTicksToOffset(it->second.ssl_start, record); | 158 timing.ssl_start = TimeTicksToOffset(it->second.ssl_start, record); |
| 159 timing.ssl_end = TimeTicksToOffset(it->second.ssl_end, record); | 159 timing.ssl_end = TimeTicksToOffset(it->second.ssl_end, record); |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 break; | 162 break; |
| 163 case net::NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST: | 163 case net::NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST: |
| 164 case net::NetLog::TYPE_SPDY_TRANSACTION_SEND_REQUEST: | |
| 165 if (is_begin) | 164 if (is_begin) |
| 166 timing.send_start = TimeTicksToOffset(time, record); | 165 timing.send_start = TimeTicksToOffset(time, record); |
| 167 else if (is_end) | 166 else if (is_end) |
| 168 timing.send_end = TimeTicksToOffset(time, record); | 167 timing.send_end = TimeTicksToOffset(time, record); |
| 169 break; | 168 break; |
| 170 case net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS: | 169 case net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS: |
| 171 case net::NetLog::TYPE_SPDY_TRANSACTION_READ_HEADERS: | |
| 172 if (is_begin) | 170 if (is_begin) |
| 173 timing.receive_headers_start = TimeTicksToOffset(time, record); | 171 timing.receive_headers_start = TimeTicksToOffset(time, record); |
| 174 else if (is_end) | 172 else if (is_end) |
| 175 timing.receive_headers_end = TimeTicksToOffset(time, record); | 173 timing.receive_headers_end = TimeTicksToOffset(time, record); |
| 176 break; | 174 break; |
| 177 default: | 175 default: |
| 178 break; | 176 break; |
| 179 } | 177 } |
| 180 } | 178 } |
| 181 | 179 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 if (it == socket_to_record_.end()) | 251 if (it == socket_to_record_.end()) |
| 254 return; | 252 return; |
| 255 | 253 |
| 256 if (type == net::NetLog::TYPE_SSL_CONNECT) { | 254 if (type == net::NetLog::TYPE_SSL_CONNECT) { |
| 257 if (is_begin) | 255 if (is_begin) |
| 258 it->second.ssl_start = time; | 256 it->second.ssl_start = time; |
| 259 else if (is_end) | 257 else if (is_end) |
| 260 it->second.ssl_end = time; | 258 it->second.ssl_end = time; |
| 261 } | 259 } |
| 262 } | 260 } |
| OLD | NEW |