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

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

Issue 2292083004: Revert of Add tab persistence support for CustomTabs. (Closed)
Patch Set: Created 4 years, 3 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/tabmodel/TabPersistentStore.java
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
index 1bfbef6313b1ea72abd98f771805c0f4a5b2f0ba..8126adb8b952f402fd165c959ebad2db4b201168 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
@@ -219,12 +219,11 @@
mPreferences = ContextUtils.getAppSharedPreferences();
assert isStateFile(policy.getStateFileName()) : "State file name is not valid";
- boolean needsInitialization = mPersistencePolicy.performInitialization(
- AsyncTask.SERIAL_EXECUTOR);
+ boolean needsMigration = mPersistencePolicy.performMigration(AsyncTask.SERIAL_EXECUTOR);
if (mPersistencePolicy.isMergeInProgress()) return;
- Executor executor = needsInitialization
+ Executor executor = needsMigration
? AsyncTask.SERIAL_EXECUTOR : AsyncTask.THREAD_POOL_EXECUTOR;
mPrefetchTabListTask =
@@ -248,7 +247,7 @@
*/
@VisibleForTesting
public void waitForMigrationToFinish() {
- mPersistencePolicy.waitForInitializationToFinish();
+ mPersistencePolicy.waitForMigrationToFinish();
}
/**
@@ -999,7 +998,7 @@
* @param forMerge Whether this state file was read as part of a merge.
* @return The next available tab ID based on the maximum ID referenced in this state file.
*/
- public static int readSavedStateFile(
+ protected static int readSavedStateFile(
DataInputStream stream, @Nullable OnTabStateReadCallback callback,
@Nullable SparseBooleanArray tabIds, boolean forMerge) throws IOException {
if (stream == null) return 0;
@@ -1368,19 +1367,9 @@
}
/**
- * Parses the state file name and returns the unique ID encoded into it.
- * @param stateFileName The state file name to be parsed.
- * @return The unique ID used when generating the file name.
- */
- public static String getStateFileUniqueId(String stateFileName) {
- assert isStateFile(stateFileName);
- return stateFileName.substring(TabPersistencePolicy.SAVED_STATE_FILE_PREFIX.length());
- }
-
- /**
* @return Whether the specified filename matches the expected pattern of the tab state files.
*/
- public static boolean isStateFile(String fileName) {
+ private static boolean isStateFile(String fileName) {
return fileName.startsWith(TabPersistencePolicy.SAVED_STATE_FILE_PREFIX);
}

Powered by Google App Engine
This is Rietveld 408576698