org.chromium.chrome.browser.metrics.LaunchMetrics Java Examples
The following examples show how to use
org.chromium.chrome.browser.metrics.LaunchMetrics.
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: ChromeActivity.java From 365browser with Apache License 2.0 | 6 votes |
@Override public void onResumeWithNative() { super.onResumeWithNative(); markSessionResume(); RecordUserAction.record("MobileComeToForeground"); if (getActivityTab() != null) { LaunchMetrics.commitLaunchMetrics(getActivityTab().getWebContents()); } ContentViewCore cvc = getContentViewCore(); if (cvc != null) cvc.onResume(); FeatureUtilities.setCustomTabVisible(isCustomTab()); FeatureUtilities.setIsInMultiWindowMode( MultiWindowUtils.getInstance().isInMultiWindowMode(this)); VideoPersister.getInstance().cleanup(this); VrShellDelegate.maybeRegisterVrEntryHook(this); }
Example #2
Source File: ChromeActivity.java From delion with Apache License 2.0 | 5 votes |
@Override public void onResumeWithNative() { super.onResumeWithNative(); markSessionResume(); RecordUserAction.record("MobileComeToForeground"); if (getActivityTab() != null) { LaunchMetrics.commitLaunchMetrics(getActivityTab().getWebContents()); } FeatureUtilities.setCustomTabVisible(isCustomTab()); FeatureUtilities.setIsInMultiWindowMode( MultiWindowUtils.getInstance().isInMultiWindowMode(this)); }
Example #3
Source File: ChromeActivity.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void onResumeWithNative() { super.onResumeWithNative(); markSessionResume(); RecordUserAction.record("MobileComeToForeground"); if (getActivityTab() != null) { LaunchMetrics.commitLaunchMetrics(getActivityTab().getWebContents()); } FeatureUtilities.setCustomTabVisible(isCustomTab()); FeatureUtilities.setIsInMultiWindowMode( MultiWindowUtils.getInstance().isInMultiWindowMode(this)); }
Example #4
Source File: DeferredStartupHandler.java From AndroidChromium with Apache License 2.0 | 4 votes |
/** * Handle application level deferred startup tasks that can be lazily done after all * the necessary initialization has been completed. Any calls requiring network access should * probably go here. * * Keep these tasks short and break up long tasks into multiple smaller tasks, as they run on * the UI thread and are blocking. Remember to follow RAIL guidelines, as much as possible, and * that most devices are quite slow, so leave enough buffer. */ @UiThread public void initDeferredStartupForApp() { if (mDeferredStartupInitializedForApp) return; mDeferredStartupInitializedForApp = true; ThreadUtils.assertOnUiThread(); RecordHistogram.recordLongTimesHistogram( "UMA.Debug.EnableCrashUpload.DeferredStartUptime2", SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime(), TimeUnit.MILLISECONDS); mDeferredTasks.add(new Runnable() { @Override public void run() { // Punt all tasks that may block on disk off onto a background thread. initAsyncDiskTask(); AfterStartupTaskUtils.setStartupComplete(); PartnerBrowserCustomizations.setOnInitializeAsyncFinished(new Runnable() { @Override public void run() { String homepageUrl = HomepageManager.getHomepageUri(mAppContext); LaunchMetrics.recordHomePageLaunchMetrics( HomepageManager.isHomepageEnabled(mAppContext), NewTabPage.isNTPUrl(homepageUrl), homepageUrl); } }); PartnerBookmarksShim.kickOffReading(mAppContext); PowerMonitor.create(mAppContext); ShareHelper.clearSharedImages(); OfflinePageUtils.clearSharedOfflineFiles(mAppContext); } }); mDeferredTasks.add(new Runnable() { @Override public void run() { // Clear any media notifications that existed when Chrome was last killed. MediaCaptureNotificationService.clearMediaNotifications(mAppContext); startModerateBindingManagementIfNeeded(); recordKeyboardLocaleUma(); } }); mDeferredTasks.add(new Runnable() { @Override public void run() { // Start or stop Physical Web PhysicalWeb.onChromeStart(); } }); final ChromeApplication application = (ChromeApplication) mAppContext; mDeferredTasks.add(new Runnable() { @Override public void run() { // Starts syncing with GSA. application.createGsaHelper().startSync(); } }); ProcessInitializationHandler.getInstance().initializeDeferredStartupTasks(); }