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

Issue 2263613002: Make BrowsingDataHandler observe WebHistoryService deletions (Closed)

Created:
4 years, 4 months ago by msramek
Modified:
4 years, 3 months ago
Reviewers:
tsergeant, lshang, sky
CC:
chromium-reviews, Patrick Dubroy, dbeam+watch-history_chromium.org, pam+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make BrowsingDataHandler observe WebHistoryService deletions BrowsingDataHandler observes local history deletions, but not synced history deletions. In cases where there are no local history entries to delete, it can happen that the history page does not reload and it looks as if the deletion failed. See https://docs.google.com/document/d/1Fd6CdBf6UMbYbkwSjEKyFOxew0Xid5IaT-QwnFchjig/ for background. This CL 1. Adds an Observer subclass to the WebHistoryService. 2. Registers BrowsingHistoryHandler as a WebHistoryService::Observer; and since WebHistoryService's existence is based on whether history sync is enabled, we also register as a SyncServiceObserver. 3. Adds a test to browsing_history_handler_unittest.cc. Also tested manually on Android - seems to solve the problem described in the above mentioned document. BUG=604114, 630164 Committed: https://crrev.com/d39070b1ac01776e5a3800a9ef55fe43dce74225 Cr-Commit-Position: refs/heads/master@{#414679}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fixed the test. #

Patch Set 3 : Fix Android compilation. #

Total comments: 11

Patch Set 4 : Addressed comments. #

Total comments: 4

Patch Set 5 : Moved comments inside 'if'. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -17 lines) Patch
M chrome/browser/ui/webui/browsing_history_handler.h View 1 2 3 5 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/browsing_history_handler.cc View 5 chunks +38 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/browsing_history_handler_unittest.cc View 1 2 4 chunks +168 lines, -1 line 0 comments Download
M components/history/core/browser/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/history/core/browser/web_history_service.h View 1 2 3 4 chunks +9 lines, -0 lines 0 comments Download
M components/history/core/browser/web_history_service.cc View 1 2 3 4 chunks +18 lines, -1 line 0 comments Download
A components/history/core/browser/web_history_service_observer.h View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
M components/history/core/test/fake_web_history_service.cc View 1 2 3 4 3 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 49 (30 generated)
msramek
Hello folks! Please have a look! This is my attempt to fix the elusive bug ...
4 years, 4 months ago (2016-08-23 11:42:40 UTC) #9
tsergeant
Liu is travelling and so might not see this, but her work was to do ...
4 years, 4 months ago (2016-08-24 08:47:04 UTC) #12
msramek
Thanks for the heads-up, Tim! https://codereview.chromium.org/2263613002/diff/40001/chrome/browser/ui/webui/browsing_history_handler_unittest.cc File chrome/browser/ui/webui/browsing_history_handler_unittest.cc (right): https://codereview.chromium.org/2263613002/diff/40001/chrome/browser/ui/webui/browsing_history_handler_unittest.cc#newcode91 chrome/browser/ui/webui/browsing_history_handler_unittest.cc:91: bool sync_active_; On 2016/08/24 ...
4 years, 4 months ago (2016-08-24 12:16:07 UTC) #15
lshang
My work was to reload the history list when 'historyDeleted' gets called on Javascript side, ...
4 years, 4 months ago (2016-08-24 23:27:32 UTC) #22
tsergeant
Thanks for expanding out the test. I'm not very familiar with these sync internals, but ...
4 years, 4 months ago (2016-08-25 05:09:14 UTC) #23
msramek
Thank you! Scott - friendly ping :)
4 years, 3 months ago (2016-08-25 09:42:35 UTC) #24
sky
https://codereview.chromium.org/2263613002/diff/80001/components/history/core/browser/web_history_service.cc File components/history/core/browser/web_history_service.cc (right): https://codereview.chromium.org/2263613002/diff/80001/components/history/core/browser/web_history_service.cc#newcode433 components/history/core/browser/web_history_service.cc:433: request_ptr->Start(); Is there a particular reason for this change? ...
4 years, 3 months ago (2016-08-25 16:08:00 UTC) #25
msramek
https://codereview.chromium.org/2263613002/diff/80001/components/history/core/browser/web_history_service.cc File components/history/core/browser/web_history_service.cc (right): https://codereview.chromium.org/2263613002/diff/80001/components/history/core/browser/web_history_service.cc#newcode433 components/history/core/browser/web_history_service.cc:433: request_ptr->Start(); On 2016/08/25 16:07:59, sky wrote: > Is there ...
4 years, 3 months ago (2016-08-25 17:35:10 UTC) #28
Dan Beam
https://codereview.chromium.org/2263613002/diff/100001/chrome/browser/ui/webui/browsing_history_handler.cc File chrome/browser/ui/webui/browsing_history_handler.cc (right): https://codereview.chromium.org/2263613002/diff/100001/chrome/browser/ui/webui/browsing_history_handler.cc#newcode994 chrome/browser/ui/webui/browsing_history_handler.cc:994: web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); note: if the page is in the middle ...
4 years, 3 months ago (2016-08-25 19:20:10 UTC) #31
msramek
https://codereview.chromium.org/2263613002/diff/100001/chrome/browser/ui/webui/browsing_history_handler.cc File chrome/browser/ui/webui/browsing_history_handler.cc (right): https://codereview.chromium.org/2263613002/diff/100001/chrome/browser/ui/webui/browsing_history_handler.cc#newcode994 chrome/browser/ui/webui/browsing_history_handler.cc:994: web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); On 2016/08/25 19:20:10, Dan Beam wrote: > note: ...
4 years, 3 months ago (2016-08-25 20:21:34 UTC) #32
sky
LGTM https://codereview.chromium.org/2263613002/diff/100001/components/history/core/test/fake_web_history_service.cc File components/history/core/test/fake_web_history_service.cc (right): https://codereview.chromium.org/2263613002/diff/100001/components/history/core/test/fake_web_history_service.cc#newcode120 components/history/core/test/fake_web_history_service.cc:120: // Deletion query. Having the comments above the ...
4 years, 3 months ago (2016-08-25 20:23:03 UTC) #33
msramek
Thanks Scott! I'm going to land this now in hopes of being in time for ...
4 years, 3 months ago (2016-08-25 21:13:48 UTC) #34
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/2263613002/120001
4 years, 3 months ago (2016-08-25 21:14:43 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/130258) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 3 months ago (2016-08-25 22:03:28 UTC) #39
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/2263613002/120001
4 years, 3 months ago (2016-08-25 23:26:52 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/285155)
4 years, 3 months ago (2016-08-26 01:06:49 UTC) #43
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/2263613002/120001
4 years, 3 months ago (2016-08-26 08:12:34 UTC) #45
commit-bot: I haz the power
Committed patchset #5 (id:120001)
4 years, 3 months ago (2016-08-26 09:46:46 UTC) #47
commit-bot: I haz the power
4 years, 3 months ago (2016-08-26 09:48:29 UTC) #49
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d39070b1ac01776e5a3800a9ef55fe43dce74225
Cr-Commit-Position: refs/heads/master@{#414679}

Powered by Google App Engine
This is Rietveld 408576698