Commit 1b81c589 authored by tbansal's avatar tbansal Committed by Commit bot

Fix the data reduction proxy builder for Cronet

This is a partial revert of https://codereview.chromium.org/2504963004
which broke Cronet data reduction proxy builder. The original CL
passed the CQ because the Cronet builder has been down for 4-5 days.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

BUG=669037
TBR=sclittle@chromium.org

Review-Url: https://codereview.chromium.org/2547513002
Cr-Commit-Position: refs/heads/master@{#435602}
parent 468ed78e
...@@ -778,8 +778,7 @@ class DataReductionProxyBypassProtocolEndToEndTest : public testing::Test { ...@@ -778,8 +778,7 @@ class DataReductionProxyBypassProtocolEndToEndTest : public testing::Test {
.WithMockClientSocketFactory(mock_socket_factory_.get()) .WithMockClientSocketFactory(mock_socket_factory_.get())
.WithURLRequestContext(context_.get()) .WithURLRequestContext(context_.get())
.Build(); .Build();
proxy_delegate_ = proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate();
drp_test_context_->io_data()->CreateProxyDelegateForTesting();
context_->set_proxy_delegate(proxy_delegate_.get()); context_->set_proxy_delegate(proxy_delegate_.get());
} }
......
...@@ -264,8 +264,7 @@ class DataReductionProxyBypassStatsEndToEndTest : public testing::Test { ...@@ -264,8 +264,7 @@ class DataReductionProxyBypassStatsEndToEndTest : public testing::Test {
.Build(); .Build();
drp_test_context_->AttachToURLRequestContext(&context_storage_); drp_test_context_->AttachToURLRequestContext(&context_storage_);
context_.set_client_socket_factory(&mock_socket_factory_); context_.set_client_socket_factory(&mock_socket_factory_);
proxy_delegate_ = proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate();
drp_test_context_->io_data()->CreateProxyDelegateForTesting();
context_.set_proxy_delegate(proxy_delegate_.get()); context_.set_proxy_delegate(proxy_delegate_.get());
} }
......
...@@ -145,7 +145,7 @@ class DataReductionProxyConfigServiceClientTest : public testing::Test { ...@@ -145,7 +145,7 @@ class DataReductionProxyConfigServiceClientTest : public testing::Test {
context_->set_client_socket_factory(mock_socket_factory_.get()); context_->set_client_socket_factory(mock_socket_factory_.get());
test_context_->AttachToURLRequestContext(context_storage_.get()); test_context_->AttachToURLRequestContext(context_storage_.get());
delegate_ = test_context_->io_data()->CreateProxyDelegateForTesting(); delegate_ = test_context_->io_data()->CreateProxyDelegate();
context_->set_proxy_delegate(delegate_.get()); context_->set_proxy_delegate(delegate_.get());
context_->Init(); context_->Init();
......
...@@ -620,7 +620,7 @@ class DataReductionProxyDelegateTest : public testing::Test { ...@@ -620,7 +620,7 @@ class DataReductionProxyDelegateTest : public testing::Test {
network_change_notifier_.reset(net::NetworkChangeNotifier::CreateMock()); network_change_notifier_.reset(net::NetworkChangeNotifier::CreateMock());
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
proxy_delegate_ = test_context_->io_data()->CreateProxyDelegateForTesting(); proxy_delegate_ = test_context_->io_data()->CreateProxyDelegate();
context_.set_proxy_delegate(proxy_delegate_.get()); context_.set_proxy_delegate(proxy_delegate_.get());
context_.Init(); context_.Init();
......
...@@ -291,8 +291,7 @@ class DataReductionProxyInterceptorEndToEndTest : public testing::Test { ...@@ -291,8 +291,7 @@ class DataReductionProxyInterceptorEndToEndTest : public testing::Test {
.Build(); .Build();
drp_test_context_->AttachToURLRequestContext(&context_storage_); drp_test_context_->AttachToURLRequestContext(&context_storage_);
context_.set_client_socket_factory(&mock_socket_factory_); context_.set_client_socket_factory(&mock_socket_factory_);
proxy_delegate_ = proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate();
drp_test_context_->io_data()->CreateProxyDelegateForTesting();
context_.set_proxy_delegate(proxy_delegate_.get()); context_.set_proxy_delegate(proxy_delegate_.get());
context_.Init(); context_.Init();
drp_test_context_->EnableDataReductionProxyWithSecureProxyCheckSuccess(); drp_test_context_->EnableDataReductionProxyWithSecureProxyCheckSuccess();
......
...@@ -249,7 +249,7 @@ DataReductionProxyIOData::CreateNetworkDelegate( ...@@ -249,7 +249,7 @@ DataReductionProxyIOData::CreateNetworkDelegate(
} }
std::unique_ptr<DataReductionProxyDelegate> std::unique_ptr<DataReductionProxyDelegate>
DataReductionProxyIOData::CreateProxyDelegateForTesting() const { DataReductionProxyIOData::CreateProxyDelegate() const {
DCHECK(io_task_runner_->BelongsToCurrentThread()); DCHECK(io_task_runner_->BelongsToCurrentThread());
return base::MakeUnique<DataReductionProxyDelegate>( return base::MakeUnique<DataReductionProxyDelegate>(
config_.get(), configurator_.get(), event_creator_.get(), config_.get(), configurator_.get(), event_creator_.get(),
......
...@@ -84,8 +84,7 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate { ...@@ -84,8 +84,7 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
std::unique_ptr<net::NetworkDelegate> wrapped_network_delegate, std::unique_ptr<net::NetworkDelegate> wrapped_network_delegate,
bool track_proxy_bypass_statistics); bool track_proxy_bypass_statistics);
std::unique_ptr<DataReductionProxyDelegate> CreateProxyDelegateForTesting() std::unique_ptr<DataReductionProxyDelegate> CreateProxyDelegate() const;
const;
// Sets user defined preferences for how the Data Reduction Proxy // Sets user defined preferences for how the Data Reduction Proxy
// configuration should be set. |at_startup| is true only // configuration should be set. |at_startup| is true only
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment