Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/util/CrashReportingPermissionManager.java

Issue 2737263006: [Android Crash Reporting] Allow uploading minidumps via the JobScheduler (Closed)
Patch Set: Assert that job scheduled successfully Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.components.minidump_uploader.util; 5 package org.chromium.components.minidump_uploader.util;
6 6
7 /** 7 /**
8 * Interface for crash reporting permissions. 8 * Interface for crash reporting permissions.
9 */ 9 */
10 public interface CrashReportingPermissionManager { 10 public interface CrashReportingPermissionManager {
11 /** 11 /**
12 * Checks whether this client is in-sample for usage metrics and crash repor ting. See 12 * Checks whether this client is in-sample for usage metrics and crash repor ting. See
13 * {@link org.chromium.chrome.browser.metrics.UmaUtils#isClientInMetricsSamp le} for details. 13 * {@link org.chromium.chrome.browser.metrics.UmaUtils#isClientInMetricsSamp le} for details.
14 * 14 *
15 * @returns boolean Whether client is in-sample. 15 * @returns boolean Whether client is in-sample.
16 */ 16 */
17 public boolean isClientInMetricsSample(); 17 public boolean isClientInMetricsSample();
18 18
19 /** 19 /**
20 * Checks whether uploading of crash dumps is permitted for the available ne twork(s). 20 * Checks whether uploading of crash dumps is permitted for the available ne twork(s).
21 * 21 *
22 * @return whether uploading crash dumps is permitted. 22 * @return whether uploading crash dumps is permitted.
23 */ 23 */
24 public boolean isNetworkAvailableForCrashUploads(); 24 public boolean isNetworkAvailableForCrashUploads();
25 25
26 /** 26 // TODO(isherman): Remove this function. It's only used for an assertion, an d our JobService
27 * Checks whether uploading of crash dumps is permitted, based on the corres ponding command line 27 // implementations simply hardcode their return value to true.
28 * flag only.
29 *
30 * @return whether uploading of crash dumps is enabled or disabled by a comm and line flag.
31 */
32 public boolean isCrashUploadDisabledByCommandLine();
33
34 /** 28 /**
35 * Checks whether uploading of usage metrics is currently permitted. This is a combination of 29 * Checks whether uploading of usage metrics is currently permitted. This is a combination of
36 * the below checks, plus networking restrictions. 30 * the below checks, plus networking restrictions.
37 * 31 *
38 * @return whether uploading usage metrics is currently permitted. 32 * @return whether uploading usage metrics is currently permitted.
39 */ 33 */
40 public boolean isMetricsUploadPermitted(); 34 public boolean isMetricsUploadPermitted();
41 35
36 // TODO(isherman): Remove this function. It was previously used to enable a specific type of
37 // test, but it should not be necessary anymore. (Note: There are currently some clients that do
38 // partly depend on it, so it is not necessarily safe to remove without cont acting those
39 // clients.)
40 /**
41 * Checks whether uploading of crash dumps is permitted, based on the corres ponding command line
42 * flag only.
43 *
44 * @return whether uploading of crash dumps is enabled or disabled by a comm and line flag.
45 */
46 public boolean isCrashUploadDisabledByCommandLine();
47
42 /** 48 /**
43 * Checks whether uploading of usage metrics and crash dumps is currently pe rmitted, based on 49 * Checks whether uploading of usage metrics and crash dumps is currently pe rmitted, based on
44 * user consent only. 50 * user consent only.
45 * 51 *
46 * @return whether the user has consented to reporting usage metrics and cra sh dumps. 52 * @return whether the user has consented to reporting usage metrics and cra sh dumps.
47 */ 53 */
48 public boolean isUsageAndCrashReportingPermittedByUser(); 54 public boolean isUsageAndCrashReportingPermittedByUser();
49 55
50 /** 56 /**
51 * Checks whether to ignore all consent and upload limitations for usage met rics and crash 57 * Checks whether to ignore all consent and upload limitations for usage met rics and crash
52 * reporting. Used by test devices to avoid a UI dependency. 58 * reporting. Used by test devices to avoid a UI dependency.
53 * 59 *
54 * @return whether crash dumps should be uploaded if at all possible. 60 * @return whether crash dumps should be uploaded if at all possible.
55 */ 61 */
56 public boolean isUploadEnabledForTests(); 62 public boolean isUploadEnabledForTests();
57 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698