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

Unified Diff: net/socket/client_socket_pool_base.h

Issue 2533063002: Fix Net.Socket.IdleSocketTimeSaving histogram (Closed)
Patch Set: self review Created 4 years, 1 month 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_pool.h ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base.h
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index 192602186f285b90791dab45319ad90950dfde70..f539ad43b968fdac8b1fd82a36891d569c81d119 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -277,7 +277,8 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
// See ClientSocketPool::ReleaseSocket for documentation on this function.
void ReleaseSocket(const std::string& group_name,
std::unique_ptr<StreamSocket> socket,
- int id);
+ int id,
+ const LoadTimingInfo::ConnectTiming& connect_timing);
// See ClientSocketPool::FlushWithError for documentation on this function.
void FlushWithError(int error);
@@ -370,6 +371,8 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
StreamSocket* socket;
base::TimeTicks start_time;
+ // ConnectTiming of the connection establishment.
+ LoadTimingInfo::ConnectTiming connect_timing;
};
typedef PriorityQueue<const Request*> RequestQueue;
@@ -552,7 +555,10 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
const NetLogWithSource& net_log);
// Adds |socket| to the list of idle sockets for |group|.
- void AddIdleSocket(std::unique_ptr<StreamSocket> socket, Group* group);
+ // |connect_timing| is the connect timing of the connection establishment;
+ void AddIdleSocket(std::unique_ptr<StreamSocket> socket,
+ Group* group,
+ const LoadTimingInfo::ConnectTiming& connect_timing);
// Iterates through |group_map_|, canceling all ConnectJobs and deleting
// groups if they are no longer needed.
@@ -772,8 +778,10 @@ class ClientSocketPoolBase {
void ReleaseSocket(const std::string& group_name,
std::unique_ptr<StreamSocket> socket,
- int id) {
- return helper_.ReleaseSocket(group_name, std::move(socket), id);
+ int id,
+ const LoadTimingInfo::ConnectTiming& connect_timing) {
+ return helper_.ReleaseSocket(group_name, std::move(socket), id,
+ connect_timing);
}
void FlushWithError(int error) { helper_.FlushWithError(error); }
« no previous file with comments | « net/socket/client_socket_pool.h ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698