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

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

Issue 2737263006: [Android Crash Reporting] Allow uploading minidumps via the JobScheduler (Closed)
Patch Set: Fully implemented, still needs tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.components.minidump_uploader; 5 package org.chromium.components.minidump_uploader;
6 6
7 import android.support.annotation.Nullable; 7 import android.support.annotation.Nullable;
8 8
9 import org.chromium.base.Log; 9 import org.chromium.base.Log;
10 import org.chromium.base.VisibleForTesting; 10 import org.chromium.base.VisibleForTesting;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 public static final String CRASH_DUMP_DIR = "Crash Reports"; 42 public static final String CRASH_DUMP_DIR = "Crash Reports";
43 43
44 // This should mirror the C++ CrashUploadList::kReporterLogFilename variable . 44 // This should mirror the C++ CrashUploadList::kReporterLogFilename variable .
45 @VisibleForTesting 45 @VisibleForTesting
46 public static final String CRASH_DUMP_LOGFILE = "uploads.log"; 46 public static final String CRASH_DUMP_LOGFILE = "uploads.log";
47 47
48 private static final Pattern MINIDUMP_MIME_FIRST_TRY_PATTERN = 48 private static final Pattern MINIDUMP_MIME_FIRST_TRY_PATTERN =
49 Pattern.compile("\\.dmp([0-9]+)$\\z"); 49 Pattern.compile("\\.dmp([0-9]+)$\\z");
50 50
51 private static final Pattern MINIDUMP_PATTERN = 51 private static final Pattern MINIDUMP_PATTERN =
52 Pattern.compile("\\.dmp([0-9]*)(\\.try([0-9]+))?\\z"); 52 Pattern.compile("\\.(dmp|forced)([0-9]*)(\\.try([0-9]+))?\\z");
gsennton 2017/03/13 17:57:17 Will this change any behaviour in the old implemen
Ilya Sherman 2017/03/14 02:18:55 This does correct a bug in the old implementation,
53 53
54 private static final Pattern UPLOADED_MINIDUMP_PATTERN = Pattern.compile("\\ .up([0-9]*)\\z"); 54 private static final Pattern UPLOADED_MINIDUMP_PATTERN = Pattern.compile("\\ .up([0-9]*)\\z");
55 55
56 private static final String NOT_YET_UPLOADED_MINIDUMP_SUFFIX = ".dmp"; 56 private static final String NOT_YET_UPLOADED_MINIDUMP_SUFFIX = ".dmp";
57 57
58 private static final String UPLOADED_MINIDUMP_SUFFIX = ".up"; 58 private static final String UPLOADED_MINIDUMP_SUFFIX = ".up";
59 59
60 private static final String UPLOAD_SKIPPED_MINIDUMP_SUFFIX = ".skipped"; 60 private static final String UPLOAD_SKIPPED_MINIDUMP_SUFFIX = ".skipped";
61 61
62 private static final String UPLOAD_FORCED_MINIDUMP_SUFFIX = ".forced"; 62 private static final String UPLOAD_FORCED_MINIDUMP_SUFFIX = ".forced";
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 /** 566 /**
567 * Create a temporary file to store a minidump in before renaming it with a real minidump name. 567 * Create a temporary file to store a minidump in before renaming it with a real minidump name.
568 * @return a new temporary file with prefix {@param prefix} stored in the di rectory 568 * @return a new temporary file with prefix {@param prefix} stored in the di rectory
569 * {@param directory}. 569 * {@param directory}.
570 * 570 *
571 */ 571 */
572 private static File createMinidumpTmpFile(File directory) throws IOException { 572 private static File createMinidumpTmpFile(File directory) throws IOException {
573 return File.createTempFile("webview_minidump", TMP_SUFFIX, directory); 573 return File.createTempFile("webview_minidump", TMP_SUFFIX, directory);
574 } 574 }
575 } 575 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698