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: chrome/service/service_process.cc

Issue 2341693002: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Change std::string() back to "" to fix compile 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
« no previous file with comments | « chrome/renderer/security_filter_peer.cc ('k') | chrome/service/service_process_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/service/service_process.h" 5 #include "chrome/service/service_process.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Then check if the cloud print proxy was previously enabled. 219 // Then check if the cloud print proxy was previously enabled.
220 if (command_line.HasSwitch(switches::kEnableCloudPrintProxy) || 220 if (command_line.HasSwitch(switches::kEnableCloudPrintProxy) ||
221 service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled, false)) { 221 service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled, false)) {
222 GetCloudPrintProxy()->EnableForUser(); 222 GetCloudPrintProxy()->EnableForUser();
223 } 223 }
224 224
225 VLOG(1) << "Starting Service Process IPC Server"; 225 VLOG(1) << "Starting Service Process IPC Server";
226 226
227 ipc_server_.reset(new ServiceIPCServer(this /* client */, io_task_runner(), 227 ipc_server_.reset(new ServiceIPCServer(this /* client */, io_task_runner(),
228 &shutdown_event_)); 228 &shutdown_event_));
229 ipc_server_->AddMessageHandler(base::WrapUnique( 229 ipc_server_->AddMessageHandler(
230 new cloud_print::CloudPrintMessageHandler(ipc_server_.get(), this))); 230 base::MakeUnique<cloud_print::CloudPrintMessageHandler>(ipc_server_.get(),
231 this));
231 ipc_server_->Init(); 232 ipc_server_->Init();
232 233
233 // After the IPC server has started we signal that the service process is 234 // After the IPC server has started we signal that the service process is
234 // ready. 235 // ready.
235 if (!service_process_state_->SignalReady( 236 if (!service_process_state_->SignalReady(
236 io_task_runner().get(), 237 io_task_runner().get(),
237 base::Bind(&ServiceProcess::Terminate, base::Unretained(this)))) { 238 base::Bind(&ServiceProcess::Terminate, base::Unretained(this)))) {
238 return false; 239 return false;
239 } 240 }
240 241
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } else { 416 } else {
416 Shutdown(); 417 Shutdown();
417 } 418 }
418 } 419 }
419 } 420 }
420 421
421 ServiceProcess::~ServiceProcess() { 422 ServiceProcess::~ServiceProcess() {
422 Teardown(); 423 Teardown();
423 g_service_process = NULL; 424 g_service_process = NULL;
424 } 425 }
OLDNEW
« no previous file with comments | « chrome/renderer/security_filter_peer.cc ('k') | chrome/service/service_process_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698