Skip to content

Commit

Permalink
Fix the data reduction proxy builder for Cronet
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
tbansal authored and Commit bot committed Dec 1, 2016
1 parent 468ed78 commit 1b81c58
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,7 @@ class DataReductionProxyBypassProtocolEndToEndTest : public testing::Test {
.WithMockClientSocketFactory(mock_socket_factory_.get())
.WithURLRequestContext(context_.get())
.Build();
proxy_delegate_ =
drp_test_context_->io_data()->CreateProxyDelegateForTesting();
proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate();
context_->set_proxy_delegate(proxy_delegate_.get());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ class DataReductionProxyBypassStatsEndToEndTest : public testing::Test {
.Build();
drp_test_context_->AttachToURLRequestContext(&context_storage_);
context_.set_client_socket_factory(&mock_socket_factory_);
proxy_delegate_ =
drp_test_context_->io_data()->CreateProxyDelegateForTesting();
proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate();
context_.set_proxy_delegate(proxy_delegate_.get());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class DataReductionProxyConfigServiceClientTest : public testing::Test {

context_->set_client_socket_factory(mock_socket_factory_.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_->Init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ class DataReductionProxyDelegateTest : public testing::Test {
network_change_notifier_.reset(net::NetworkChangeNotifier::CreateMock());
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_.Init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ class DataReductionProxyInterceptorEndToEndTest : public testing::Test {
.Build();
drp_test_context_->AttachToURLRequestContext(&context_storage_);
context_.set_client_socket_factory(&mock_socket_factory_);
proxy_delegate_ =
drp_test_context_->io_data()->CreateProxyDelegateForTesting();
proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate();
context_.set_proxy_delegate(proxy_delegate_.get());
context_.Init();
drp_test_context_->EnableDataReductionProxyWithSecureProxyCheckSuccess();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ DataReductionProxyIOData::CreateNetworkDelegate(
}

std::unique_ptr<DataReductionProxyDelegate>
DataReductionProxyIOData::CreateProxyDelegateForTesting() const {
DataReductionProxyIOData::CreateProxyDelegate() const {
DCHECK(io_task_runner_->BelongsToCurrentThread());
return base::MakeUnique<DataReductionProxyDelegate>(
config_.get(), configurator_.get(), event_creator_.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
std::unique_ptr<net::NetworkDelegate> wrapped_network_delegate,
bool track_proxy_bypass_statistics);

std::unique_ptr<DataReductionProxyDelegate> CreateProxyDelegateForTesting()
const;
std::unique_ptr<DataReductionProxyDelegate> CreateProxyDelegate() const;

// Sets user defined preferences for how the Data Reduction Proxy
// configuration should be set. |at_startup| is true only
Expand Down

0 comments on commit 1b81c58

Please sign in to comment.