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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java

Issue 2049843004: Upstream: Renderers are running in WebAPKs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Always check command line flags in getNum(Class)ofService(). Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.chrome.browser.init; 5 package org.chromium.chrome.browser.init;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.os.AsyncTask; 9 import android.os.AsyncTask;
10 import android.os.Build; 10 import android.os.Build;
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 initQueue.add(new NativeInitTask() { 306 initQueue.add(new NativeInitTask() {
307 @Override 307 @Override
308 public void initFunction() { 308 public void initFunction() {
309 if (delegate.isActivityDestroyed()) return; 309 if (delegate.isActivityDestroyed()) return;
310 delegate.finishNativeInitialization(); 310 delegate.finishNativeInitialization();
311 } 311 }
312 }); 312 });
313 313
314 // See crbug.com/593250. This can be removed after N SDK is released, cr bug.com/592722. 314 // See crbug.com/593250. This can be removed after N SDK is released, cr bug.com/592722.
315 ChildProcessCreationParams.set(mApplication.getChildProcessCreationParam s()); 315 ChildProcessCreationParams creationParams = mApplication.getChildProcess CreationParams();
316 // WebAPK uses this code path to initialize Chrome's native code, and th e
317 // ChildProcessCreationParams has been set in {@link WebApkActivity}. We have to prevent
318 // resetting with a wrong parameter here. TODO(hanxi): Remove the entire if block after
319 // N SDK is released, since it breaks WebAPKs on N+.
320 if (creationParams != null && ChildProcessCreationParams.get() != null) {
321 ChildProcessCreationParams.set(creationParams);
no sievers 2016/06/24 21:33:40 Is this still needed?
Xi Han 2016/06/24 21:57:06 Since I am not sure whether we can remove ChildPro
322 }
316 if (isAsync) { 323 if (isAsync) {
317 // We want to start this queue once the C++ startup tasks have run; allow the 324 // We want to start this queue once the C++ startup tasks have run; allow the
318 // C++ startup to run asynchonously, and set it up to start the Java queue once 325 // C++ startup to run asynchonously, and set it up to start the Java queue once
319 // it has finished. 326 // it has finished.
320 startChromeBrowserProcessesAsync( 327 startChromeBrowserProcessesAsync(
321 delegate.shouldStartGpuProcess(), 328 delegate.shouldStartGpuProcess(),
322 new BrowserStartupController.StartupCallback() { 329 new BrowserStartupController.StartupCallback() {
323 @Override 330 @Override
324 public void onFailure() { 331 public void onFailure() {
325 delegate.onStartupFailure(); 332 delegate.onStartupFailure();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 Log.e(TAG, "Killing process because of locale change."); 438 Log.e(TAG, "Killing process because of locale change.");
432 Process.killProcess(Process.myPid()); 439 Process.killProcess(Process.myPid());
433 } 440 }
434 441
435 DeviceFormFactor.resetValuesIfNeeded(mApplication); 442 DeviceFormFactor.resetValuesIfNeeded(mApplication);
436 } 443 }
437 } 444 }
438 }; 445 };
439 } 446 }
440 } 447 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698