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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc

Issue 2577413002: Revert of Cleanup DataReductionProxy (DRP) Brotli code (Closed)
Patch Set: Created 4 years 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 | « components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
index f31ebd95a095cdf9b03049b1beb32b987c9640be..bb39ab64fe7fe810ab6fb6ebcd771688faef0c7c 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
@@ -218,14 +218,13 @@
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
std::unique_ptr<DataReductionProxyConfig> config,
std::unique_ptr<DataReductionProxyEventCreator> event_creator,
- std::unique_ptr<TestDataReductionProxyRequestOptions> request_options,
+ std::unique_ptr<DataReductionProxyRequestOptions> request_options,
std::unique_ptr<DataReductionProxyConfigurator> configurator,
net::NetLog* net_log,
bool enabled)
: DataReductionProxyIOData(),
service_set_(false),
- pingback_reporting_fraction_(0.0f),
- test_request_options_(request_options.get()) {
+ pingback_reporting_fraction_(0.0f) {
io_task_runner_ = task_runner;
ui_task_runner_ = task_runner;
config_ = std::move(config);
@@ -444,15 +443,14 @@
event_creator.get()));
}
- std::unique_ptr<TestDataReductionProxyRequestOptions> request_options;
-
+ std::unique_ptr<DataReductionProxyRequestOptions> request_options;
if (use_mock_request_options_) {
test_context_flags |= USE_MOCK_REQUEST_OPTIONS;
request_options.reset(
new MockDataReductionProxyRequestOptions(client_, config.get()));
} else {
- request_options.reset(new TestDataReductionProxyRequestOptions(
- client_, "1.2.3.4", config.get()));
+ request_options.reset(
+ new DataReductionProxyRequestOptions(client_, config.get()));
}
std::unique_ptr<DataReductionProxySettings> settings(
@@ -615,7 +613,8 @@
}
void DataReductionProxyTestContext::AttachToURLRequestContext(
- net::URLRequestContextStorage* request_context_storage) const {
+ net::URLRequestContextStorage* request_context_storage,
+ bool exclude_chrome_proxy_header_for_testing) const {
DCHECK(request_context_storage);
// |request_context_storage| takes ownership of the network delegate.
@@ -623,6 +622,8 @@
io_data()->CreateNetworkDelegate(
base::MakeUnique<net::TestNetworkDelegate>(), true);
+ network_delegate->exclude_chrome_proxy_header_for_testing_ =
+ exclude_chrome_proxy_header_for_testing;
request_context_storage->set_network_delegate(std::move(network_delegate));
request_context_storage->set_job_factory(
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698