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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 1680893002: Moving proxy resolution logic out of NetworkDelegate and into ProxyDelegate for DataReductionProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: net/url_request/url_request_test_util.cc
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 60f0f36c8b73fb273257b8ad4fbd52387ad47656..4b59ec2c2ab8b1412c37689bf75fb3e7e77662eb 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -46,27 +46,29 @@ const int kStageResponseStarted = 1 << 6;
const int kStageCompletedSuccess = 1 << 7;
const int kStageCompletedError = 1 << 8;
const int kStageURLRequestDestroyed = 1 << 9;
const int kStageDestruction = 1 << 10;
} // namespace
TestURLRequestContext::TestURLRequestContext()
: initialized_(false),
client_socket_factory_(NULL),
+ proxy_delegate_(NULL),
context_storage_(this) {
Init();
}
TestURLRequestContext::TestURLRequestContext(bool delay_initialization)
: initialized_(false),
client_socket_factory_(NULL),
bengr 2016/02/08 23:23:30 Suggest changing every NULL to a nullptr.
RyanSturm 2016/02/09 00:46:03 Done.
+ proxy_delegate_(NULL),
context_storage_(this) {
if (!delay_initialization)
Init();
}
TestURLRequestContext::~TestURLRequestContext() {
DCHECK(initialized_);
AssertNoURLRequests();
}
@@ -92,23 +94,26 @@ void TestURLRequestContext::Init() {
}
if (!http_server_properties()) {
context_storage_.set_http_server_properties(
scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
}
if (http_transaction_factory()) {
// Make sure we haven't been passed an object we're not going to use.
EXPECT_FALSE(client_socket_factory_);
} else {
HttpNetworkSession::Params params;
- if (http_network_session_params_)
+
+ if (http_network_session_params_) {
bengr 2016/02/08 23:23:30 Remove curly braces. Chromium doesn't use them on
RyanSturm 2016/02/09 00:46:03 Done.
params = *http_network_session_params_;
+ }
params.client_socket_factory = client_socket_factory();
+ params.proxy_delegate = proxy_delegate();
params.host_resolver = host_resolver();
params.cert_verifier = cert_verifier();
params.transport_security_state = transport_security_state();
params.proxy_service = proxy_service();
params.ssl_config_service = ssl_config_service();
params.http_auth_handler_factory = http_auth_handler_factory();
params.network_delegate = network_delegate();
params.http_server_properties = http_server_properties();
params.net_log = net_log();
params.channel_id_service = channel_id_service();

Powered by Google App Engine
This is Rietveld 408576698