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

Unified Diff: components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java

Issue 2751903004: [Cleanup] Document the CrashFileManager state machine. (Closed)
Patch Set: Remove misleading Webview notes 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java
diff --git a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java
index f833c811d591afad87db4e442371156f4599a293..c45418c38f190cd9af883ea5adf45401d119a4e1 100644
--- a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java
+++ b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java
@@ -29,9 +29,27 @@ import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
/**
- * Responsible for the Crash Report directory. It routinely scans the directory
- * for new Minidump files and takes appropriate actions by either uploading new
- * crash dumps or deleting old ones.
+ * The CrashFileManager is responsible for managing the "Crash Reports" directory containing
+ * minidump files and shepherding them through a state machine represented by the file names. Note
+ * that some of the steps are optional:
+ * 1. foo.dmp is a minidump file, written to the directory by Breakpad.
+ * (2) foo.dmpNNNNN is a minidump file, where NNNNN is the PID (process id) of the crashing
+ * process. This step is optional -- that is, a minidump could fail to have its PID included in
+ * the filename.
+ * (3) foo.dmpNNNNN.try0 is a minidump file with recent logcat output attached to it. This step is
+ * optional -- that is, logcat output might fail to be extracted for the minidump. Notably,
+ * Webview-generated minidumps do not include logcat output.
+ * 4. foo.dmpNNNNN.tryM for M > 0 is a minidump file that's been attempted to be uploaded to the
+ * crash server, but for which M upload attempts have failed.
+ * 5. foo.up, foo.upNNNNN, or foo.upNNNNN.tryM are all valid possible names for a successfully
+ * uploaded file.
+ * 6. foo.skipped, foo.skippedNNNNN, or foo.skippedNNNNN.tryM are all valid possible names for a
+ * file whose upload was skipped. An upload may be skipped, for example, if the user has not
+ * consented to uploading crash reports. These files are marked as skipped rather than deleted
+ * immediately to allow the user to manually initiate an upload.
+ * 7. foo.forced, foo.forcedNNNNN, or foo.forcedNNNNN.tryM are all valid possible names for a file
+ * that the user has manually requested to upload.
+ * 8. foo.tmp is a temporary file.
*/
public class CrashFileManager {
private static final String TAG = "CrashFileManager";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698