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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky 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 "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 prefs->GetBoolean(prefs::kDataSaverEnabled) || 78 prefs->GetBoolean(prefs::kDataSaverEnabled) ||
79 data_reduction_proxy::params::ShouldForceEnableDataReductionProxy(); 79 data_reduction_proxy::params::ShouldForceEnableDataReductionProxy();
80 std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> 80 std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData>
81 data_reduction_proxy_io_data( 81 data_reduction_proxy_io_data(
82 new data_reduction_proxy::DataReductionProxyIOData( 82 new data_reduction_proxy::DataReductionProxyIOData(
83 DataReductionProxyChromeSettings::GetClient(), flags, net_log, 83 DataReductionProxyChromeSettings::GetClient(), flags, net_log,
84 io_task_runner, ui_task_runner, enabled, GetUserAgent(), 84 io_task_runner, ui_task_runner, enabled, GetUserAgent(),
85 version_info::GetChannelString(chrome::GetChannel()))); 85 version_info::GetChannelString(chrome::GetChannel())));
86 86
87 data_reduction_proxy_io_data->set_lofi_decider( 87 data_reduction_proxy_io_data->set_lofi_decider(
88 base::WrapUnique(new data_reduction_proxy::ContentLoFiDecider())); 88 base::MakeUnique<data_reduction_proxy::ContentLoFiDecider>());
89 data_reduction_proxy_io_data->set_lofi_ui_service( 89 data_reduction_proxy_io_data->set_lofi_ui_service(
90 base::WrapUnique(new data_reduction_proxy::ContentLoFiUIService( 90 base::MakeUnique<data_reduction_proxy::ContentLoFiUIService>(
91 ui_task_runner, base::Bind(&OnLoFiResponseReceivedOnUI)))); 91 ui_task_runner, base::Bind(&OnLoFiResponseReceivedOnUI)));
92 data_reduction_proxy_io_data->set_data_usage_source_provider( 92 data_reduction_proxy_io_data->set_data_usage_source_provider(
93 base::WrapUnique(new ChromeDataUseGroupProvider())); 93 base::MakeUnique<ChromeDataUseGroupProvider>());
94 94
95 return data_reduction_proxy_io_data; 95 return data_reduction_proxy_io_data;
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor_browsertest.cc ('k') | chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698