From: uazo <uazo@users.noreply.github.com>
Date: Wed, 27 Oct 2021 10:57:09 +0000
Subject: Keep empty tabs between sessions

Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
 .../chrome/browser/tabmodel/TabPersistentStore.java       | 8 --------
 .../browser/tab/state/CriticalPersistedTabData.java       | 3 ---
 2 files changed, 11 deletions(-)

diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
@@ -816,14 +816,6 @@ public class TabPersistentStore {
                 mTabsToMigrate.add(tab);
             }
         } else {
-            if (UrlUtilities.isNTPUrl(tabToRestore.url) && !setAsActive
-                    && !tabToRestore.fromMerge) {
-                Log.i(TAG, "Skipping restore of non-selected NTP.");
-                RecordHistogram.recordEnumeratedHistogram("Tabs.TabRestoreMethod",
-                        TabRestoreMethod.SKIPPED_NTP, TabRestoreMethod.NUM_ENTRIES);
-                return;
-            }
-
             Log.w(TAG, "Failed to restore TabState; creating Tab with last known URL.");
             Tab fallbackTab = mTabCreatorManager.getTabCreator(isIncognito)
                                       .createNewTab(new LoadUrlParams(tabToRestore.url),
diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java
--- a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java
+++ b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java
@@ -602,9 +602,6 @@ public class CriticalPersistedTabData extends PersistedTabData {
         if (getUrl() == null || getUrl().isEmpty()) {
             return false;
         }
-        if (UrlUtilities.isNTPUrl(getUrl()) && !mTab.canGoBack() && !mTab.canGoForward()) {
-            return false;
-        }
         if (isTabUrlContentScheme(getUrl())) {
             return false;
         }
--
2.25.1
