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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/crash/CrashReceiverService.java

Issue 2751333004: [Crash Reporting] Only upload Chrome crash reports over unmetered networks. (Closed)
Patch Set: Rebase Created 3 years, 8 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.android_webview.crash; 5 package org.chromium.android_webview.crash;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.app.Service; 8 import android.app.Service;
9 import android.app.job.JobInfo; 9 import android.app.job.JobInfo;
10 import android.content.ComponentName; 10 import android.content.ComponentName;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 Log.e(TAG, "Was interrupted when waiting to copy minidumps", e); 92 Log.e(TAG, "Was interrupted when waiting to copy minidumps", e);
93 return false; 93 return false;
94 } 94 }
95 } 95 }
96 mIsCopying = true; 96 mIsCopying = true;
97 return true; 97 return true;
98 } 98 }
99 } 99 }
100 100
101 private void scheduleNewJob() { 101 private void scheduleNewJob() {
102 JobInfo.Builder builder = 102 JobInfo.Builder builder = new JobInfo.Builder(TaskIds.WEBVIEW_MINIDUMP_U PLOADING_JOB_ID,
103 new JobInfo 103 new ComponentName(this, AwMinidumpUploadJobService.class));
104 .Builder(TaskIds.WEBVIEW_MINIDUMP_UPLOADING_JOB_ID,
105 new ComponentName(this, AwMinidumpUploadJobServi ce.class))
106 .setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED);
107 MinidumpUploadJobService.scheduleUpload(this, builder); 104 MinidumpUploadJobService.scheduleUpload(this, builder);
108 } 105 }
109 106
110 /** 107 /**
111 * Copy minidumps from the {@param fileDescriptors} to the directory where W ebView stores its 108 * Copy minidumps from the {@param fileDescriptors} to the directory where W ebView stores its
112 * minidump files. {@param context} is used to look up the directory in whic h the files will be 109 * minidump files. {@param context} is used to look up the directory in whic h the files will be
113 * saved. 110 * saved.
114 * @return whether any minidump was copied. 111 * @return whether any minidump was copied.
115 */ 112 */
116 @VisibleForTesting 113 @VisibleForTesting
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 @VisibleForTesting 196 @VisibleForTesting
200 public static File getWebViewTmpCrashDir(Context context) { 197 public static File getWebViewTmpCrashDir(Context context) {
201 return new File(context.getCacheDir(), WEBVIEW_TMP_CRASH_DIR); 198 return new File(context.getCacheDir(), WEBVIEW_TMP_CRASH_DIR);
202 } 199 }
203 200
204 @Override 201 @Override
205 public IBinder onBind(Intent intent) { 202 public IBinder onBind(Intent intent) {
206 return mBinder; 203 return mBinder;
207 } 204 }
208 } 205 }
OLDNEW
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/crash/AwMinidumpUploaderDelegate.java ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698