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

Issue 352913002: Port HistoryService::ScheduleDBTask to CancelableTaskTracker (Closed)

Created:
6 years, 6 months ago by sdefresne
Modified:
6 years, 5 months ago
CC:
chromium-reviews, davidben+watch_chromium.org, tim+watch_chromium.org, cbentzel+watch_chromium.org, skanuj+watch_chromium.org, melevin+watch_chromium.org, zea+watch_chromium.org, tburkard+watch_chromium.org, haitaol+watch_chromium.org, dougw+watch_chromium.org, donnd+watch_chromium.org, browser-components-watch_chromium.org, dominich, gavinp+prer_chromium.org, dominich+watch_chromium.org, jfweitz+watch_chromium.org, David Black, samarth+watch_chromium.org, dhollowa+watch_chromium.org, kmadhusu+watch_chromium.org, Jered, maniscalco+watch_chromium.org, brettw, haaawk1
Project:
chromium
Visibility:
Public.

Description

Port HistoryService::ScheduleDBTask to CancelableTaskTracker The HistoryService::ScheduleDBTask sends HistoryDBTasks to HistoryBackend. The tasks are later processed unless canceled. If the task RunOnDBThread method returns false, the task is later re-executed. This pattern requires the use of CancelableTaskTracker::NewTrackedTaskId to get a Callback that can be used to check if the task has been canceled yet. Port all the client code and unit tests to pass a CancelableTaskTracker. Since CancelableTaskTracker is not thread-safe UrlIndexPrivateData cannot create its own CancelableTaskTracker, so it is provided by the containing InMemoryUrlIndex instance and cleaned up before resetting the private_data_ pointer. BUG=371818 TBR=atwilson,tburkard,pkasting,jcivelli Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281233

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address comments and rebase #

Patch Set 3 : Rebase #

Patch Set 4 : Fix browser_tests #

Patch Set 5 : Rebase #

Patch Set 6 : Fix lifetime of base::CancelableTaskTracker for HistoryModelWorker #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -174 lines) Patch
M chrome/browser/history/delete_directive_handler.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/history/delete_directive_handler.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/history/history_backend.h View 2 3 4 5 chunks +25 lines, -7 lines 0 comments Download
M chrome/browser/history/history_backend.cc View 1 2 3 4 5 chunks +66 lines, -37 lines 0 comments Download
M chrome/browser/history/history_browsertest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/history/history_marshaling.h View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/history/history_service.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/history/history_service.cc View 1 2 3 4 1 chunk +15 lines, -7 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.h View 3 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.cc View 1 7 chunks +16 lines, -8 lines 0 comments Download
M chrome/browser/history/in_memory_url_index_unittest.cc View 1 3 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/history/top_sites_impl_unittest.cc View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/history/url_index_private_data.h View 6 chunks +6 lines, -11 lines 0 comments Download
M chrome/browser/history/url_index_private_data.cc View 1 8 chunks +18 lines, -14 lines 0 comments Download
M chrome/browser/prerender/prerender_local_predictor.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_local_predictor.cc View 1 2 chunks +7 lines, -9 lines 0 comments Download
M chrome/browser/sync/glue/history_model_worker.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/history_model_worker.cc View 1 2 3 4 5 5 chunks +17 lines, -7 lines 0 comments Download
M chrome/browser/sync/glue/typed_url_data_type_controller.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/typed_url_data_type_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_typed_url_unittest.cc View 1 2 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/sync/test/integration/bookmarks_helper.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/typed_urls_helper.cc View 1 3 chunks +11 lines, -14 lines 0 comments Download
M chrome/browser/ui/search/instant_extended_interactive_uitest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/sync/profile_signin_confirmation_helper.cc View 1 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
sdefresne
Please take a look.
6 years, 6 months ago (2014-06-25 22:27:20 UTC) #1
blundell
LGTM with nits/questions https://codereview.chromium.org/352913002/diff/1/chrome/browser/history/history_backend.cc File chrome/browser/history/history_backend.cc (right): https://codereview.chromium.org/352913002/diff/1/chrome/browser/history/history_backend.cc#newcode2340 chrome/browser/history/history_backend.cc:2340: queued_history_db_tasks_.pop_front(); this will cause the task's ...
6 years, 6 months ago (2014-06-26 09:55:39 UTC) #2
sdefresne
https://codereview.chromium.org/352913002/diff/1/chrome/browser/history/history_backend.cc File chrome/browser/history/history_backend.cc (right): https://codereview.chromium.org/352913002/diff/1/chrome/browser/history/history_backend.cc#newcode2340 chrome/browser/history/history_backend.cc:2340: queued_history_db_tasks_.pop_front(); On 2014/06/26 09:55:39, blundell wrote: > this will ...
6 years, 5 months ago (2014-06-28 08:14:26 UTC) #3
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 5 months ago (2014-06-28 08:17:02 UTC) #4
sdefresne
The CQ bit was unchecked by sdefresne@chromium.org
6 years, 5 months ago (2014-06-28 08:17:23 UTC) #5
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 5 months ago (2014-07-02 13:38:29 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/352913002/60001
6 years, 5 months ago (2014-07-02 13:39:34 UTC) #7
sdefresne
The CQ bit was unchecked by sdefresne@chromium.org
6 years, 5 months ago (2014-07-02 13:49:31 UTC) #8
sdefresne
TBR-ing OWNERS of client code affected by the refactoring TBR=pkasting for //chrome/browser/ui/{search,sync} TBR=jcivelli for //chrome/test/base ...
6 years, 5 months ago (2014-07-02 13:54:13 UTC) #9
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 5 months ago (2014-07-02 15:57:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/352913002/80001
6 years, 5 months ago (2014-07-02 15:58:38 UTC) #11
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 5 months ago (2014-07-02 16:28:40 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/352913002/100001
6 years, 5 months ago (2014-07-02 16:29:29 UTC) #13
Peter Kasting
LGTM
6 years, 5 months ago (2014-07-02 18:10:15 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-02 20:29:07 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-02 20:56:35 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/builds/34620)
6 years, 5 months ago (2014-07-02 20:56:36 UTC) #17
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 5 months ago (2014-07-03 08:36:27 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/352913002/120001
6 years, 5 months ago (2014-07-03 08:38:01 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_dbg_simulator on tryserver.chromium ...
6 years, 5 months ago (2014-07-03 10:29:09 UTC) #20
commit-bot: I haz the power
6 years, 5 months ago (2014-07-03 11:41:20 UTC) #21
Message was sent while issue was closed.
Change committed as 281233

Powered by Google App Engine
This is Rietveld 408576698