Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: content/app/android/child_process_service.cc

Issue 1185973003: Take 2: Moved logic for mapping child process FDs for ICU and V8 into child_process_launcher.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/app/android/child_process_service.h" 5 #include "content/app/android/child_process_service.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 #include <cpu-features.h> 8 #include <cpu-features.h>
9 9
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 } // namespace <anonymous> 149 } // namespace <anonymous>
150 150
151 void RegisterGlobalFileDescriptor(JNIEnv* env, 151 void RegisterGlobalFileDescriptor(JNIEnv* env,
152 jclass clazz, 152 jclass clazz,
153 jint id, 153 jint id,
154 jint fd, 154 jint fd,
155 jlong offset, 155 jlong offset,
156 jlong size) { 156 jlong size) {
157 base::MemoryMappedFile::Region region(offset, size); 157 base::MemoryMappedFile::Region region = {offset, size};
158 base::GlobalDescriptors::GetInstance()->Set(id, fd, region); 158 base::GlobalDescriptors::GetInstance()->Set(id, fd, region);
159 } 159 }
160 160
161 void InitChildProcess(JNIEnv* env, 161 void InitChildProcess(JNIEnv* env,
162 jclass clazz, 162 jclass clazz,
163 jobject context, 163 jobject context,
164 jobject service, 164 jobject service,
165 jint cpu_count, 165 jint cpu_count,
166 jlong cpu_features) { 166 jlong cpu_features) {
167 InternalInitChildProcess(env, clazz, context, service, cpu_count, 167 InternalInitChildProcess(env, clazz, context, service, cpu_count,
168 cpu_features); 168 cpu_features);
169 } 169 }
170 170
171 void ExitChildProcess(JNIEnv* env, jclass clazz) { 171 void ExitChildProcess(JNIEnv* env, jclass clazz) {
172 VLOG(0) << "ChildProcessService: Exiting child process."; 172 VLOG(0) << "ChildProcessService: Exiting child process.";
173 base::android::LibraryLoaderExitHook(); 173 base::android::LibraryLoaderExitHook();
174 _exit(0); 174 _exit(0);
175 } 175 }
176 176
177 bool RegisterChildProcessService(JNIEnv* env) { 177 bool RegisterChildProcessService(JNIEnv* env) {
178 return RegisterNativesImpl(env); 178 return RegisterNativesImpl(env);
179 } 179 }
180 180
181 void ShutdownMainThread(JNIEnv* env, jobject obj) { 181 void ShutdownMainThread(JNIEnv* env, jobject obj) {
182 ChildThreadImpl::ShutdownThread(); 182 ChildThreadImpl::ShutdownThread();
183 } 183 }
184 184
185 } // namespace content 185 } // namespace content
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698