Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: net/socket/client_socket_handle.h

Issue 11428150: LoadTiming implementation in net, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix a header or two Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gyp ('k') | net/socket/client_socket_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_handle.h
===================================================================
--- net/socket/client_socket_handle.h (revision 175289)
+++ net/socket/client_socket_handle.h (working copy)
@@ -13,6 +13,7 @@
#include "base/time.h"
#include "net/base/completion_callback.h"
#include "net/base/load_states.h"
+#include "net/base/load_timing_info.h"
#include "net/base/net_errors.h"
#include "net/base/net_export.h"
#include "net/base/net_log.h"
@@ -106,6 +107,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 +159,12 @@
return UNUSED_IDLE;
}
}
+ const LoadTimingInfo::ConnectTiming& connect_timing() const {
+ return connect_timing_;
+ }
+ void set_connect_timing(const LoadTimingInfo::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.
+ LoadTimingInfo::ConnectTiming connect_timing_;
+
DISALLOW_COPY_AND_ASSIGN(ClientSocketHandle);
};
« no previous file with comments | « net/net.gyp ('k') | net/socket/client_socket_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698