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

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

Issue 2756463004: [Cleanup] Remove the ability to disable Crash Reporting from the command line. (Closed)
Patch Set: 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.test.InstrumentationTestCase; 7 import android.test.InstrumentationTestCase;
8 8
9 import org.chromium.base.Log; 9 import org.chromium.base.Log;
10 import org.chromium.components.minidump_uploader.util.CrashReportingPermissionMa nager; 10 import org.chromium.components.minidump_uploader.util.CrashReportingPermissionMa nager;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 /** 95 /**
96 * A utility instantiation of CrashReportingPermissionManager providing a co mpact way of 96 * A utility instantiation of CrashReportingPermissionManager providing a co mpact way of
97 * overriding different permission settings. 97 * overriding different permission settings.
98 */ 98 */
99 public static class MockCrashReportingPermissionManager 99 public static class MockCrashReportingPermissionManager
100 implements CrashReportingPermissionManager { 100 implements CrashReportingPermissionManager {
101 protected boolean mIsInSample; 101 protected boolean mIsInSample;
102 protected boolean mIsPermitted; 102 protected boolean mIsPermitted;
103 protected boolean mIsUserPermitted; 103 protected boolean mIsUserPermitted;
104 protected boolean mIsCommandLineDisabled;
105 protected boolean mIsNetworkAvailable; 104 protected boolean mIsNetworkAvailable;
106 protected boolean mIsEnabledForTests; 105 protected boolean mIsEnabledForTests;
107 106
108 public MockCrashReportingPermissionManager() {} 107 public MockCrashReportingPermissionManager() {}
109 108
110 @Override 109 @Override
111 public boolean isClientInMetricsSample() { 110 public boolean isClientInMetricsSample() {
112 return mIsInSample; 111 return mIsInSample;
113 } 112 }
114 113
115 @Override 114 @Override
116 public boolean isNetworkAvailableForCrashUploads() { 115 public boolean isNetworkAvailableForCrashUploads() {
117 return mIsNetworkAvailable; 116 return mIsNetworkAvailable;
118 } 117 }
119 118
120 @Override 119 @Override
121 public boolean isMetricsUploadPermitted() { 120 public boolean isMetricsUploadPermitted() {
122 return mIsPermitted; 121 return mIsPermitted;
123 } 122 }
124 123
125 @Override 124 @Override
126 public boolean isUsageAndCrashReportingPermittedByUser() { 125 public boolean isUsageAndCrashReportingPermittedByUser() {
127 return mIsUserPermitted; 126 return mIsUserPermitted;
128 } 127 }
129 128
130 @Override 129 @Override
131 public boolean isCrashUploadDisabledByCommandLine() {
132 return mIsCommandLineDisabled;
133 }
134
135 @Override
136 public boolean isUploadEnabledForTests() { 130 public boolean isUploadEnabledForTests() {
137 return mIsEnabledForTests; 131 return mIsEnabledForTests;
138 } 132 }
139 } 133 }
140 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698