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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 2924163003: Remove socket performance watcher factory from URL request context builder (Closed)
Patch Set: ps Created 3 years, 6 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/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 4851b2f0512a2599f07a231471881f5ceced3158..85a19f401ad5d3bb124fdcd8a7de6a78df4321ff 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -210,8 +210,7 @@ URLRequestContextBuilder::URLRequestContextBuilder()
cookie_store_set_by_client_(false),
net_log_(nullptr),
pac_quick_check_enabled_(true),
- pac_sanitize_url_policy_(ProxyService::SanitizeUrlPolicy::SAFE),
- socket_performance_watcher_factory_(nullptr) {
+ pac_sanitize_url_policy_(ProxyService::SanitizeUrlPolicy::SAFE) {
}
URLRequestContextBuilder::~URLRequestContextBuilder() {}
@@ -236,6 +235,11 @@ void URLRequestContextBuilder::SetHttpNetworkSessionComponents(
session_context->channel_id_service = request_context->channel_id_service();
session_context->network_quality_provider =
request_context->network_quality_estimator();
+ if (request_context->network_quality_estimator()) {
+ session_context->socket_performance_watcher_factory =
+ request_context->network_quality_estimator()
+ ->GetSocketPerformanceWatcherFactory();
+ }
}
void URLRequestContextBuilder::EnableHttpCache(const HttpCacheParams& params) {
@@ -424,11 +428,6 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
network_session_context.proxy_delegate = proxy_delegate_.get();
storage->set_proxy_delegate(std::move(proxy_delegate_));
}
- if (socket_performance_watcher_factory_) {
- network_session_context.socket_performance_watcher_factory =
- socket_performance_watcher_factory_;
- DCHECK(network_session_context.network_quality_provider);
- }
storage->set_http_network_session(base::MakeUnique<HttpNetworkSession>(
http_network_session_params_, network_session_context));
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698