Java Code Examples for org.chromium.chrome.browser.preferences.ChromePreferenceManager#setCrashSuccessUploadCount()

The following examples show how to use org.chromium.chrome.browser.preferences.ChromePreferenceManager#setCrashSuccessUploadCount() . 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: MinidumpUploadService.java    From delion with Apache License 2.0 6 votes vote down vote up
/**
 * Stores the successes and failures from uploading crash to UMA,
 */
public static void storeBreakpadUploadStatsInUma(ChromePreferenceManager pref) {
    for (String type : TYPES) {
        for (int success = pref.getCrashSuccessUploadCount(type); success > 0; success--) {
            RecordHistogram.recordEnumeratedHistogram(
                    HISTOGRAM_NAME_PREFIX + type,
                    SUCCESS,
                    HISTOGRAM_MAX);
        }
        for (int fail = pref.getCrashFailureUploadCount(type); fail > 0; fail--) {
            RecordHistogram.recordEnumeratedHistogram(
                    HISTOGRAM_NAME_PREFIX + type,
                    FAILURE,
                    HISTOGRAM_MAX);
        }

        pref.setCrashSuccessUploadCount(type, 0);
        pref.setCrashFailureUploadCount(type, 0);
    }
}
 
Example 2
Source File: MinidumpUploadService.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
/**
 * Stores the successes and failures from uploading crash to UMA,
 */
public static void storeBreakpadUploadStatsInUma(ChromePreferenceManager pref) {
    for (String type : TYPES) {
        for (int success = pref.getCrashSuccessUploadCount(type); success > 0; success--) {
            RecordHistogram.recordEnumeratedHistogram(
                    HISTOGRAM_NAME_PREFIX + type,
                    SUCCESS,
                    HISTOGRAM_MAX);
        }
        for (int fail = pref.getCrashFailureUploadCount(type); fail > 0; fail--) {
            RecordHistogram.recordEnumeratedHistogram(
                    HISTOGRAM_NAME_PREFIX + type,
                    FAILURE,
                    HISTOGRAM_MAX);
        }

        pref.setCrashSuccessUploadCount(type, 0);
        pref.setCrashFailureUploadCount(type, 0);
    }
}
 
Example 3
Source File: MinidumpUploadService.java    From 365browser with Apache License 2.0 6 votes vote down vote up
/**
 * Stores the successes and failures from uploading crash to UMA,
 */
public static void storeBreakpadUploadStatsInUma(ChromePreferenceManager pref) {
    for (String type : TYPES) {
        for (int success = pref.getCrashSuccessUploadCount(type); success > 0; success--) {
            RecordHistogram.recordEnumeratedHistogram(
                    HISTOGRAM_NAME_PREFIX + type, SUCCESS, HISTOGRAM_MAX);
        }
        for (int fail = pref.getCrashFailureUploadCount(type); fail > 0; fail--) {
            RecordHistogram.recordEnumeratedHistogram(
                    HISTOGRAM_NAME_PREFIX + type, FAILURE, HISTOGRAM_MAX);
        }

        pref.setCrashSuccessUploadCount(type, 0);
        pref.setCrashFailureUploadCount(type, 0);
    }
}