OLD | NEW |
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; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
9 import android.app.Activity; | 9 import android.app.Activity; |
10 import android.app.ActivityManager; | 10 import android.app.ActivityManager; |
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 AutocompleteController.nativePrefetchZeroSuggestResults(); | 1450 AutocompleteController.nativePrefetchZeroSuggestResults(); |
1451 | 1451 |
1452 LauncherShortcutActivity.updateIncognitoShortcut(ChromeTabbedAct
ivity.this); | 1452 LauncherShortcutActivity.updateIncognitoShortcut(ChromeTabbedAct
ivity.this); |
1453 } | 1453 } |
1454 }); | 1454 }); |
1455 } | 1455 } |
1456 | 1456 |
1457 @Override | 1457 @Override |
1458 protected void recordIntentToCreationTime(long timeMs) { | 1458 protected void recordIntentToCreationTime(long timeMs) { |
1459 super.recordIntentToCreationTime(timeMs); | 1459 super.recordIntentToCreationTime(timeMs); |
1460 | 1460 RecordHistogram.recordCustomTimesHistogram("MobileStartup.IntentToCreati
onTime.TabbedMode", |
1461 RecordHistogram.recordTimesHistogram( | 1461 timeMs, 1, TimeUnit.SECONDS.toMillis(30), TimeUnit.MILLISECONDS,
50); |
1462 "MobileStartup.IntentToCreationTime.TabbedMode", timeMs, TimeUni
t.MILLISECONDS); | |
1463 } | 1462 } |
1464 | 1463 |
1465 @Override | 1464 @Override |
1466 protected boolean isStartedUpCorrectly(Intent intent) { | 1465 protected boolean isStartedUpCorrectly(Intent intent) { |
1467 // If tabs from this instance were merged into a different ChromeTabbedA
ctivity instance | 1466 // If tabs from this instance were merged into a different ChromeTabbedA
ctivity instance |
1468 // and the other instance is still running, then this instance should no
t be created. This | 1467 // and the other instance is still running, then this instance should no
t be created. This |
1469 // may happen if the process is restarted e.g. on upgrade or from about:
//flags. | 1468 // may happen if the process is restarted e.g. on upgrade or from about:
//flags. |
1470 // See crbug.com/657418 | 1469 // See crbug.com/657418 |
1471 boolean tabsMergedIntoAnotherInstance = | 1470 boolean tabsMergedIntoAnotherInstance = |
1472 sMergedInstanceTaskId != 0 && sMergedInstanceTaskId != getTaskId
(); | 1471 sMergedInstanceTaskId != 0 && sMergedInstanceTaskId != getTaskId
(); |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2107 | 2106 |
2108 private boolean shouldCreateNewTabsUsingBottomSheet() { | 2107 private boolean shouldCreateNewTabsUsingBottomSheet() { |
2109 if (mShouldCreateNewTabsUsingBottomSheet == null) { | 2108 if (mShouldCreateNewTabsUsingBottomSheet == null) { |
2110 mShouldCreateNewTabsUsingBottomSheet = getBottomSheet() != null | 2109 mShouldCreateNewTabsUsingBottomSheet = getBottomSheet() != null |
2111 && ChromeFeatureList.isEnabled(ChromeFeatureList.CHROME_HOME
_NTP_REDESIGN); | 2110 && ChromeFeatureList.isEnabled(ChromeFeatureList.CHROME_HOME
_NTP_REDESIGN); |
2112 } | 2111 } |
2113 | 2112 |
2114 return mShouldCreateNewTabsUsingBottomSheet; | 2113 return mShouldCreateNewTabsUsingBottomSheet; |
2115 } | 2114 } |
2116 } | 2115 } |
OLD | NEW |