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

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

Issue 2793623002: android: Limit num renderer to service slots (Closed)
Patch Set: fix remaining unit tests Created 3 years, 8 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
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/context_utils.h" 10 #include "base/android/context_utils.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 base::Bind(&ChildProcessLauncherHelper::PostLaunchOnLauncherThread, this, 232 base::Bind(&ChildProcessLauncherHelper::PostLaunchOnLauncherThread, this,
233 base::Passed(std::move(process)), launch_result, 233 base::Passed(std::move(process)), launch_result,
234 on_client_thread)); 234 on_client_thread));
235 if (on_client_thread) { 235 if (on_client_thread) {
236 ChildProcessLauncherHelper::Process process; 236 ChildProcessLauncherHelper::Process process;
237 process.process = base::Process(handle); 237 process.process = base::Process(handle);
238 PostLaunchOnClientThread(std::move(process), launch_result); 238 PostLaunchOnClientThread(std::move(process), launch_result);
239 } 239 }
240 } 240 }
241 241
242 // static
243 size_t ChildProcessLauncherHelper::GetNumberOfRendererSlots() {
244 return static_cast<size_t>(
245 Java_ChildProcessLauncherHelper_getNumberOfRendererSlots(
246 AttachCurrentThread()));
247 }
248
242 } // namespace internal 249 } // namespace internal
243 250
244 bool RegisterChildProcessLauncher(JNIEnv* env) { 251 bool RegisterChildProcessLauncher(JNIEnv* env) {
245 return internal::RegisterNativesImpl(env); 252 return internal::RegisterNativesImpl(env);
246 } 253 }
247 254
248 } // namespace content 255 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698