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

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

Issue 2398533002: Implement search engine auto switch when entering or leaving some locale (Closed)
Patch Set: Created 4 years, 2 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
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 ca4980659461cbfa1b43077b73f4bda8a9dd857e..92e4d3d635f9077d864a59568bf2ca16c55be12d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -361,6 +361,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
@Override
public void onResumeWithNative() {
super.onResumeWithNative();
+
CookiesFetcher.restoreCookies(this);
StartupMetrics.getInstance().recordHistogram(false);
@@ -374,6 +375,9 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
mMergeTabsOnResume = false;
}
if (mVrShellDelegate.isInVR()) mVrShellDelegate.resumeVR();
+
+ mLocaleManager.setSnackbarManager(getSnackbarManager());
Maria 2016/10/05 17:36:40 Your comment about onStart happening after onStart
+ mLocaleManager.startObservingPhoneChanges();
}
@Override
@@ -381,6 +385,10 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
mTabModelSelectorImpl.commitAllTabClosures();
CookiesFetcher.persistCookies(this);
if (mVrShellDelegate.isInVR()) mVrShellDelegate.pauseVR();
+
+ mLocaleManager.setSnackbarManager(null);
+ mLocaleManager.stopObservingPhoneChanges();
+
super.onPauseWithNative();
}
@@ -393,8 +401,6 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
mTabModelSelectorImpl.saveState();
StartupMetrics.getInstance().recordHistogram(true);
mActivityStopMetrics.onStopWithNative(this);
-
- mLocaleManager.stopObservingPhoneChanges();
}
@Override
@@ -409,8 +415,6 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
// If we don't have a current tab, show the overview mode.
if (getActivityTab() == null) mLayoutManager.showOverview(false);
- mLocaleManager.startObservingPhoneChanges();
-
resetSavedInstanceState();
}

Powered by Google App Engine
This is Rietveld 408576698