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

Unified Diff: net/socket/client_socket_handle.cc

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/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_handle.cc
===================================================================
--- net/socket/client_socket_handle.cc (revision 175289)
+++ net/socket/client_socket_handle.cc (working copy)
@@ -62,6 +62,7 @@
idle_time_ = base::TimeDelta();
init_time_ = base::TimeTicks();
setup_time_ = base::TimeDelta();
+ connect_timing_ = LoadTimingInfo::ConnectTiming();
pool_id_ = -1;
}
@@ -103,6 +104,24 @@
}
}
+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->connect_timing = connect_timing_;
+ return true;
+}
+
void ClientSocketHandle::OnIOComplete(int result) {
CompletionCallback callback = user_callback_;
user_callback_.Reset();
« no previous file with comments | « net/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698