| Index: net/socket/client_socket_handle.cc
|
| ===================================================================
|
| --- net/socket/client_socket_handle.cc (revision 174803)
|
| +++ net/socket/client_socket_handle.cc (working copy)
|
| @@ -9,6 +9,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/logging.h"
|
| +#include "net/base/load_timing_info.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/socket/client_socket_pool.h"
|
| #include "net/socket/client_socket_pool_histograms.h"
|
| @@ -62,6 +63,7 @@
|
| idle_time_ = base::TimeDelta();
|
| init_time_ = base::TimeTicks();
|
| setup_time_ = base::TimeDelta();
|
| + connect_timing_ = ConnectTiming();
|
| pool_id_ = -1;
|
| }
|
|
|
| @@ -103,6 +105,29 @@
|
| }
|
| }
|
|
|
| +bool ClientSocketHandle::GetLoadTimingInfo(
|
| + bool is_reused,
|
| + LoadTimingInfo* load_timing_info) const {
|
| + // Only return load timing information when there's a socket.
|
| + if (!socket_)
|
| + return false;
|
| +
|
| + load_timing_info->socket_log_id = socket_->NetLog().source().id;
|
| + load_timing_info->socket_reused = is_reused;
|
| +
|
| + // No times if the socket is reused.
|
| + if (is_reused)
|
| + return true;
|
| +
|
| + load_timing_info->dns_start = connect_timing_.dns_start;
|
| + load_timing_info->dns_end = connect_timing_.dns_end;
|
| + load_timing_info->connect_start = connect_timing_.connect_start;
|
| + load_timing_info->connect_end = connect_timing_.connect_end;
|
| + load_timing_info->ssl_start = connect_timing_.ssl_start;
|
| + load_timing_info->ssl_end = connect_timing_.ssl_end;
|
| + return true;
|
| +}
|
| +
|
| void ClientSocketHandle::OnIOComplete(int result) {
|
| CompletionCallback callback = user_callback_;
|
| user_callback_.Reset();
|
|
|