Java Code Examples for org.chromium.chrome.browser.metrics.UmaUtils#recordForegroundStartTime()

The following examples show how to use org.chromium.chrome.browser.metrics.UmaUtils#recordForegroundStartTime() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChromeActivitySessionTracker.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
/**
 * Called when a top-level Chrome activity (ChromeTabbedActivity, FullscreenActivity) is
 * started in foreground. It will not be called again when other Chrome activities take over
 * (see onStart()), that is, when correct activity calls startActivity() for another Chrome
 * activity.
 */
private void onForegroundSessionStart() {
    UmaUtils.recordForegroundStartTime();
    ChildProcessLauncher.onBroughtToForeground();
    updatePasswordEchoState();
    FontSizePrefs.getInstance(mApplication).onSystemFontScaleChanged();
    updateAcceptLanguages();
    mVariationsSession.start(mApplication);
    mPowerBroadcastReceiver.onForegroundSessionStart();

    // Track the ratio of Chrome startups that are caused by notification clicks.
    // TODO(johnme): Add other reasons (and switch to recordEnumeratedHistogram).
    RecordHistogram.recordBooleanHistogram(
            "Startup.BringToForegroundReason",
            NotificationPlatformBridge.wasNotificationRecentlyClicked());
}
 
Example 2
Source File: ChromeActivitySessionTracker.java    From 365browser with Apache License 2.0 6 votes vote down vote up
/**
 * Called when a top-level Chrome activity (ChromeTabbedActivity, FullscreenActivity) is
 * started in foreground. It will not be called again when other Chrome activities take over
 * (see onStart()), that is, when correct activity calls startActivity() for another Chrome
 * activity.
 */
private void onForegroundSessionStart() {
    UmaUtils.recordForegroundStartTime();
    ChildProcessLauncher.onBroughtToForeground();
    updatePasswordEchoState();
    FontSizePrefs.getInstance(mApplication).onSystemFontScaleChanged();
    updateAcceptLanguages();
    mVariationsSession.start(mApplication);
    mPowerBroadcastReceiver.onForegroundSessionStart();

    // Track the ratio of Chrome startups that are caused by notification clicks.
    // TODO(johnme): Add other reasons (and switch to recordEnumeratedHistogram).
    RecordHistogram.recordBooleanHistogram(
            "Startup.BringToForegroundReason",
            NotificationPlatformBridge.wasNotificationRecentlyClicked());
}
 
Example 3
Source File: FirstRunActivity.java    From 365browser with Apache License 2.0 6 votes vote down vote up
@Override
public void onStart() {
    super.onStart();
    // Since the FRE may be shown before any tab is shown, mark that this is the point at
    // which Chrome went to foreground. This is needed as otherwise an assert will be hit
    // in UmaUtils.getForegroundStartTime() when recording the time taken to load the first
    // page (which happens after native has been initialized possibly while FRE is still
    // active).
    UmaUtils.recordForegroundStartTime();
    stopProgressionIfNotAcceptedTermsOfService();
    if (!mFreProperties.getBoolean(EXTRA_USE_FRE_FLOW_SEQUENCER)) {
        if (FirstRunStatus.getFirstRunFlowComplete()) {
            // This is a parallel flow that needs to be refreshed/re-fired.
            // Signal the FRE flow completion and re-launch the original intent.
            completeFirstRunExperience();
        }
    }
}