| OLD | NEW |
| 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 org.chromium.components.minidump_uploader.util.CrashReportingPermissionMa
nager; | 7 import org.chromium.components.minidump_uploader.util.CrashReportingPermissionMa
nager; |
| 8 | 8 |
| 9 import java.io.File; | 9 import java.io.File; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * Interface for embedder-specific implementations for uploading minidumps. | 12 * Interface for embedder-specific implementations for uploading minidumps. |
| 13 */ | 13 */ |
| 14 public interface MinidumpUploaderDelegate { | 14 public interface MinidumpUploaderDelegate { |
| 15 /** | 15 /** |
| 16 * Creates the directory in which the embedder will store its minidumps. | 16 * Returns the application context's cache directory, in which the embedder
will store its |
| 17 * @return A reference to the created directory, or null if the creation fai
led. | 17 * minidumps. |
| 18 * @return A reference to the cache directory, or null if the directory did
not exist and |
| 19 * creation failed. |
| 18 */ | 20 */ |
| 19 File createCrashDir(); | 21 File getCacheDir(); |
| 20 | 22 |
| 21 /** | 23 /** |
| 22 * Creates the permission manager used to evaluate whether uploading should
be allowed. | 24 * Creates the permission manager used to evaluate whether uploading should
be allowed. |
| 23 * @return The permission manager. | 25 * @return The permission manager. |
| 24 */ | 26 */ |
| 25 CrashReportingPermissionManager createCrashReportingPermissionManager(); | 27 CrashReportingPermissionManager createCrashReportingPermissionManager(); |
| 26 | 28 |
| 27 /** | 29 /** |
| 28 * Performs any pre-work necessary for uploading minidumps, then calls the {
@param startUploads} | 30 * Performs any pre-work necessary for uploading minidumps, then calls the {
@param startUploads} |
| 29 * continuation to initiate uploading the minidumps. | 31 * continuation to initiate uploading the minidumps. |
| 30 * @param startUploads The continuation to call once any necessary pre-work
is completed. | 32 * @param startUploads The continuation to call once any necessary pre-work
is completed. |
| 31 */ | 33 */ |
| 32 void prepareToUploadMinidumps(Runnable startUploads); | 34 void prepareToUploadMinidumps(Runnable startUploads); |
| 33 } | 35 } |
| OLD | NEW |