Add observer in PersistentStore to track when TabState is saved to disk
Reported by
ltian@chromium.org,
Sep 18 2017
|
||
Issue descriptionAdd an observer in TabPersistentStore to track when a TabState created by Browser Actions is saved to disk and notify the BrowserActionsService to change into background.
,
Nov 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6815d5a40e21e0eac11e8a2313b8d1362e716c53 commit 6815d5a40e21e0eac11e8a2313b8d1362e716c53 Author: Lei Tian <ltian@chromium.org> Date: Thu Nov 09 03:54:51 2017 Add saved tabs info in TabPersistentStore.onMetadataSavedAsynchronously Add the saved tabs' ids through TabPersistentStore.onMetadataSavedAsynchronously. Then later Browser Actions can know how to which tab has been added in the tab list and saved to disk from it. This signal guarantees the saved tabs can be succcessfully restored. Also change TabPersistentStore to hold a ObserverList of TabPersistentStoreObserver. Bug: 766349 Change-Id: I53f8515ed3e3169a9f89f5c602ff44e75e5b5e89 Reviewed-on: https://chromium-review.googlesource.com/759097 Commit-Queue: Lei Tian <ltian@chromium.org> Reviewed-by: Theresa <twellington@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#515088} [modify] https://crrev.com/6815d5a40e21e0eac11e8a2313b8d1362e716c53/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabModelSelector.java [modify] https://crrev.com/6815d5a40e21e0eac11e8a2313b8d1362e716c53/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java [modify] https://crrev.com/6815d5a40e21e0eac11e8a2313b8d1362e716c53/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java [modify] https://crrev.com/6815d5a40e21e0eac11e8a2313b8d1362e716c53/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicyTest.java [modify] https://crrev.com/6815d5a40e21e0eac11e8a2313b8d1362e716c53/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/RestoreMigrateTest.java [modify] https://crrev.com/6815d5a40e21e0eac11e8a2313b8d1362e716c53/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabModelMergingTest.java [modify] https://crrev.com/6815d5a40e21e0eac11e8a2313b8d1362e716c53/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java
,
Nov 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/64565fd707ff5a4e2d1b378b26dc2e28e35e4806 commit 64565fd707ff5a4e2d1b378b26dc2e28e35e4806 Author: Lei Tian <ltian@chromium.org> Date: Fri Nov 17 18:40:31 2017 Use TabPersistentStoreObserver.onMetadataSavedAsynchronously to background the Browser Actions tab creation service Change the logic to background the Browser Actions tab creation service based on TabPersistentStoreObserver.onMetadataSavedAsynchronously. The callback indicates that tab model lists are backuped so the saved tabs can be restored succesfully. Also for the notification when a new tab has not been created (tabId is not available), the Intent to bind the notification will be a VIEW intent. This notification is necessary to make the service foreground. Bug: 766349 Change-Id: I73d49e2a1e26410b2dd6e51a07f35e9965b9a38a Reviewed-on: https://chromium-review.googlesource.com/769852 Reviewed-by: Ted Choc <tedchoc@chromium.org> Commit-Queue: Lei Tian <ltian@chromium.org> Cr-Commit-Position: refs/heads/master@{#517492} [modify] https://crrev.com/64565fd707ff5a4e2d1b378b26dc2e28e35e4806/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsService.java [modify] https://crrev.com/64565fd707ff5a4e2d1b378b26dc2e28e35e4806/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabModelSelector.java [modify] https://crrev.com/64565fd707ff5a4e2d1b378b26dc2e28e35e4806/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java
,
Nov 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/680dab104e7c8e522672398bbf8f0c21df3efed1 commit 680dab104e7c8e522672398bbf8f0c21df3efed1 Author: Maria Khomenko <mariakhomenko@chromium.org> Date: Mon Nov 20 20:57:02 2017 Revert "Use TabPersistentStoreObserver.onMetadataSavedAsynchronously to background the Browser Actions tab creation service" This reverts commit 64565fd707ff5a4e2d1b378b26dc2e28e35e4806. Reason for revert: Breaking tests on tablets: crbug.com/787048 Original change's description: > Use TabPersistentStoreObserver.onMetadataSavedAsynchronously to background the Browser Actions tab creation service > > Change the logic to background the Browser Actions tab creation service > based on TabPersistentStoreObserver.onMetadataSavedAsynchronously. The > callback indicates that tab model lists are backuped so the saved tabs > can be restored succesfully. > > Also for the notification when a new tab has not been created (tabId is > not available), the Intent to bind the notification will be a VIEW > intent. This notification is necessary to make the service foreground. > > Bug: 766349 > Change-Id: I73d49e2a1e26410b2dd6e51a07f35e9965b9a38a > Reviewed-on: https://chromium-review.googlesource.com/769852 > Reviewed-by: Ted Choc <tedchoc@chromium.org> > Commit-Queue: Lei Tian <ltian@chromium.org> > Cr-Commit-Position: refs/heads/master@{#517492} TBR=tedchoc@chromium.org,twellington@chromium.org,ltian@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 766349 , 787048 Change-Id: I6c0be2dc64c8bdb9d4bd0406ddbc094da4a9a805 Reviewed-on: https://chromium-review.googlesource.com/779919 Commit-Queue: Maria Khomenko <mariakhomenko@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Cr-Commit-Position: refs/heads/master@{#517922} [modify] https://crrev.com/680dab104e7c8e522672398bbf8f0c21df3efed1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsService.java [modify] https://crrev.com/680dab104e7c8e522672398bbf8f0c21df3efed1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabModelSelector.java [modify] https://crrev.com/680dab104e7c8e522672398bbf8f0c21df3efed1/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java
,
Nov 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1c3e620eee0877d415e9f8c651dea8c77d399cce commit 1c3e620eee0877d415e9f8c651dea8c77d399cce Author: Lei Tian <ltian@chromium.org> Date: Tue Nov 28 01:24:19 2017 Reland "Use TabPersistentStoreObserver.onMetadataSavedAsynchronously to background the Browser Actions tab creation service" This relands commit 64565fd707ff5a4e2d1b378b26dc2e28e35e4806. Original change's description: > Use TabPersistentStoreObserver.onMetadataSavedAsynchronously to background the Browser Actions tab creation service > > Change the logic to background the Browser Actions tab creation service > based on TabPersistentStoreObserver.onMetadataSavedAsynchronously. The > callback indicates that tab model lists are backuped so the saved tabs > can be restored succesfully. > > Also for the notification when a new tab has not been created (tabId is > not available), the Intent to bind the notification will be a VIEW > intent. This notification is necessary to make the service foreground. > > Bug: 766349 > Change-Id: I73d49e2a1e26410b2dd6e51a07f35e9965b9a38a > Reviewed-on: https://chromium-review.googlesource.com/769852 > Reviewed-by: Ted Choc <tedchoc@chromium.org> > Commit-Queue: Lei Tian <ltian@chromium.org> > Cr-Commit-Position: refs/heads/master@{#517492} Bug: 766349 Change-Id: Icb35c3b0e3ed2186e48c7f0e77ceb6a07bc1f39f Reviewed-on: https://chromium-review.googlesource.com/791392 Reviewed-by: Ted Choc <tedchoc@chromium.org> Commit-Queue: Lei Tian <ltian@chromium.org> Cr-Commit-Position: refs/heads/master@{#519509} [modify] https://crrev.com/1c3e620eee0877d415e9f8c651dea8c77d399cce/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsService.java [modify] https://crrev.com/1c3e620eee0877d415e9f8c651dea8c77d399cce/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabModelSelector.java [modify] https://crrev.com/1c3e620eee0877d415e9f8c651dea8c77d399cce/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java [modify] https://crrev.com/1c3e620eee0877d415e9f8c651dea8c77d399cce/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java
,
Mar 8 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by ltian@chromium.org
, Sep 18 2017