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

Issue 2455503004: [MD History] Fix deletion in heavily scrolled list. (Closed)

Created:
4 years, 1 month ago by calamity
Modified:
4 years, 1 month ago
Reviewers:
msramek, Dan Beam, sdefresne
CC:
chromium-reviews, asanka, Patrick Dubroy, michaelpg+watch-md-ui_chromium.org, dbeam+watch-history_chromium.org, pam+watch_chromium.org, arv+watch_chromium.org, dbeam+watch-downloads_chromium.org, chrome-apps-syd-reviews_chromium.org, lshang, msramek
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD History] Fix deletion in heavily scrolled list. This CL fixes an issue where results would reload when an item was deleted in a history list that was scrolled beyond the first 'page'. This was happening because code that refreshed the results on external deletion was getting triggered for internal deletes due to the web history service. This has been fixed by disabling the reload when web history deletions are occurring, bringing it in line with the local history service. BUG=660267, 630164 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/a1ee6c76c90bfbe3cd842ac6d68cca5a6364738d Cr-Commit-Position: refs/heads/master@{#429529}

Patch Set 1 #

Patch Set 2 : prevent web history reloads #

Patch Set 3 : add test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -3 lines) Patch
M chrome/browser/ui/webui/browsing_history_handler.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/browsing_history_handler.cc View 1 1 chunk +2 lines, -1 line 1 comment Download
M chrome/browser/ui/webui/browsing_history_handler_unittest.cc View 1 2 2 chunks +20 lines, -1 line 0 comments Download
M components/history/core/browser/web_history_service.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 28 (15 generated)
calamity
We'll probably want to find another way to deal with this, possibly by sending all ...
4 years, 1 month ago (2016-10-28 03:00:06 UTC) #6
Dan Beam
but wait, doesn't this regress the other thing this fixed?
4 years, 1 month ago (2016-10-28 03:42:55 UTC) #7
calamity
On 2016/10/28 03:42:55, Dan Beam wrote: > but wait, doesn't this regress the other thing ...
4 years, 1 month ago (2016-10-28 05:57:48 UTC) #8
Dan Beam
but without this, it means that you could've cleared like a ton of history ...
4 years, 1 month ago (2016-10-28 22:28:14 UTC) #9
calamity
On 2016/10/28 22:28:14, Dan Beam wrote: > but without this, it means that you could've ...
4 years, 1 month ago (2016-10-31 05:59:47 UTC) #12
Dan Beam
lgtm if components/history owners are OK with this can you write a test to ensure ...
4 years, 1 month ago (2016-10-31 23:11:44 UTC) #13
calamity
+sdefresne for web_history_service.cc OWNERS +FYI msramek PTAL, thanks!
4 years, 1 month ago (2016-11-01 03:14:48 UTC) #15
sdefresne
lgtm
4 years, 1 month ago (2016-11-02 16:22:07 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2455503004/60001
4 years, 1 month ago (2016-11-03 00:54:56 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2455503004/60001
4 years, 1 month ago (2016-11-03 04:11:20 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 1 month ago (2016-11-03 05:28:28 UTC) #24
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/a1ee6c76c90bfbe3cd842ac6d68cca5a6364738d Cr-Commit-Position: refs/heads/master@{#429529}
4 years, 1 month ago (2016-11-03 05:30:51 UTC) #26
msramek
4 years, 1 month ago (2016-11-07 15:45:20 UTC) #28
Message was sent while issue was closed.
I just returned from OOO, so I'm adding a retrospective LGTM and an improvement
request. Thanks for fixing!

https://codereview.chromium.org/2455503004/diff/60001/chrome/browser/ui/webui...
File chrome/browser/ui/webui/browsing_history_handler.cc (right):

https://codereview.chromium.org/2455503004/diff/60001/chrome/browser/ui/webui...
chrome/browser/ui/webui/browsing_history_handler.cc:1013: if
(!has_pending_delete_request_)
It's possible that OnWebHistoryDeleted() was called for a request not coming
from this page (e.g. from CBD or another instance of the history page). In that
case, we should reload to display the effects of that deletion.

It's just a corner case, and it requires further changes to
OnWebHistoryDeleted(), so I'm not asking you to fix it now, but can you please
document that we know about it? Someone will look at this code later and will
wonder why can we assume that the web history deletion comes from this handler.

Powered by Google App Engine
This is Rietveld 408576698