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

Unified Diff: net/http/http_transaction_test_util.cc

Issue 2506303002: Revert of Add a NetworkQualityEstimator to TestURLRequestContext. (Closed)
Patch Set: 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/http/http_transaction_test_util.h ('k') | net/nqe/network_quality_estimator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_transaction_test_util.cc
diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc
index 43500ccf7d1482b7c18d58e252f3d2bbb2f6182c..556033a0580d4a5a9b77875fb3ee2a3e3d441fa3 100644
--- a/net/http/http_transaction_test_util.cc
+++ b/net/http/http_transaction_test_util.cc
@@ -15,6 +15,7 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/clock.h"
+#include "base/time/time.h"
#include "net/base/load_flags.h"
#include "net/base/load_timing_info.h"
#include "net/base/net_errors.h"
@@ -245,7 +246,6 @@
if (request_)
return ERR_FAILED;
- start_time_ = base::TimeTicks::Now();
request_ = request;
return StartInternal(request, callback, net_log);
}
@@ -366,17 +366,17 @@
// gets a new socket.
load_timing_info->socket_reused = false;
load_timing_info->socket_log_id = socket_log_id_;
- load_timing_info->connect_timing.connect_start = start_time_;
- load_timing_info->connect_timing.connect_end = start_time_;
- load_timing_info->send_start = start_time_;
- load_timing_info->send_end = start_time_;
+ load_timing_info->connect_timing.connect_start = base::TimeTicks::Now();
+ load_timing_info->connect_timing.connect_end = base::TimeTicks::Now();
+ load_timing_info->send_start = base::TimeTicks::Now();
+ load_timing_info->send_end = base::TimeTicks::Now();
} else {
// If there's no valid socket ID, just use the generic socket reused values.
// No tests currently depend on this, just should not match the values set
// by a cache hit.
load_timing_info->socket_reused = true;
- load_timing_info->send_start = start_time_;
- load_timing_info->send_end = start_time_;
+ load_timing_info->send_start = base::TimeTicks::Now();
+ load_timing_info->send_end = base::TimeTicks::Now();
}
return true;
}
« no previous file with comments | « net/http/http_transaction_test_util.h ('k') | net/nqe/network_quality_estimator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698