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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_settings.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // On desktop we store Data Reduction Proxy prefs in memory, writing to disk 197 // On desktop we store Data Reduction Proxy prefs in memory, writing to disk
198 // every 60 minutes and on termination. Shutdown hooks must be added for 198 // every 60 minutes and on termination. Shutdown hooks must be added for
199 // Android and iOS in order for non-zero delays to be supported. 199 // Android and iOS in order for non-zero delays to be supported.
200 // (http://crbug.com/408264) 200 // (http://crbug.com/408264)
201 base::TimeDelta commit_delay = base::TimeDelta(); 201 base::TimeDelta commit_delay = base::TimeDelta();
202 #else 202 #else
203 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); 203 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60);
204 #endif 204 #endif
205 205
206 std::unique_ptr<data_reduction_proxy::DataReductionProxyService> service = 206 std::unique_ptr<data_reduction_proxy::DataReductionProxyService> service =
207 base::WrapUnique(new data_reduction_proxy::DataReductionProxyService( 207 base::MakeUnique<data_reduction_proxy::DataReductionProxyService>(
208 this, profile_prefs, request_context_getter, std::move(store), 208 this, profile_prefs, request_context_getter, std::move(store),
209 ui_task_runner, io_data->io_task_runner(), db_task_runner, 209 ui_task_runner, io_data->io_task_runner(), db_task_runner,
210 commit_delay)); 210 commit_delay);
211 data_reduction_proxy::DataReductionProxySettings:: 211 data_reduction_proxy::DataReductionProxySettings::
212 InitDataReductionProxySettings(data_reduction_proxy_enabled_pref_name_, 212 InitDataReductionProxySettings(data_reduction_proxy_enabled_pref_name_,
213 profile_prefs, io_data, 213 profile_prefs, io_data,
214 std::move(service)); 214 std::move(service));
215 io_data->SetDataReductionProxyService( 215 io_data->SetDataReductionProxyService(
216 data_reduction_proxy_service()->GetWeakPtr()); 216 data_reduction_proxy_service()->GetWeakPtr());
217 217
218 data_reduction_proxy::DataReductionProxySettings:: 218 data_reduction_proxy::DataReductionProxySettings::
219 SetCallbackToRegisterSyntheticFieldTrial( 219 SetCallbackToRegisterSyntheticFieldTrial(
220 base::Bind( 220 base::Bind(
(...skipping 19 matching lines...) Expand all
240 #elif defined(OS_OPENBSD) 240 #elif defined(OS_OPENBSD)
241 return data_reduction_proxy::Client::CHROME_OPENBSD; 241 return data_reduction_proxy::Client::CHROME_OPENBSD;
242 #elif defined(OS_SOLARIS) 242 #elif defined(OS_SOLARIS)
243 return data_reduction_proxy::Client::CHROME_SOLARIS; 243 return data_reduction_proxy::Client::CHROME_SOLARIS;
244 #elif defined(OS_QNX) 244 #elif defined(OS_QNX)
245 return data_reduction_proxy::Client::CHROME_QNX; 245 return data_reduction_proxy::Client::CHROME_QNX;
246 #else 246 #else
247 return data_reduction_proxy::Client::UNKNOWN; 247 return data_reduction_proxy::Client::UNKNOWN;
248 #endif 248 #endif
249 } 249 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698