| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_helper_android.h" | 5 #include "content/browser/child_process_launcher_helper_android.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/android/apk_assets.h" | 9 #include "base/android/apk_assets.h" |
| 10 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 jint handle) { | 274 jint handle) { |
| 275 StartChildProcessCallback* callback = | 275 StartChildProcessCallback* callback = |
| 276 reinterpret_cast<StartChildProcessCallback*>(client_context); | 276 reinterpret_cast<StartChildProcessCallback*>(client_context); |
| 277 int launch_result = (handle == base::kNullProcessHandle) | 277 int launch_result = (handle == base::kNullProcessHandle) |
| 278 ? LAUNCH_RESULT_FAILURE | 278 ? LAUNCH_RESULT_FAILURE |
| 279 : LAUNCH_RESULT_SUCCESS; | 279 : LAUNCH_RESULT_SUCCESS; |
| 280 callback->Run(static_cast<base::ProcessHandle>(handle), launch_result); | 280 callback->Run(static_cast<base::ProcessHandle>(handle), launch_result); |
| 281 delete callback; | 281 delete callback; |
| 282 } | 282 } |
| 283 | 283 |
| 284 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { | |
| 285 return base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 286 switches::kSingleProcess); | |
| 287 } | |
| 288 | |
| 289 bool RegisterChildProcessLauncher(JNIEnv* env) { | 284 bool RegisterChildProcessLauncher(JNIEnv* env) { |
| 290 return RegisterNativesImpl(env); | 285 return RegisterNativesImpl(env); |
| 291 } | 286 } |
| 292 | 287 |
| 293 } // namespace content | 288 } // namespace content |
| OLD | NEW |