OLD | NEW |
---|---|
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/debug/debugger.h" | 5 #include "base/debug/debugger.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "chrome/common/chrome_switches.h" | 7 #include "chrome/common/chrome_switches.h" |
8 #include "chrome/common/service_process_util.h" | 8 #include "chrome/common/service_process_util.h" |
9 #include "chrome/service/service_process.h" | 9 #include "chrome/service/service_process.h" |
10 #include "content/public/common/main_function_params.h" | 10 #include "content/public/common/main_function_params.h" |
(...skipping 25 matching lines...) Expand all Loading... | |
36 VLOG(1) << "Service process launched: " | 36 VLOG(1) << "Service process launched: " |
37 << parameters.command_line.GetCommandLineString(); | 37 << parameters.command_line.GetCommandLineString(); |
38 | 38 |
39 base::PlatformThread::SetName("CrServiceMain"); | 39 base::PlatformThread::SetName("CrServiceMain"); |
40 | 40 |
41 // If there is already a service process running, quit now. | 41 // If there is already a service process running, quit now. |
42 scoped_ptr<ServiceProcessState> state(new ServiceProcessState); | 42 scoped_ptr<ServiceProcessState> state(new ServiceProcessState); |
43 if (!state->Initialize()) | 43 if (!state->Initialize()) |
44 return 0; | 44 return 0; |
45 | 45 |
46 #if defined(OS_WIN) | |
47 content::InitializeSandbox(parameters.sandbox_info); | |
Vitaly Buka (NO REVIEWS)
2012/07/03 00:12:13
ContentMain already call InitializeSandBox from ma
| |
48 #endif // defined(OS_WIN) | |
49 | |
50 ServiceProcess service_process; | 46 ServiceProcess service_process; |
51 if (service_process.Initialize(&main_message_loop, | 47 if (service_process.Initialize(&main_message_loop, |
52 parameters.command_line, | 48 parameters.command_line, |
53 state.release())) { | 49 state.release())) { |
54 MessageLoop::current()->Run(); | 50 MessageLoop::current()->Run(); |
55 } else { | 51 } else { |
56 LOG(ERROR) << "Service process failed to initialize"; | 52 LOG(ERROR) << "Service process failed to initialize"; |
57 } | 53 } |
58 service_process.Teardown(); | 54 service_process.Teardown(); |
59 return 0; | 55 return 0; |
60 } | 56 } |
OLD | NEW |