org.chromium.chrome.browser.precache.PrecacheUMA Java Examples

The following examples show how to use org.chromium.chrome.browser.precache.PrecacheUMA. 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: ChromeBackgroundService.java    From delion with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
@SuppressFBWarnings("DM_EXIT")
protected void launchBrowser(Context context, String tag) {
    Log.i(TAG, "Launching browser");
    try {
        ChromeBrowserInitializer.getInstance(this).handleSynchronousStartup();
    } catch (ProcessInitException e) {
        Log.e(TAG, "ProcessInitException while starting the browser process");
        switch (tag) {
            case PrecacheController.PERIODIC_TASK_TAG:
            case PrecacheController.CONTINUATION_TASK_TAG:
                // Record the failure persistently, and upload to UMA when the library
                // successfully loads next time.
                PrecacheUMA.record(PrecacheUMA.Event.PRECACHE_TASK_LOAD_LIBRARY_FAIL);
                break;
            default:
                break;
        }
        // Since the library failed to initialize nothing in the application
        // can work, so kill the whole application not just the activity.
        System.exit(-1);
    }
}
 
Example #2
Source File: ChromeBackgroundService.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
@SuppressFBWarnings("DM_EXIT")
protected void launchBrowser(Context context, String tag) {
    Log.i(TAG, "Launching browser");
    try {
        ChromeBrowserInitializer.getInstance(this).handleSynchronousStartup();
    } catch (ProcessInitException e) {
        Log.e(TAG, "ProcessInitException while starting the browser process");
        switch (tag) {
            case PrecacheController.PERIODIC_TASK_TAG:
            case PrecacheController.CONTINUATION_TASK_TAG:
                // Record the failure persistently, and upload to UMA when the library
                // successfully loads next time.
                PrecacheUMA.record(PrecacheUMA.Event.PRECACHE_TASK_LOAD_LIBRARY_FAIL);
                break;
            default:
                break;
        }
        // Since the library failed to initialize nothing in the application
        // can work, so kill the whole application not just the activity.
        System.exit(-1);
    }
}
 
Example #3
Source File: ChromeBackgroundService.java    From 365browser with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
@SuppressFBWarnings("DM_EXIT")
protected void launchBrowser(Context context, String tag) {
    Log.i(TAG, "Launching browser");
    try {
        ChromeBrowserInitializer.getInstance(this).handleSynchronousStartup();
    } catch (ProcessInitException e) {
        Log.e(TAG, "ProcessInitException while starting the browser process");
        switch (tag) {
            case PrecacheController.PERIODIC_TASK_TAG:
            case PrecacheController.CONTINUATION_TASK_TAG:
                // Record the failure persistently, and upload to UMA when the library
                // successfully loads next time.
                PrecacheUMA.record(PrecacheUMA.Event.PRECACHE_TASK_LOAD_LIBRARY_FAIL);
                break;
            default:
                break;
        }
        // Since the library failed to initialize nothing in the application
        // can work, so kill the whole application not just the activity.
        System.exit(-1);
    }
}