| Index: net/socket/client_socket_handle.h
|
| ===================================================================
|
| --- net/socket/client_socket_handle.h (revision 174803)
|
| +++ net/socket/client_socket_handle.h (working copy)
|
| @@ -19,10 +19,13 @@
|
| #include "net/base/request_priority.h"
|
| #include "net/http/http_response_info.h"
|
| #include "net/socket/client_socket_pool.h"
|
| +#include "net/socket/connect_timing.h"
|
| #include "net/socket/stream_socket.h"
|
|
|
| namespace net {
|
|
|
| +struct LoadTimingInfo;
|
| +
|
| // A container for a StreamSocket.
|
| //
|
| // The handle's |group_name| uniquely identifies the origin and type of the
|
| @@ -106,6 +109,14 @@
|
| // Returns the time between Init() and when is_initialized() becomes true.
|
| base::TimeDelta setup_time() const { return setup_time_; }
|
|
|
| + // Sets the portion of LoadTimingInfo related to connection establishment, and
|
| + // the socket id. |is_reused| is needed because the handle may not have full
|
| + // reuse information. |load_timing_info| must have all default values when
|
| + // called. Returns false and makes no changes to |load_timing_info| when
|
| + // |socket_| is NULL.
|
| + bool GetLoadTimingInfo(bool is_reused,
|
| + LoadTimingInfo* load_timing_info) const;
|
| +
|
| // Used by ClientSocketPool to initialize the ClientSocketHandle.
|
| void set_is_reused(bool is_reused) { is_reused_ = is_reused; }
|
| void set_socket(StreamSocket* s) { socket_.reset(s); }
|
| @@ -150,6 +161,10 @@
|
| return UNUSED_IDLE;
|
| }
|
| }
|
| + const ConnectTiming& connect_timing() const { return connect_timing_; }
|
| + void set_connect_timing(const ConnectTiming& connect_timing) {
|
| + connect_timing_ = connect_timing;
|
| + }
|
|
|
| private:
|
| // Called on asynchronous completion of an Init() request.
|
| @@ -185,6 +200,9 @@
|
|
|
| NetLog::Source requesting_source_;
|
|
|
| + // Timing information is set when a connection is successfully established.
|
| + ConnectTiming connect_timing_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ClientSocketHandle);
|
| };
|
|
|
|
|