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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoScreen.java

Issue 2969843004: Don't show the Data Saver promo in incognito mode (Closed)
Patch Set: Created 3 years, 5 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/ChromeTabbedActivity.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/datareduction/DataReductionPromoScreen.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoScreen.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoScreen.java
index 514e2313ad84b08867c88ded6a3c26491be5cab5..1216b8fb90f16f76be705bec0db1cb7ebc657e73 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoScreen.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoScreen.java
@@ -24,10 +24,11 @@ public class DataReductionPromoScreen extends PromoDialog {
* Launch the data reduction promo, if it needs to be displayed.
* @return Whether the data reduction promo was displayed.
*/
- public static boolean launchDataReductionPromo(Activity parentActivity) {
+ public static boolean launchDataReductionPromo(Activity parentActivity, boolean isIncognito) {
// The promo is displayed if Chrome is launched directly (i.e., not with the intent to
// navigate to and view a URL on startup), the instance is part of the field trial,
// and the promo has not been displayed before.
+ if (isIncognito) return false;
if (!DataReductionPromoUtils.canShowPromos()) return false;
if (DataReductionPromoUtils.getDisplayedFreOrSecondRunPromo()) return false;
// Showing the promo dialog in multiwindow mode is broken on Galaxy Note devices:
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698