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 "chrome/common/service_process_util.h" | 5 #include "chrome/common/service_process_util.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 switches::kNoServiceAutorun, | 175 switches::kNoServiceAutorun, |
176 switches::kUserDataDir, | 176 switches::kUserDataDir, |
177 switches::kV, | 177 switches::kV, |
178 switches::kVModule, | 178 switches::kVModule, |
179 switches::kWaitForDebugger, | 179 switches::kWaitForDebugger, |
180 }; | 180 }; |
181 | 181 |
182 command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(), | 182 command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(), |
183 kSwitchesToCopy, | 183 kSwitchesToCopy, |
184 arraysize(kSwitchesToCopy)); | 184 arraysize(kSwitchesToCopy)); |
185 return command_line.Pass(); | 185 return command_line; |
186 } | 186 } |
187 | 187 |
188 ServiceProcessState::ServiceProcessState() : state_(NULL) { | 188 ServiceProcessState::ServiceProcessState() : state_(NULL) { |
189 autorun_command_line_ = CreateServiceProcessCommandLine(); | 189 autorun_command_line_ = CreateServiceProcessCommandLine(); |
190 CreateState(); | 190 CreateState(); |
191 } | 191 } |
192 | 192 |
193 ServiceProcessState::~ServiceProcessState() { | 193 ServiceProcessState::~ServiceProcessState() { |
194 #if !defined(OS_MACOSX) | 194 #if !defined(OS_MACOSX) |
195 if (shared_mem_service_data_.get()) { | 195 if (shared_mem_service_data_.get()) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 shared_data->service_process_pid = base::GetCurrentProcId(); | 270 shared_data->service_process_pid = base::GetCurrentProcId(); |
271 shared_mem_service_data_.reset(shared_mem_service_data.release()); | 271 shared_mem_service_data_.reset(shared_mem_service_data.release()); |
272 return true; | 272 return true; |
273 } | 273 } |
274 | 274 |
275 IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() { | 275 IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() { |
276 return ::GetServiceProcessChannel(); | 276 return ::GetServiceProcessChannel(); |
277 } | 277 } |
278 | 278 |
279 #endif // !OS_MACOSX | 279 #endif // !OS_MACOSX |
OLD | NEW |