| 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 "content/browser/android/child_process_launcher_android.h" | 5 #include "content/browser/android/child_process_launcher_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 JNIEnv* env = AttachCurrentThread(); | 160 JNIEnv* env = AttachCurrentThread(); |
| 161 DCHECK(env); | 161 DCHECK(env); |
| 162 | 162 |
| 163 // Create the Command line String[] | 163 // Create the Command line String[] |
| 164 ScopedJavaLocalRef<jobjectArray> j_argv = ToJavaArrayOfStrings(env, argv); | 164 ScopedJavaLocalRef<jobjectArray> j_argv = ToJavaArrayOfStrings(env, argv); |
| 165 | 165 |
| 166 size_t file_count = files_to_register->GetMappingSize(); | 166 size_t file_count = files_to_register->GetMappingSize(); |
| 167 DCHECK(file_count > 0); | 167 DCHECK(file_count > 0); |
| 168 | 168 |
| 169 ScopedJavaLocalRef<jclass> j_file_info_class = base::android::GetClass( | 169 ScopedJavaLocalRef<jclass> j_file_info_class = base::android::GetClass( |
| 170 env, "org/chromium/content/browser/FileDescriptorInfo"); | 170 env, "org/chromium/content/common/FileDescriptorInfo"); |
| 171 ScopedJavaLocalRef<jobjectArray> j_file_infos( | 171 ScopedJavaLocalRef<jobjectArray> j_file_infos( |
| 172 env, env->NewObjectArray(file_count, j_file_info_class.obj(), NULL)); | 172 env, env->NewObjectArray(file_count, j_file_info_class.obj(), NULL)); |
| 173 base::android::CheckException(env); | 173 base::android::CheckException(env); |
| 174 | 174 |
| 175 for (size_t i = 0; i < file_count; ++i) { | 175 for (size_t i = 0; i < file_count; ++i) { |
| 176 int fd = files_to_register->GetFDAt(i); | 176 int fd = files_to_register->GetFDAt(i); |
| 177 PCHECK(0 <= fd); | 177 PCHECK(0 <= fd); |
| 178 int id = files_to_register->GetIDAt(i); | 178 int id = files_to_register->GetIDAt(i); |
| 179 bool auto_close = files_to_register->OwnsFD(fd); | 179 bool auto_close = files_to_register->OwnsFD(fd); |
| 180 int64_t offset = 0L; | 180 int64_t offset = 0L; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { | 285 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { |
| 286 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 286 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 287 switches::kSingleProcess); | 287 switches::kSingleProcess); |
| 288 } | 288 } |
| 289 | 289 |
| 290 bool RegisterChildProcessLauncher(JNIEnv* env) { | 290 bool RegisterChildProcessLauncher(JNIEnv* env) { |
| 291 return RegisterNativesImpl(env); | 291 return RegisterNativesImpl(env); |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace content | 294 } // namespace content |
| OLD | NEW |