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

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

Issue 2252113004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc ('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 bef5d0969d1b8fa50daa2586d029dadcc2eab75a..ae6e0fd8ed5e0e8c97f8c72ebfd6da03b06f8e76 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
@@ -205,7 +205,7 @@ MockDataReductionProxyService::MockDataReductionProxyService(
: DataReductionProxyService(settings,
prefs,
request_context,
- base::WrapUnique(new TestDataStore()),
+ base::MakeUnique<TestDataStore>(),
task_runner,
task_runner,
task_runner,
@@ -581,14 +581,14 @@ std::unique_ptr<DataReductionProxyService>
DataReductionProxyTestContext::CreateDataReductionProxyServiceInternal(
DataReductionProxySettings* settings) {
if (test_context_flags_ & DataReductionProxyTestContext::USE_MOCK_SERVICE) {
- return base::WrapUnique(new MockDataReductionProxyService(
+ return base::MakeUnique<MockDataReductionProxyService>(
settings, simple_pref_service_.get(), request_context_getter_.get(),
- task_runner_));
+ task_runner_);
} else {
- return base::WrapUnique(new DataReductionProxyService(
+ return base::MakeUnique<DataReductionProxyService>(
settings, simple_pref_service_.get(), request_context_getter_.get(),
base::WrapUnique(new TestDataStore()), task_runner_, task_runner_,
- task_runner_, base::TimeDelta()));
+ task_runner_, base::TimeDelta());
}
}
@@ -599,13 +599,13 @@ void DataReductionProxyTestContext::AttachToURLRequestContext(
// |request_context_storage| takes ownership of the network delegate.
request_context_storage->set_network_delegate(
io_data()->CreateNetworkDelegate(
- base::WrapUnique(new net::TestNetworkDelegate()), true));
+ base::MakeUnique<net::TestNetworkDelegate>(), true));
request_context_storage->set_job_factory(
- base::WrapUnique(new net::URLRequestInterceptingJobFactory(
+ base::MakeUnique<net::URLRequestInterceptingJobFactory>(
std::unique_ptr<net::URLRequestJobFactory>(
new net::URLRequestJobFactoryImpl()),
- io_data()->CreateInterceptor())));
+ io_data()->CreateInterceptor()));
}
void DataReductionProxyTestContext::
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698