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

Side by Side Diff: components/cronet/android/cronet_data_reduction_proxy.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/cronet/android/cronet_data_reduction_proxy.h" 5 #include "components/cronet/android/cronet_data_reduction_proxy.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 void CronetDataReductionProxy::Init(bool enable, 120 void CronetDataReductionProxy::Init(bool enable,
121 net::URLRequestContext* context) { 121 net::URLRequestContext* context) {
122 url_request_context_getter_ = 122 url_request_context_getter_ =
123 new net::TrivialURLRequestContextGetter( 123 new net::TrivialURLRequestContextGetter(
124 context, task_runner_); 124 context, task_runner_);
125 std::unique_ptr<data_reduction_proxy::DataReductionProxyService> 125 std::unique_ptr<data_reduction_proxy::DataReductionProxyService>
126 data_reduction_proxy_service( 126 data_reduction_proxy_service(
127 new data_reduction_proxy::DataReductionProxyService( 127 new data_reduction_proxy::DataReductionProxyService(
128 settings_.get(), prefs_.get(), url_request_context_getter_.get(), 128 settings_.get(), prefs_.get(), url_request_context_getter_.get(),
129 base::WrapUnique(new data_reduction_proxy::DataStore()), 129 base::MakeUnique<data_reduction_proxy::DataStore>(), task_runner_,
130 task_runner_, task_runner_, task_runner_, base::TimeDelta())); 130 task_runner_, task_runner_, base::TimeDelta()));
131 io_data_->SetDataReductionProxyService( 131 io_data_->SetDataReductionProxyService(
132 data_reduction_proxy_service->GetWeakPtr()); 132 data_reduction_proxy_service->GetWeakPtr());
133 settings_->InitDataReductionProxySettings( 133 settings_->InitDataReductionProxySettings(
134 kDataReductionProxyEnabled, prefs_.get(), io_data_.get(), 134 kDataReductionProxyEnabled, prefs_.get(), io_data_.get(),
135 std::move(data_reduction_proxy_service)); 135 std::move(data_reduction_proxy_service));
136 settings_->SetDataReductionProxyEnabled(enable); 136 settings_->SetDataReductionProxyEnabled(enable);
137 settings_->MaybeActivateDataReductionProxy(true); 137 settings_->MaybeActivateDataReductionProxy(true);
138 } 138 }
139 139
140 } // namespace cronet 140 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698