Description[Tabbed mode] Restore tabs even if TabState is missing
Currently, Clank throws away tabs during initialization if the TabState
couldn't be loaded. This doesn't always make sense because we store the last
URL of the tab in the TabModel metadata file. Instead, re-create a Tab
with the last known URL of the Tab as long as it wasn't Incognito --
if an Incognito TabState couldn't be loaded, it's just as likely that the
user lost the encryption cipher key and the Tab should be thrown away,
anyway.
* Add the incognito tab count to the TabModel metadata that is saved
out to disk. This is used to determine whether a tab is a
non-incognito tab.
* Adjust TabPersistentStore to allow upgrading to version 5 of the
file format.
* Let TabRestoreDetails determine whether or not it contains Incognito
tab data.
* Change restoreTab(...) to handle cases where the TabState is missing
for regular tabs. In these cases, new tabs will be created with the
last known URL with new IDs.
* Remove a bunch of boolean return values that aren't used.
* Generalize TestTabModelDirectory so that it can support V5 TabModel
data.
* Add a pair of tests for testing that V5 TabPersistentStore data can
be restored.
BUG=485217
Committed: https://crrev.com/37753152e78e2ec6fe74278130df9db6b5d7b695
Cr-Commit-Position: refs/heads/master@{#354805}
Patch Set 1 #Patch Set 2 : Adjusting for tests #Patch Set 3 : Added test #
Total comments: 8
Patch Set 4 : Comments, rebasing #
Messages
Total messages: 9 (3 generated)
|