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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java

Issue 1111133002: Changes necessary for limiting crash report uploads for cellular networks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment typos Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/CrashReportingPermissionManager.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java
index 8d8bc99c708343536bff9aa0c1617fe28919dc82..f2dbb4bacae882541186cac1b7470e1146f77a3a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java
@@ -340,11 +340,24 @@ public class PrivacyPreferencesManager implements CrashReportingPermissionManage
* This function should not result in a native call as it can be called in circumstances where
* natives are not guaranteed to be loaded.
*
- * @return boolean to whether to allow uploading crash dump now.
+ * @return whether to allow uploading crash dump now.
*/
@Override
public boolean isUploadPermitted() {
return mCrashUploadingEnabled && isNetworkAvailable() && (allowUploadCrashDump()
|| CommandLine.getInstance().hasSwitch(ChromeSwitches.FORCE_CRASH_DUMP_UPLOAD));
}
+
+ /**
+ * Check whether uploading crash dump should be in constrained mode based on user experiments.
+ * This function shows whether in general uploads should be limited for this user and does not
+ * determine whether crash uploads are currently possible or not. Use |isUploadPermitted|
+ * function for that before calling |isUploadLimited|.
+ *
+ * @return whether uploading logic should be constrained.
+ */
+ @Override
+ public boolean isUploadLimited() {
+ return isCellularExperimentEnabled();
+ }
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/CrashReportingPermissionManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698