|
|
Chromium Code Reviews|
Created:
4 years ago by Jackie Quinn Modified:
4 years ago CC:
chromium-reviews, pkl (ping after 24h if needed), sdefresne+watch_chromium.org, sczs Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[ios] Wait for sync query to return before displaying history
If sync history is on, wait for WebHistoryService to complete its query
before displaying history. This prevents the history panel from
displaying no history or only local history just after the user switches
sync accounts.
BUG=589277
TEST=Have multiple sync accounts with a large number of synced entries.
Switch sync accounts and immediately open history. A loading
indicator should be displayed until sync history is presented.
Turn off network connection and open history. Only local history
should be displayed.
Re-enable network connectivity and turn off history sync while
leaving other forms of sync on. Open history. Only local history
should be displayed.
Re-enable history sync. Synced history should be displayed.
Committed: https://crrev.com/4bbf08e203ec86ba88247bbc9392a895ded82939
Cr-Commit-Position: refs/heads/master@{#439946}
Patch Set 1 #Patch Set 2 : Cleanup #
Total comments: 4
Patch Set 3 : Missing imports and variable name fix #
Total comments: 6
Patch Set 4 : Spelling #Patch Set 5 : Use item types! #
Messages
Total messages: 20 (7 generated)
jyquinn@chromium.org changed reviewers: + lpromero@chromium.org
sczs@chromium.org changed reviewers: + sczs@chromium.org
https://codereview.chromium.org/2589313002/diff/20001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/20001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:327: !result.web_history_returned) { Should this be !result.sync_returned ?! https://codereview.chromium.org/2589313002/diff/20001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:658: NSIndexPath* indexPath = [NSIndexPath indexPathForItem:0 inSection:0]; Could self.loading be used here instead of checking the cell subclass?
https://codereview.chromium.org/2589313002/diff/20001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/20001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:327: !result.web_history_returned) { On 2016/12/20 22:49:48, sczs wrote: > Should this be !result.sync_returned ?! Ah yes thanks. Last minute variable name change 🙃 https://codereview.chromium.org/2589313002/diff/20001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:658: NSIndexPath* indexPath = [NSIndexPath indexPathForItem:0 inSection:0]; On 2016/12/20 22:49:48, sczs wrote: > Could self.loading be used here instead of checking the cell subclass? Not necessarily. Presence/absence of the loading indicator right now is not tied to self.loading, so I think it's better to check for the actual item.
https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:664: // Do not add indicator a sectond time. second* Can't you look instead in the model then ?
https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:664: // Do not add indicator a sectond time. On 2016/12/20 23:13:42, lpromero wrote: > second* > > Can't you look instead in the model then ? Done. There is no ActivityIndicatorItem, only the cell.
lgtm https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:664: // Do not add indicator a sectond time. On 2016/12/20 23:18:10, Jackie Quinn wrote: > On 2016/12/20 23:13:42, lpromero wrote: > > second* > > > > Can't you look instead in the model then ? > > Done. There is no ActivityIndicatorItem, only the cell. That's where giving a specific type to the item can come in handy I guess. Would it be worth it here?
lgtm
https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:664: // Do not add indicator a sectond time. On 2016/12/20 23:26:23, lpromero wrote: > On 2016/12/20 23:18:10, Jackie Quinn wrote: > > On 2016/12/20 23:13:42, lpromero wrote: > > > second* > > > > > > Can't you look instead in the model then ? > > > > Done. There is no ActivityIndicatorItem, only the cell. > > That's where giving a specific type to the item can come in handy I guess. Would > it be worth it here? If the sole purpose is checking for the type of item, I feel like an extra class is overkill here when you can just check the cellClass. If you feel differently let me know.
https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:664: // Do not add indicator a sectond time. On 2016/12/20 23:33:21, Jackie Quinn wrote: > On 2016/12/20 23:26:23, lpromero wrote: > > On 2016/12/20 23:18:10, Jackie Quinn wrote: > > > On 2016/12/20 23:13:42, lpromero wrote: > > > > second* > > > > > > > > Can't you look instead in the model then ? > > > > > > Done. There is no ActivityIndicatorItem, only the cell. > > > > That's where giving a specific type to the item can come in handy I guess. > Would > > it be worth it here? > > If the sole purpose is checking for the type of item, I feel like an extra class > is overkill here when you can just check the cellClass. If you feel differently > let me know. I meant just the enum value you pass to the initializer -initWithType:, not the type in the sense of compiler. I agree that we shouldn't need a subclass.
https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... File ios/chrome/browser/ui/history/history_collection_view_controller.mm (right): https://codereview.chromium.org/2589313002/diff/40001/ios/chrome/browser/ui/h... ios/chrome/browser/ui/history/history_collection_view_controller.mm:664: // Do not add indicator a sectond time. On 2016/12/20 23:38:51, lpromero wrote: > On 2016/12/20 23:33:21, Jackie Quinn wrote: > > On 2016/12/20 23:26:23, lpromero wrote: > > > On 2016/12/20 23:18:10, Jackie Quinn wrote: > > > > On 2016/12/20 23:13:42, lpromero wrote: > > > > > second* > > > > > > > > > > Can't you look instead in the model then ? > > > > > > > > Done. There is no ActivityIndicatorItem, only the cell. > > > > > > That's where giving a specific type to the item can come in handy I guess. > > Would > > > it be worth it here? > > > > If the sole purpose is checking for the type of item, I feel like an extra > class > > is overkill here when you can just check the cellClass. If you feel > differently > > let me know. > > I meant just the enum value you pass to the initializer -initWithType:, not the > type in the sense of compiler. I agree that we shouldn't need a subclass. Oh, I see. Yeah that sounds reasonable. Updated!
The CQ bit was checked by jyquinn@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sczs@chromium.org, lpromero@chromium.org Link to the patchset: https://codereview.chromium.org/2589313002/#ps80001 (title: "Use item types!")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1482278537008300,
"parent_rev": "51f36e9353888eeecc9da06a87810e531dd7bc0f", "commit_rev":
"9467bfc6839828d8096cb4cec35c5b8ced41fcc8"}
Message was sent while issue was closed.
Description was changed from
==========
[ios] Wait for sync query to return before displaying history
If sync history is on, wait for WebHistoryService to complete its query
before displaying history. This prevents the history panel from
displaying no history or only local history just after the user switches
sync accounts.
BUG=589277
TEST=Have multiple sync accounts with a large number of synced entries.
Switch sync accounts and immediately open history. A loading
indicator should be displayed until sync history is presented.
Turn off network connection and open history. Only local history
should be displayed.
Re-enable network connectivity and turn off history sync while
leaving other forms of sync on. Open history. Only local history
should be displayed.
Re-enable history sync. Synced history should be displayed.
==========
to
==========
[ios] Wait for sync query to return before displaying history
If sync history is on, wait for WebHistoryService to complete its query
before displaying history. This prevents the history panel from
displaying no history or only local history just after the user switches
sync accounts.
BUG=589277
TEST=Have multiple sync accounts with a large number of synced entries.
Switch sync accounts and immediately open history. A loading
indicator should be displayed until sync history is presented.
Turn off network connection and open history. Only local history
should be displayed.
Re-enable network connectivity and turn off history sync while
leaving other forms of sync on. Open history. Only local history
should be displayed.
Re-enable history sync. Synced history should be displayed.
Review-Url: https://codereview.chromium.org/2589313002
==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from
==========
[ios] Wait for sync query to return before displaying history
If sync history is on, wait for WebHistoryService to complete its query
before displaying history. This prevents the history panel from
displaying no history or only local history just after the user switches
sync accounts.
BUG=589277
TEST=Have multiple sync accounts with a large number of synced entries.
Switch sync accounts and immediately open history. A loading
indicator should be displayed until sync history is presented.
Turn off network connection and open history. Only local history
should be displayed.
Re-enable network connectivity and turn off history sync while
leaving other forms of sync on. Open history. Only local history
should be displayed.
Re-enable history sync. Synced history should be displayed.
Review-Url: https://codereview.chromium.org/2589313002
==========
to
==========
[ios] Wait for sync query to return before displaying history
If sync history is on, wait for WebHistoryService to complete its query
before displaying history. This prevents the history panel from
displaying no history or only local history just after the user switches
sync accounts.
BUG=589277
TEST=Have multiple sync accounts with a large number of synced entries.
Switch sync accounts and immediately open history. A loading
indicator should be displayed until sync history is presented.
Turn off network connection and open history. Only local history
should be displayed.
Re-enable network connectivity and turn off history sync while
leaving other forms of sync on. Open history. Only local history
should be displayed.
Re-enable history sync. Synced history should be displayed.
Committed: https://crrev.com/4bbf08e203ec86ba88247bbc9392a895ded82939
Cr-Commit-Position: refs/heads/master@{#439946}
==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/4bbf08e203ec86ba88247bbc9392a895ded82939 Cr-Commit-Position: refs/heads/master@{#439946} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
