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

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

Issue 2166943002: Fix incognito tabs persisting when cct service is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove tests Created 4 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.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 72d683c7a6a311284b7d6b7b4623647737e644a7..ff840c51b9ef0d81d7a374c4357c2c17ffb09ee6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -567,7 +567,8 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
Intent intent = getIntent();
- CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
+ boolean hadCipherData =
+ CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
boolean noRestoreState =
CommandLine.getInstance().hasSwitch(ChromeSwitches.NO_RESTORE_STATE);
@@ -578,7 +579,10 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
// State should be clear when we start first run and hence we do not need to load
// a previous state. This may change the current Model, watch out for initialization
// based on the model.
- mTabModelSelectorImpl.loadState();
+ // Never attempt to restore incognito tabs when this activity was previously swiped
+ // away in Recents. http://crbug.com/626629
+ boolean ignoreIncognitoFiles = !hadCipherData;
+ mTabModelSelectorImpl.loadState(ignoreIncognitoFiles);
}
mIntentWithEffect = false;
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698