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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/crash/CrashFileManager.java

Issue 1579723002: Add a file observer to monitor if there is a crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call "start watching" static method instead of calling the startWatching method from an instance Created 4 years, 11 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: chrome/android/java/src/org/chromium/chrome/browser/crash/CrashFileManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/crash/CrashFileManager.java b/chrome/android/java/src/org/chromium/chrome/browser/crash/CrashFileManager.java
index b03cfeba08cc52c3972a9d06cd1a3faf962fd772..a1e5ac05161471449e7d326e31e628bc28a2e7a2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/crash/CrashFileManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/crash/CrashFileManager.java
@@ -33,6 +33,9 @@ public class CrashFileManager {
private static final Pattern MINIDUMP_FIRST_TRY_PATTERN =
Pattern.compile("\\.dmp([0-9]*)$\\z");
+ private static final Pattern MINIDUMP_MIME_FIRST_TRY_PATTERN =
+ Pattern.compile("\\.dmp([0-9]+)$\\z");
+
private static final Pattern MINIDUMP_PATTERN =
Pattern.compile("\\.dmp([0-9]*)(\\.try[0-9])?\\z");
@@ -79,6 +82,10 @@ public class CrashFileManager {
return getMatchingFiles(MINIDUMP_FIRST_TRY_PATTERN);
}
+ public static boolean isMinidumpMIMEFirstTry(String path) {
+ return MINIDUMP_MIME_FIRST_TRY_PATTERN.matcher(path).find();
+ }
+
public static String tryIncrementAttemptNumber(File mFileToUpload) {
String newName = filenameWithIncrementedAttemptNumber(mFileToUpload.getPath());
return mFileToUpload.renameTo(new File(newName)) ? newName : null;

Powered by Google App Engine
This is Rietveld 408576698