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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/DocumentTabModelImpl.java

Issue 1178223003: [Document mode] Fix updateRecentlyClosed(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | 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/tabmodel/document/DocumentTabModelImpl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/DocumentTabModelImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/DocumentTabModelImpl.java
index 0d208bba7eab0f8473ac91b8169c31b5c67ed541..052e55d8b82bc15c32ae6c89d96464e7e0e3b790 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/DocumentTabModelImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/DocumentTabModelImpl.java
@@ -317,9 +317,12 @@ public class DocumentTabModelImpl extends TabModelJniBridge implements DocumentT
Tab tab = getTabAt(index);
for (TabModelObserver obs : mObservers) obs.willCloseTab(tab, false);
- if (!tab.isIncognito()) tab.createHistoricalTab();
+ int tabId = tab.getId();
+ Entry entry = mEntryMap.get(tabId);
+ if (!isIncognito() && entry != null && entry.getTabState() != null) {
+ entry.getTabState().contentsState.createHistoricalTab();
+ }
- int tabId = mTabIdList.get(index);
mActivityDelegate.finishAndRemoveTask(isIncognito(), tabId);
mTabIdList.remove(index);
mEntryMap.remove(tabId);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698