| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 if (process_type != switches::kZygoteProcess) { | 231 if (process_type != switches::kZygoteProcess) { |
| 232 cmd_line->AppendSwitch(::switches::kV8NativesPassedByFD); | 232 cmd_line->AppendSwitch(::switches::kV8NativesPassedByFD); |
| 233 if (snapshot_loaded) { | 233 if (snapshot_loaded) { |
| 234 cmd_line->AppendSwitch(::switches::kV8SnapshotPassedByFD); | 234 cmd_line->AppendSwitch(::switches::kV8SnapshotPassedByFD); |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 #endif // defined(V8_USE_EXTERNAL_STARTUP_DATA) | 237 #endif // defined(V8_USE_EXTERNAL_STARTUP_DATA) |
| 238 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 238 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 239 | 239 |
| 240 #if defined(OS_ANDROID) | 240 #if defined(OS_ANDROID) |
| 241 #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE |
| 241 files_to_register->Share( | 242 files_to_register->Share( |
| 242 kAndroidICUDataDescriptor, | 243 kAndroidICUDataDescriptor, |
| 243 base::i18n::GetIcuDataFileHandle(®ions[kAndroidICUDataDescriptor])); | 244 base::i18n::GetIcuDataFileHandle(®ions[kAndroidICUDataDescriptor])); |
| 245 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE |
| 244 | 246 |
| 245 // Android WebView runs in single process, ensure that we never get here | 247 // Android WebView runs in single process, ensure that we never get here |
| 246 // when running in single process mode. | 248 // when running in single process mode. |
| 247 CHECK(!cmd_line->HasSwitch(switches::kSingleProcess)); | 249 CHECK(!cmd_line->HasSwitch(switches::kSingleProcess)); |
| 248 | 250 |
| 249 StartChildProcess( | 251 StartChildProcess( |
| 250 cmd_line->argv(), child_process_id, std::move(files_to_register), regions, | 252 cmd_line->argv(), child_process_id, std::move(files_to_register), regions, |
| 251 base::Bind(&OnChildProcessStartedAndroid, callback, client_thread_id, | 253 base::Bind(&OnChildProcessStartedAndroid, callback, client_thread_id, |
| 252 begin_launch_time, base::Passed(&ipcfd), | 254 begin_launch_time, base::Passed(&ipcfd), |
| 253 base::Passed(&mojo_fd))); | 255 base::Passed(&mojo_fd))); |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 } | 617 } |
| 616 | 618 |
| 617 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( | 619 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( |
| 618 Client* client) { | 620 Client* client) { |
| 619 Client* ret = client_; | 621 Client* ret = client_; |
| 620 client_ = client; | 622 client_ = client; |
| 621 return ret; | 623 return ret; |
| 622 } | 624 } |
| 623 | 625 |
| 624 } // namespace content | 626 } // namespace content |
| OLD | NEW |