| 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 #include <memory> | 10 #include <memory> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return hex_hash + "." + append_str; | 155 return hex_hash + "." + append_str; |
| 156 } | 156 } |
| 157 | 157 |
| 158 std::unique_ptr<base::CommandLine> CreateServiceProcessCommandLine() { | 158 std::unique_ptr<base::CommandLine> CreateServiceProcessCommandLine() { |
| 159 base::FilePath exe_path; | 159 base::FilePath exe_path; |
| 160 PathService::Get(content::CHILD_PROCESS_EXE, &exe_path); | 160 PathService::Get(content::CHILD_PROCESS_EXE, &exe_path); |
| 161 DCHECK(!exe_path.empty()) << "Unable to get service process binary name."; | 161 DCHECK(!exe_path.empty()) << "Unable to get service process binary name."; |
| 162 std::unique_ptr<base::CommandLine> command_line( | 162 std::unique_ptr<base::CommandLine> command_line( |
| 163 new base::CommandLine(exe_path)); | 163 new base::CommandLine(exe_path)); |
| 164 command_line->AppendSwitchASCII(switches::kProcessType, | 164 command_line->AppendSwitchASCII(switches::kProcessType, |
| 165 switches::kServiceProcess); | 165 switches::kCloudPrintServiceProcess); |
| 166 | 166 |
| 167 #if defined(OS_WIN) | 167 #if defined(OS_WIN) |
| 168 command_line->AppendArg(switches::kPrefetchArgumentOther); | 168 command_line->AppendArg(switches::kPrefetchArgumentOther); |
| 169 #endif // defined(OS_WIN) | 169 #endif // defined(OS_WIN) |
| 170 | 170 |
| 171 static const char* const kSwitchesToCopy[] = { | 171 static const char* const kSwitchesToCopy[] = { |
| 172 switches::kCloudPrintSetupProxy, | 172 switches::kCloudPrintSetupProxy, |
| 173 switches::kCloudPrintURL, | 173 switches::kCloudPrintURL, |
| 174 switches::kCloudPrintXmppEndpoint, | 174 switches::kCloudPrintXmppEndpoint, |
| 175 #if defined(OS_WIN) | 175 #if defined(OS_WIN) |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 shared_data->service_process_pid = base::GetCurrentProcId(); | 278 shared_data->service_process_pid = base::GetCurrentProcId(); |
| 279 shared_mem_service_data_ = std::move(shared_mem_service_data); | 279 shared_mem_service_data_ = std::move(shared_mem_service_data); |
| 280 return true; | 280 return true; |
| 281 } | 281 } |
| 282 | 282 |
| 283 mojo::edk::NamedPlatformHandle ServiceProcessState::GetServiceProcessChannel() { | 283 mojo::edk::NamedPlatformHandle ServiceProcessState::GetServiceProcessChannel() { |
| 284 return ::GetServiceProcessChannel(); | 284 return ::GetServiceProcessChannel(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 #endif // !OS_MACOSX | 287 #endif // !OS_MACOSX |
| OLD | NEW |