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

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

Issue 2302373003: [Android] Delete the logcat file after appending it to the minidump. (Closed)
Patch Set: Created 4 years, 3 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: chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpPreparationCallable.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpPreparationCallable.java b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpPreparationCallable.java
index 0518c41a0dc6aa0ed62c2dd7fc12e1cff088022d..ad9f219b7e8fc9ffa15d72931bfa681e7693e843 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpPreparationCallable.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpPreparationCallable.java
@@ -183,12 +183,15 @@ public class MinidumpPreparationCallable implements Callable<Boolean> {
@Override
public Boolean call() throws IOException {
// By default set the basic minidump to be uploaded. That way, even if
- // there are errors augmenting the minidump with logcat data something
- // can still upload something.
+ // there are errors augmenting the minidump with logcat data, the service
+ // can still upload the unaugmented minidump.
List<String> logcat = getLogcatAsList();
boolean success = true;
if (!logcat.isEmpty()) {
success = augmentTargetFile(logcat);
+ if (success && !mLogcatFile.delete()) {
+ Log.w(TAG, "Failed to delete logcat file: " + mLogcatFile.getName());
+ }
}
if (mRedirectIntent != null) {
mContext.startService(mRedirectIntent);
« 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