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

Side by Side Diff: content/public/android/java/org/chromium/content/app/SandboxedProcessService.java

Issue 10532155: Upstream some more content/ DEPS-related cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 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 | Annotate | Revision Log
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 package org.chromium.content.app; 5 package org.chromium.content.app;
6 6
7 import android.app.Service; 7 import android.app.Service;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.graphics.SurfaceTexture; 10 import android.graphics.SurfaceTexture;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 @Override 87 @Override
88 public void onCreate() { 88 public void onCreate() {
89 sContext = this; 89 sContext = this;
90 super.onCreate(); 90 super.onCreate();
91 91
92 mSandboxMainThread = new Thread(new Runnable() { 92 mSandboxMainThread = new Thread(new Runnable() {
93 @Override 93 @Override
94 public void run() { 94 public void run() {
95 try { 95 try {
96 // TODO(michaelbai): Upstream LibraryLoader.java 96 if (!LibraryLoader.loadNow()) return;
97 // if (!LibraryLoader.loadNow()) return;
98 synchronized (mSandboxMainThread) { 97 synchronized (mSandboxMainThread) {
99 while (mCommandLineParams == null) { 98 while (mCommandLineParams == null) {
100 mSandboxMainThread.wait(); 99 mSandboxMainThread.wait();
101 } 100 }
102 } 101 }
103 // LibraryLoader.initializeOnMainThread(mCommandLineParams); 102 LibraryLoader.initializeOnMainThread(mCommandLineParams);
104 synchronized (mSandboxMainThread) { 103 synchronized (mSandboxMainThread) {
105 mLibraryInitialized = true; 104 mLibraryInitialized = true;
106 mSandboxMainThread.notifyAll(); 105 mSandboxMainThread.notifyAll();
107 while (mIPCFd == null) { 106 while (mIPCFd == null) {
108 mSandboxMainThread.wait(); 107 mSandboxMainThread.wait();
109 } 108 }
110 } 109 }
111 int crashFd = (mCrashFd == null) ? -1 : mCrashFd.detachFd(); 110 int crashFd = (mCrashFd == null) ? -1 : mCrashFd.detachFd();
112 ContentMain.initApplicationContext(sContext.getApplicationCo ntext()); 111 ContentMain.initApplicationContext(sContext.getApplicationCo ntext());
113 nativeInitSandboxedProcess(sContext.getApplicationContext(), 112 nativeInitSandboxedProcess(sContext.getApplicationContext(),
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 * @param crashFd File descriptor for signaling crashes. 217 * @param crashFd File descriptor for signaling crashes.
219 */ 218 */
220 private static native void nativeInitSandboxedProcess(Context applicationCon text, 219 private static native void nativeInitSandboxedProcess(Context applicationCon text,
221 SandboxedProcessService service, int ipcFd, int crashFd); 220 SandboxedProcessService service, int ipcFd, int crashFd);
222 221
223 /** 222 /**
224 * Force the sandboxed process to exit. 223 * Force the sandboxed process to exit.
225 */ 224 */
226 private static native void nativeExitSandboxedProcess(); 225 private static native void nativeExitSandboxedProcess();
227 } 226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698