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

Side by Side Diff: content/browser/child_process_launcher_helper_android.cc

Issue 2882823002: Moving some CPL logic to CPLH. (Closed)
Patch Set: Fixed warm-up and tests. Created 3 years, 7 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 | « no previous file | content/public/android/java/src/org/chromium/content/browser/ChildConnectionAllocator.java » ('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 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/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 Java_ChildProcessLauncherHelper_makeFdInfo(env, id, fd, auto_close, 124 Java_ChildProcessLauncherHelper_makeFdInfo(env, id, fd, auto_close,
125 region.offset, region.size); 125 region.offset, region.size);
126 PCHECK(j_file_info.obj()); 126 PCHECK(j_file_info.obj());
127 env->SetObjectArrayElement(j_file_infos.obj(), i, j_file_info.obj()); 127 env->SetObjectArrayElement(j_file_infos.obj(), i, j_file_info.obj());
128 if (auto_close) { 128 if (auto_close) {
129 ignore_result(files_to_register->ReleaseFD(fd).release()); 129 ignore_result(files_to_register->ReleaseFD(fd).release());
130 } 130 }
131 } 131 }
132 132
133 constexpr int param_key = 0; // TODO(boliu): Use this. 133 constexpr int param_key = 0; // TODO(boliu): Use this.
134 java_peer_.Reset(Java_ChildProcessLauncherHelper_create( 134 java_peer_.Reset(Java_ChildProcessLauncherHelper_createAndStart(
135 env, reinterpret_cast<intptr_t>(this), param_key, j_argv, j_file_infos)); 135 env, reinterpret_cast<intptr_t>(this), param_key, j_argv, j_file_infos));
136 AddRef(); // Balanced by OnChildProcessStarted. 136 AddRef(); // Balanced by OnChildProcessStarted.
137 137
138 return Process(); 138 return Process();
139 } 139 }
140 140
141 void ChildProcessLauncherHelper::AfterLaunchOnLauncherThread( 141 void ChildProcessLauncherHelper::AfterLaunchOnLauncherThread(
142 const ChildProcessLauncherHelper::Process& process, 142 const ChildProcessLauncherHelper::Process& process,
143 const base::LaunchOptions& options) { 143 const base::LaunchOptions& options) {
144 } 144 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 AttachCurrentThread())); 226 AttachCurrentThread()));
227 } 227 }
228 228
229 } // namespace internal 229 } // namespace internal
230 230
231 bool RegisterChildProcessLauncher(JNIEnv* env) { 231 bool RegisterChildProcessLauncher(JNIEnv* env) {
232 return internal::RegisterNativesImpl(env); 232 return internal::RegisterNativesImpl(env);
233 } 233 }
234 234
235 } // namespace content 235 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ChildConnectionAllocator.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698