Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadCallable.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadCallable.java b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadCallable.java |
| index d21a02a6553a98b47f7835c725a31586d9081a56..89433ad5b47a414b96e9dadc33475bd0beedb577 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadCallable.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadCallable.java |
| @@ -56,13 +56,15 @@ public class MinidumpUploadCallable implements Callable<Integer> { |
| UPLOAD_SUCCESS, |
| UPLOAD_FAILURE, |
| UPLOAD_USER_DISABLED, |
| - UPLOAD_COMMANDLINE_DISABLED |
| + UPLOAD_COMMANDLINE_DISABLED, |
| + UPLOAD_DISABLED_BY_SAMPLING |
| }) |
| public @interface MinidumpUploadStatus {} |
| public static final int UPLOAD_SUCCESS = 0; |
| public static final int UPLOAD_FAILURE = 1; |
| public static final int UPLOAD_USER_DISABLED = 2; |
| public static final int UPLOAD_COMMANDLINE_DISABLED = 3; |
| + public static final int UPLOAD_DISABLED_BY_SAMPLING = 4; |
| private final File mFileToUpload; |
| private final File mLogfile; |
| @@ -107,6 +109,11 @@ public class MinidumpUploadCallable implements Callable<Integer> { |
| Log.i(TAG, "Minidump cannot currently be uploaded due to constraints."); |
| return UPLOAD_FAILURE; |
| } |
| + |
| + if (!mPermManager.isClientInMetricsSample()) { |
| + Log.i(TAG, "Minidump cannot currently be uploaded due to sampling."); |
|
Ilya Sherman
2016/08/23 21:32:17
nit: "currently" seems somewhat misleading -- or d
jwd
2016/08/23 23:00:58
It's not ideal to have it change, but it's not str
|
| + return UPLOAD_DISABLED_BY_SAMPLING; |
|
Ilya Sherman
2016/08/23 21:32:17
What code handles this return value? Will the sys
gayane -on leave until 09-2017
2016/08/23 22:43:51
Ok, looking at this a little bit more, I see that
jwd
2016/08/23 23:00:58
Hm, yes, I believe it will...
I can make not do th
Ilya Sherman
2016/08/24 05:02:50
I think Gayane's suggestion, i.e. call cleanupMini
jwd
2016/08/24 15:06:27
Done.
|
| + } |
|
Ilya Sherman
2016/08/23 21:32:17
Optional: This kind of feels like it belongs befor
jwd
2016/08/23 23:00:58
Done.
|
| } |
| HttpURLConnection connection = |