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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploaderDelegate.java
diff --git a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploaderDelegate.java b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploaderDelegate.java
index 83b8e8101e683026b604c05646f9fa4de7525c3f..bd3e72764b0c1c6e83f36c6d3d2d86f38762d54b 100644
--- a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploaderDelegate.java
+++ b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploaderDelegate.java
@@ -13,10 +13,13 @@ import java.io.File;
*/
public interface MinidumpUploaderDelegate {
/**
- * Creates the directory in which the embedder will store its minidumps.
- * @return A reference to the created directory, or null if the creation failed.
+ * Returns the parent directory in which the embedder will store the crash report directory and
+ * its minidumps. That is, if this method returns the directory ".../parent/", the embedder
+ * should store minidumps in the directory ".../parent/Crash Reports/".
+ * @return A reference to the directory, or null if the directory did not exist and creation
+ * failed.
*/
- File createCrashDir();
+ File getCrashParentDir();
/**
* Creates the permission manager used to evaluate whether uploading should be allowed.
@@ -30,4 +33,17 @@ public interface MinidumpUploaderDelegate {
* @param startUploads The continuation to call once any necessary pre-work is completed.
*/
void prepareToUploadMinidumps(Runnable startUploads);
+
+ /**
+ * Record a metric that the {@param minidump} was uploaded successfully.
+ * @param minidump The minidump filename, prior to the upload attempt.
+ */
+ void recordUploadSuccess(File minidump);
+
+ /**
+ * Record a metric that the {@param minidump} failed to be uploaded. This is only called after
+ * all retries are exhausted.
+ * @param minidump The minidump filename, prior to the upload attempt.
+ */
+ void recordUploadFailure(File minidump);
}

Powered by Google App Engine
This is Rietveld 408576698