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

Unified Diff: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java

Issue 662393005: Chromecast: crash upload logic improvements for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java
index bc1631ccb62f75e036e15d9eb2b0889aed9abebd..d8f50fc8ff330679772a649e348c33ce6fd62a5c 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastCrashUploader.java
@@ -100,7 +100,7 @@ public final class CastCrashUploader {
public void run() {
// Multipart dump filename has format "[random string].dmp[pid]", e.g.
// 20597a65-b822-008e-31f8fc8e-02bb45c0.dmp18169
- queueAllCrashDumpUpload(".*\\.dmp\\d+", null);
+ queueAllCrashDumpUpload(".*\\.dmp\\d*", null);
}
});
}
@@ -183,6 +183,12 @@ public final class CastCrashUploader {
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != HttpStatus.SC_OK) {
Log.e(TAG, "Failed response (" + statusCode + "): " + responseLine);
+
+ // 400 Bad Request is returned if the dump file is malformed. Delete file
+ // to prevent re-attempting later.
+ if (statusCode == HttpStatus.SC_BAD_REQUEST) {
+ dumpFile.delete();
+ }
return;
}
« 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