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

Side by Side Diff: chrome/service/service_main.cc

Issue 1899083002: Convert //chrome from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/service/service_ipc_server_unittest.cc ('k') | chrome/service/service_process.h » ('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 "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/debug/debugger.h" 6 #include "base/debug/debugger.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/metrics/statistics_recorder.h" 8 #include "base/metrics/statistics_recorder.h"
9 #include "chrome/common/service_process_util.h" 9 #include "chrome/common/service_process_util.h"
10 #include "chrome/service/service_process.h" 10 #include "chrome/service/service_process.h"
(...skipping 12 matching lines...) Expand all
23 base::debug::WaitForDebugger(60, true); 23 base::debug::WaitForDebugger(60, true);
24 } 24 }
25 25
26 VLOG(1) << "Service process launched: " 26 VLOG(1) << "Service process launched: "
27 << parameters.command_line.GetCommandLineString(); 27 << parameters.command_line.GetCommandLineString();
28 28
29 base::PlatformThread::SetName("CrServiceMain"); 29 base::PlatformThread::SetName("CrServiceMain");
30 base::StatisticsRecorder::Initialize(); 30 base::StatisticsRecorder::Initialize();
31 31
32 // If there is already a service process running, quit now. 32 // If there is already a service process running, quit now.
33 scoped_ptr<ServiceProcessState> state(new ServiceProcessState); 33 std::unique_ptr<ServiceProcessState> state(new ServiceProcessState);
34 if (!state->Initialize()) 34 if (!state->Initialize())
35 return 0; 35 return 0;
36 36
37 ServiceProcess service_process; 37 ServiceProcess service_process;
38 if (service_process.Initialize(&main_message_loop, 38 if (service_process.Initialize(&main_message_loop,
39 parameters.command_line, 39 parameters.command_line,
40 state.release())) { 40 state.release())) {
41 base::MessageLoop::current()->Run(); 41 base::MessageLoop::current()->Run();
42 } else { 42 } else {
43 LOG(ERROR) << "Service process failed to initialize"; 43 LOG(ERROR) << "Service process failed to initialize";
44 } 44 }
45 return 0; 45 return 0;
46 } 46 }
OLDNEW
« no previous file with comments | « chrome/service/service_ipc_server_unittest.cc ('k') | chrome/service/service_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698