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

Unified Diff: net/socket/socket_test_util.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_pool_base_unittest.cc ('k') | net/socket/socks_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.cc
===================================================================
--- net/socket/socket_test_util.cc (revision 175289)
+++ net/socket/socket_test_util.cc (working copy)
@@ -16,6 +16,7 @@
#include "net/base/address_family.h"
#include "net/base/address_list.h"
#include "net/base/auth.h"
+#include "net/base/load_timing_info.h"
#include "net/base/ssl_cert_request_info.h"
#include "net/base/ssl_info.h"
#include "net/http/http_network_session.h"
@@ -1537,6 +1538,16 @@
return;
if (rv == OK) {
handle_->set_socket(socket_.release());
+
+ // Needed for socket pool tests that layer other sockets on top of mock
+ // sockets.
+ LoadTimingInfo::ConnectTiming connect_timing;
+ base::TimeTicks now = base::TimeTicks::Now();
+ connect_timing.dns_start = now;
+ connect_timing.dns_end = now;
+ connect_timing.connect_start = now;
+ connect_timing.connect_end = now;
+ handle_->set_connect_timing(connect_timing);
} else {
socket_.reset();
}
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/socks_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698