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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java

Issue 2203223002: Revert "Separate deferred startup into tasks." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
index b15f32196c40baefce5fa0550dd76cc26f5364b3..b17422a0146f0b257fa105f4aeaf203ac2634694 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
@@ -275,7 +275,6 @@ public class ChromeApplication extends ContentApplication {
* activity.
*/
private void onForegroundSessionStart() {
- UmaUtils.recordForegroundStartTime();
ChildProcessLauncher.onBroughtToForeground();
mBackgroundProcessing.startTimers();
updatePasswordEchoState();
@@ -443,61 +442,38 @@ public class ChromeApplication extends ContentApplication {
if (mInitializedSharedClasses) return;
mInitializedSharedClasses = true;
- DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
+ ForcedSigninProcessor.start(this);
+ AccountsChangedReceiver.addObserver(new AccountsChangedReceiver.AccountsChangedObserver() {
@Override
- public void run() {
- ForcedSigninProcessor.start(getApplicationContext());
- AccountsChangedReceiver.addObserver(
- new AccountsChangedReceiver.AccountsChangedObserver() {
- @Override
- public void onAccountsChanged(Context context, Intent intent) {
- ThreadUtils.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- ForcedSigninProcessor.start(getApplicationContext());
- }
- });
- }
- });
+ public void onAccountsChanged(Context context, Intent intent) {
+ ThreadUtils.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ ForcedSigninProcessor.start(ChromeApplication.this);
+ }
+ });
}
});
+ GoogleServicesManager.get(this).onMainActivityStart();
+ RevenueStats.getInstance();
- DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
- @Override
- public void run() {
- GoogleServicesManager.get(getApplicationContext()).onMainActivityStart();
- RevenueStats.getInstance();
- }
- });
+ mDevToolsServer = new DevToolsServer(DEV_TOOLS_SERVER_SOCKET_PREFIX);
+ mDevToolsServer.setRemoteDebuggingEnabled(
+ true, DevToolsServer.Security.ALLOW_DEBUG_PERMISSION);
- DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
- @Override
- public void run() {
- mDevToolsServer = new DevToolsServer(DEV_TOOLS_SERVER_SOCKET_PREFIX);
- mDevToolsServer.setRemoteDebuggingEnabled(
- true, DevToolsServer.Security.ALLOW_DEBUG_PERMISSION);
+ startApplicationActivityTracker();
- startApplicationActivityTracker();
- }
- });
-
- DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
- @Override
- public void run() {
- // Add process check to diagnose http://crbug.com/606309. Remove this after the bug
- // is fixed.
- assert !CommandLine.getInstance().hasSwitch(ContentSwitches.SWITCH_PROCESS_TYPE);
- if (!CommandLine.getInstance().hasSwitch(ContentSwitches.SWITCH_PROCESS_TYPE)) {
- DownloadController.setDownloadNotificationService(
- DownloadManagerService.getDownloadManagerService(
- getApplicationContext()));
- }
+ // Add process check to diagnose http://crbug.com/606309. Remove this after the bug is
+ // fixed.
+ assert !CommandLine.getInstance().hasSwitch(ContentSwitches.SWITCH_PROCESS_TYPE);
+ if (!CommandLine.getInstance().hasSwitch(ContentSwitches.SWITCH_PROCESS_TYPE)) {
+ DownloadController.setDownloadNotificationService(
+ DownloadManagerService.getDownloadManagerService(this));
+ }
- if (ApiCompatibilityUtils.isPrintingSupported()) {
- mPrintingController = PrintingControllerFactory.create(getApplicationContext());
- }
- }
- });
+ if (ApiCompatibilityUtils.isPrintingSupported()) {
+ mPrintingController = PrintingControllerFactory.create(getApplicationContext());
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698