| Index: content/app/android/child_process_service.cc
|
| diff --git a/content/app/android/sandboxed_process_service.cc b/content/app/android/child_process_service.cc
|
| similarity index 63%
|
| rename from content/app/android/sandboxed_process_service.cc
|
| rename to content/app/android/child_process_service.cc
|
| index 6316ab8f7f78fb880e5b81efd02aacfcf5f91344..8d4b35ccae56b30ced6986e41f47ddd8d0c50ed9 100644
|
| --- a/content/app/android/sandboxed_process_service.cc
|
| +++ b/content/app/android/child_process_service.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/app/android/sandboxed_process_service.h"
|
| +#include "content/app/android/child_process_service.h"
|
|
|
| #include <cpu-features.h>
|
|
|
| @@ -15,7 +15,7 @@
|
| #include "content/public/app/android_library_loader_hooks.h"
|
| #include "content/public/common/content_descriptors.h"
|
| #include "ipc/ipc_descriptors.h"
|
| -#include "jni/SandboxedProcessService_jni.h"
|
| +#include "jni/ChildProcessService_jni.h"
|
|
|
| using base::android::AttachCurrentThread;
|
| using base::android::CheckException;
|
| @@ -23,15 +23,15 @@ using base::android::JavaIntArrayToIntVector;
|
|
|
| namespace {
|
|
|
| -class SurfaceTexturePeerSandboxedImpl : public content::SurfaceTexturePeer {
|
| +class SurfaceTexturePeerChildImpl : public content::SurfaceTexturePeer {
|
| public:
|
| // |service| is the instance of
|
| - // org.chromium.content.app.SandboxedProcessService.
|
| - SurfaceTexturePeerSandboxedImpl(jobject service)
|
| + // org.chromium.content.app.ChildProcessService.
|
| + SurfaceTexturePeerChildImpl(jobject service)
|
| : service_(service) {
|
| }
|
|
|
| - virtual ~SurfaceTexturePeerSandboxedImpl() {
|
| + virtual ~SurfaceTexturePeerChildImpl() {
|
| }
|
|
|
| virtual void EstablishSurfaceTexturePeer(
|
| @@ -41,7 +41,7 @@ class SurfaceTexturePeerSandboxedImpl : public content::SurfaceTexturePeer {
|
| int primary_id,
|
| int secondary_id) {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| - content::Java_SandboxedProcessService_establishSurfaceTexturePeer(
|
| + content::Java_ChildProcessService_establishSurfaceTexturePeer(
|
| env, service_, pid, type,
|
| surface_texture_bridge->j_surface_texture().obj(), primary_id,
|
| secondary_id);
|
| @@ -49,22 +49,22 @@ class SurfaceTexturePeerSandboxedImpl : public content::SurfaceTexturePeer {
|
| }
|
|
|
| private:
|
| - // The instance of org.chromium.content.app.SandboxedProcessService.
|
| + // The instance of org.chromium.content.app.ChildProcessService.
|
| jobject service_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeerSandboxedImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeerChildImpl);
|
| };
|
|
|
| // Chrome actually uses the renderer code path for all of its sandboxed
|
| // processes such as renderers, plugins, etc.
|
| -void InternalInitSandboxedProcess(const std::vector<int>& file_ids,
|
| - const std::vector<int>& file_fds,
|
| - JNIEnv* env,
|
| - jclass clazz,
|
| - jobject context,
|
| - jobject service,
|
| - jint cpu_count,
|
| - jlong cpu_features) {
|
| +void InternalInitChildProcess(const std::vector<int>& file_ids,
|
| + const std::vector<int>& file_fds,
|
| + JNIEnv* env,
|
| + jclass clazz,
|
| + jobject context,
|
| + jobject service,
|
| + jint cpu_count,
|
| + jlong cpu_features) {
|
| // Set the CPU properties.
|
| android_setCpu(cpu_count, cpu_features);
|
| // Register the file descriptors.
|
| @@ -75,7 +75,7 @@ void InternalInitSandboxedProcess(const std::vector<int>& file_ids,
|
| base::GlobalDescriptors::GetInstance()->Set(file_ids[i], file_fds[i]);
|
|
|
| content::SurfaceTexturePeer::InitInstance(
|
| - new SurfaceTexturePeerSandboxedImpl(service));
|
| + new SurfaceTexturePeerChildImpl(service));
|
|
|
| }
|
|
|
| @@ -87,31 +87,31 @@ void QuitSandboxMainThreadMessageLoop() {
|
|
|
| namespace content {
|
|
|
| -void InitSandboxedProcess(JNIEnv* env,
|
| - jclass clazz,
|
| - jobject context,
|
| - jobject service,
|
| - jintArray j_file_ids,
|
| - jintArray j_file_fds,
|
| - jint cpu_count,
|
| - jlong cpu_features) {
|
| +void InitChildProcess(JNIEnv* env,
|
| + jclass clazz,
|
| + jobject context,
|
| + jobject service,
|
| + jintArray j_file_ids,
|
| + jintArray j_file_fds,
|
| + jint cpu_count,
|
| + jlong cpu_features) {
|
| std::vector<int> file_ids;
|
| std::vector<int> file_fds;
|
| JavaIntArrayToIntVector(env, j_file_ids, &file_ids);
|
| JavaIntArrayToIntVector(env, j_file_fds, &file_fds);
|
|
|
| - InternalInitSandboxedProcess(
|
| + InternalInitChildProcess(
|
| file_ids, file_fds, env, clazz, context, service,
|
| cpu_count, cpu_features);
|
| }
|
|
|
| -void ExitSandboxedProcess(JNIEnv* env, jclass clazz) {
|
| - LOG(INFO) << "SandboxedProcessService: Exiting sandboxed process.";
|
| +void ExitChildProcess(JNIEnv* env, jclass clazz) {
|
| + LOG(INFO) << "ChildProcessService: Exiting child process.";
|
| LibraryLoaderExitHook();
|
| _exit(0);
|
| }
|
|
|
| -bool RegisterSandboxedProcessService(JNIEnv* env) {
|
| +bool RegisterChildProcessService(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
| }
|
|
|
|
|