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

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

Issue 2737263006: [Android Crash Reporting] Allow uploading minidumps via the JobScheduler (Closed)
Patch Set: Suppress irrelevant FindBugs warnings for test changes 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; 5 package org.chromium.components.minidump_uploader;
6 6
7 import org.chromium.components.minidump_uploader.util.CrashReportingPermissionMa nager; 7 import org.chromium.components.minidump_uploader.util.CrashReportingPermissionMa nager;
8 8
9 import java.io.File; 9 import java.io.File;
10 10
11 /** 11 /**
12 * Interface for embedder-specific implementations for uploading minidumps. 12 * Interface for embedder-specific implementations for uploading minidumps.
13 */ 13 */
14 public interface MinidumpUploaderDelegate { 14 public interface MinidumpUploaderDelegate {
15 /** 15 /**
16 * Creates the directory in which the embedder will store its minidumps. 16 * Returns the parent directory in which the embedder will store the crash r eport directory and
17 * @return A reference to the created directory, or null if the creation fai led. 17 * its minidumps. That is, if this method returns the directory ".../parent/ ", the embedder
18 * should store minidumps in the directory ".../parent/Crash Reports/".
19 * @return A reference to the directory, or null if the directory did not ex ist and creation
20 * failed.
18 */ 21 */
19 File createCrashDir(); 22 File getCrashParentDir();
20 23
21 /** 24 /**
22 * Creates the permission manager used to evaluate whether uploading should be allowed. 25 * Creates the permission manager used to evaluate whether uploading should be allowed.
23 * @return The permission manager. 26 * @return The permission manager.
24 */ 27 */
25 CrashReportingPermissionManager createCrashReportingPermissionManager(); 28 CrashReportingPermissionManager createCrashReportingPermissionManager();
26 29
27 /** 30 /**
28 * Performs any pre-work necessary for uploading minidumps, then calls the { @param startUploads} 31 * Performs any pre-work necessary for uploading minidumps, then calls the { @param startUploads}
29 * continuation to initiate uploading the minidumps. 32 * continuation to initiate uploading the minidumps.
30 * @param startUploads The continuation to call once any necessary pre-work is completed. 33 * @param startUploads The continuation to call once any necessary pre-work is completed.
31 */ 34 */
32 void prepareToUploadMinidumps(Runnable startUploads); 35 void prepareToUploadMinidumps(Runnable startUploads);
36
37 /**
38 * Record a metric that the {@param minidump} was uploaded successfully.
39 * @param minidump The minidump filename, prior to the upload attempt.
40 */
41 void recordUploadSuccess(File minidump);
42
43 /**
44 * Record a metric that the {@param minidump} failed to be uploaded. This is only called after
45 * all retries are exhausted.
46 * @param minidump The minidump filename, prior to the upload attempt.
47 */
48 void recordUploadFailure(File minidump);
33 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698