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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java

Issue 2922503002: Show an opaque background if showing the new user search engine promo. (Closed)
Patch Set: Add findbugs exclusion for code I didn't change :-/ Created 3 years, 6 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/locale/DefaultSearchEnginePromoDialog.java » ('j') | 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/ChromeTabbedActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
index 384e420f379beda5c4ac663d56c9088641188b7d..823c6ae80a8a06720ee986693d8c857cb2993107 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -381,6 +381,10 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
TraceEvent.begin("ChromeTabbedActivity.initializeCompositor");
super.initializeCompositor();
+ // LocaleManager can only function after the native library is loaded.
+ mLocaleManager = LocaleManager.getInstance();
+ mLocaleManager.showSearchEnginePromoIfNeeded(this, null);
+
mTabModelSelectorImpl.onNativeLibraryReady(getTabContentManager());
mTabModelObserver = new TabModelSelectorTabModelObserver(mTabModelSelectorImpl) {
@@ -468,18 +472,13 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
IncognitoNotificationManager.dismissIncognitoNotification();
}
- // LocaleManager can only function after the native library is loaded.
- mLocaleManager = LocaleManager.getInstance();
- boolean searchEnginePromoShown =
- mLocaleManager.showSearchEnginePromoIfNeeded(this, null);
-
ChromePreferenceManager preferenceManager = ChromePreferenceManager.getInstance();
// Promos can only be shown when we start with ACTION_MAIN intent and
// after FRE is complete. Native initialization can finish before the FRE flow is
// complete, and this will only show promos on the second opportunity. This is
// because the FRE is shown on the first opportunity, and we don't want to show such
// content back to back.
- if (!searchEnginePromoShown && !mIntentWithEffect
+ if (!mLocaleManager.hasShownSearchEnginePromoThisSession() && !mIntentWithEffect
&& FirstRunStatus.getFirstRunFlowComplete()
&& preferenceManager.getPromosSkippedOnFirstStart()) {
// Data reduction promo should be temporarily suppressed if the sign in promo is
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/locale/DefaultSearchEnginePromoDialog.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698