| 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.android_webview.crash; | 5 package org.chromium.android_webview.crash; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.net.ConnectivityManager; | 8 import android.net.ConnectivityManager; |
| 9 import android.webkit.ValueCallback; | 9 import android.webkit.ValueCallback; |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 @VisibleForTesting | 31 @VisibleForTesting |
| 32 public AwMinidumpUploaderDelegate() { | 32 public AwMinidumpUploaderDelegate() { |
| 33 mConnectivityManager = | 33 mConnectivityManager = |
| 34 (ConnectivityManager) ContextUtils.getApplicationContext().getSy
stemService( | 34 (ConnectivityManager) ContextUtils.getApplicationContext().getSy
stemService( |
| 35 Context.CONNECTIVITY_SERVICE); | 35 Context.CONNECTIVITY_SERVICE); |
| 36 } | 36 } |
| 37 | 37 |
| 38 @Override | 38 @Override |
| 39 public File getCrashParentDir() { | 39 public File getCrashParentDir() { |
| 40 return CrashReceiverService.getOrCreateWebViewCrashDir(); | 40 return CrashReceiverService.getWebViewCrashDir(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 @Override | 43 @Override |
| 44 public CrashReportingPermissionManager createCrashReportingPermissionManager
() { | 44 public CrashReportingPermissionManager createCrashReportingPermissionManager
() { |
| 45 return new CrashReportingPermissionManager() { | 45 return new CrashReportingPermissionManager() { |
| 46 @Override | 46 @Override |
| 47 public boolean isClientInMetricsSample() { | 47 public boolean isClientInMetricsSample() { |
| 48 // We will check whether the client is in the metrics sample bef
ore | 48 // We will check whether the client is in the metrics sample bef
ore |
| 49 // generating a minidump - so if no minidump is generated this c
ode will | 49 // generating a minidump - so if no minidump is generated this c
ode will |
| 50 // never run and we don't need to check whether we are in the sa
mple. | 50 // never run and we don't need to check whether we are in the sa
mple. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 }); | 85 }); |
| 86 } | 86 } |
| 87 | 87 |
| 88 @Override | 88 @Override |
| 89 public void recordUploadSuccess(File minidump) {} | 89 public void recordUploadSuccess(File minidump) {} |
| 90 | 90 |
| 91 @Override | 91 @Override |
| 92 public void recordUploadFailure(File minidump) {} | 92 public void recordUploadFailure(File minidump) {} |
| 93 } | 93 } |
| OLD | NEW |