forked from crosswalk-project/chromium-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
History page keeps remote and local results in lock step.
When signed in and returning Web History results, the previous implementation of the BrowsingHistoryService would be to fetch about history::QueryOptions::max_count (100) worth of results from both local and web history. Then these results would be merged together in reverse chronological order, and thrown back to the UI. The UI would preset the user with a scrollbar, and when they scrolled to somewhere near the end of the results, the UI would take the results on screen, grab the last one, take the timestamp of that entry, and ask the BrowsingHistoryService for another page, started at that timestamp. This works nicely if web and local history return identical results, but if they return different results, we end up skipping ahead and missing results. This is extremely bad if one source is missing a large gap, the other source only gets a page of results before it gets cut off. To fix this, stop returning results when one source is ahead of the other. These pending results are stored in a closure that can be used when the next page is needed. Things got a bit ugly tracking all the different pieces of state and some refactoring was done to try to keep things as nice as possible. Bug: 728727 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I3709c21095fce7840ba88f3c094ccb5c94dee23d Reviewed-on: https://chromium-review.googlesource.com/577968 Reviewed-by: Ramya Sharma <[email protected]> Reviewed-by: calamity <[email protected]> Reviewed-by: Yusuf Ozuysal <[email protected]> Reviewed-by: Sylvain Defresne <[email protected]> Reviewed-by: Theresa <[email protected]> Commit-Queue: Sky Malice <[email protected]> Cr-Commit-Position: refs/heads/master@{#499655}
- Loading branch information
Sky Malice
authored and
Commit Bot
committed
Sep 5, 2017
1 parent
16c1ecf
commit d441317
Showing
21 changed files
with
870 additions
and
567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.