| Index: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| index 1fa17c0acd9564d19c9b220fd9799f7b16a2670c..83bb10901d5746fd26ca52d0b0eb243b4d195ee8 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| @@ -115,16 +115,22 @@ public class ChromeLauncherActivity extends Activity
|
| public void onCreate(Bundle savedInstanceState) {
|
| // Third-party code adds disk access to Activity.onCreate. http://crbug.com/619824
|
| StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
|
| + TraceEvent.begin("ChromeLauncherActivity");
|
| + TraceEvent.begin("ChromeLauncherActivity.onCreate");
|
| try {
|
| - super.onCreate(savedInstanceState);
|
| + doOnCreate(savedInstanceState);
|
| } finally {
|
| StrictMode.setThreadPolicy(oldPolicy);
|
| + TraceEvent.end("ChromeLauncherActivity.onCreate");
|
| }
|
| + }
|
| +
|
| + private final void doOnCreate(Bundle savedInstanceState) {
|
| + super.onCreate(savedInstanceState);
|
| // This Activity is only transient. It launches another activity and
|
| // terminates itself. However, some of the work is performed outside of
|
| // {@link Activity#onCreate()}. To capture this, the TraceEvent starts
|
| // in onCreate(), and ends in onPause().
|
| - TraceEvent.begin("ChromeLauncherActivity");
|
| // Needs to be called as early as possible, to accurately capture the
|
| // time at which the intent was received.
|
| IntentHandler.addTimestampToIntent(getIntent());
|
| @@ -220,8 +226,8 @@ public class ChromeLauncherActivity extends Activity
|
| }
|
|
|
| @Override
|
| - public void onPause() {
|
| - super.onPause();
|
| + public void onDestroy() {
|
| + super.onDestroy();
|
| TraceEvent.end("ChromeLauncherActivity");
|
| }
|
|
|
|
|