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

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

Issue 2142803002: Reland of Android: Add support for TraceEvent before the native library is loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.content.Intent; 9 import android.content.Intent;
10 import android.content.res.Configuration; 10 import android.content.res.Configuration;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 /** 196 /**
197 * Extending classes should override {@link AsyncInitializationActivity#preI nflationStartup()}, 197 * Extending classes should override {@link AsyncInitializationActivity#preI nflationStartup()},
198 * {@link AsyncInitializationActivity#setContentView()} and 198 * {@link AsyncInitializationActivity#setContentView()} and
199 * {@link AsyncInitializationActivity#postInflationStartup()} instead of thi s call which will 199 * {@link AsyncInitializationActivity#postInflationStartup()} instead of thi s call which will
200 * be called on that order. 200 * be called on that order.
201 */ 201 */
202 @Override 202 @Override
203 protected final void onCreate(Bundle savedInstanceState) { 203 protected final void onCreate(Bundle savedInstanceState) {
204 TraceEvent.begin("AsyncInitializationActivity.onCreate()");
205 onCreateInternal(savedInstanceState);
206 TraceEvent.end("AsyncInitializationActivity.onCreate()");
207 }
208
209 private final void onCreateInternal(Bundle savedInstanceState) {
204 if (DocumentModeAssassin.getInstance().isMigrationNecessary()) { 210 if (DocumentModeAssassin.getInstance().isMigrationNecessary()) {
205 super.onCreate(null); 211 super.onCreate(null);
206 212
207 // Kick the user to the MigrationActivity. 213 // Kick the user to the MigrationActivity.
208 UpgradeActivity.launchInstance(this, getIntent()); 214 UpgradeActivity.launchInstance(this, getIntent());
209 215
210 // Don't remove this task -- it may be a DocumentActivity that exist s only in Recents. 216 // Don't remove this task -- it may be a DocumentActivity that exist s only in Recents.
211 finish(); 217 finish();
212 return; 218 return;
213 } 219 }
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 getDecorView().setVisibility(View.GONE); 503 getDecorView().setVisibility(View.GONE);
498 } 504 }
499 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi stener); 505 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi stener);
500 } 506 }
501 }); 507 });
502 return true; 508 return true;
503 } 509 }
504 }; 510 };
505 } 511 }
506 } 512 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698