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

Issue 314293005: Change HistoryService::QueryURL to use CancelableTaskTracker (Closed)

Created:
6 years, 6 months ago by sdefresne
Modified:
6 years, 6 months ago
CC:
chromium-reviews, davidben+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, tburkard+watch_chromium.org, browser-components-watch_chromium.org, gavinp+prer_chromium.org, dominich+watch_chromium.org, chromium-apps-reviews_chromium.org, markusheintz_, brettw
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Change HistoryService::QueryURL to use CancelableTaskTracker The callback no longer receive an HistoryService::Handle as first parameter and the caller should use the returned base::CancelableTaskTrasker::TaskId to cancel a request early. Instead of passing a CancelableRequestConsumer to the query, the caller pass a base::CancelableTaskTracker. The lifetime of the callback can be associated to the request by using base::Passed(). Remove unused types and fix usage of the values passed to the result callback (check success before using the URLRow or the VisitVector). BUG=371818 TBR=bauerb,sky,asargent,gavinp,shess,pkasting Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276739

Patch Set 1 #

Patch Set 2 : Rebase & fix style errors #

Total comments: 16

Patch Set 3 : Address comments #

Total comments: 4

Patch Set 4 : Rebase and add comment for scoped_ptr usage #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -160 lines) Patch
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/custom_home_pages_table_model.h View 1 3 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/custom_home_pages_table_model.cc View 1 2 5 chunks +29 lines, -34 lines 1 comment Download
M chrome/browser/extensions/api/history/history_api.h View 1 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/history/history_api.cc View 1 1 chunk +7 lines, -9 lines 0 comments Download
M chrome/browser/history/history_backend.h View 1 2 3 2 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/history/history_backend.cc View 1 2 3 2 chunks +16 lines, -19 lines 1 comment Download
M chrome/browser/history/history_marshaling.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/history/history_service.h View 1 2 3 1 chunk +9 lines, -9 lines 0 comments Download
M chrome/browser/history/history_service.cc View 1 2 3 2 chunks +14 lines, -5 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 3 3 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.h View 1 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/safe_browsing/browser_feature_extractor.h View 1 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/browser_feature_extractor.cc View 1 2 3 2 chunks +23 lines, -21 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_unittest.cc View 1 3 chunks +14 lines, -12 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
sdefresne
blundell: Please take a look. brettw: FYI
6 years, 6 months ago (2014-06-06 14:58:19 UTC) #1
blundell
Could you update the CL description to explain what the porting process involved? Thanks!
6 years, 6 months ago (2014-06-10 08:14:36 UTC) #2
sdefresne
Done. Please have another look.
6 years, 6 months ago (2014-06-11 08:33:14 UTC) #3
blundell
https://codereview.chromium.org/314293005/diff/60001/chrome/browser/custom_home_pages_table_model.cc File chrome/browser/custom_home_pages_table_model.cc (right): https://codereview.chromium.org/314293005/diff/60001/chrome/browser/custom_home_pages_table_model.cc#newcode234 chrome/browser/custom_home_pages_table_model.cc:234: if (taskId != base::CancelableTaskTracker::kBadTaskId) nit: this if seems unnecessary. ...
6 years, 6 months ago (2014-06-11 11:08:41 UTC) #4
sdefresne
PTAL https://codereview.chromium.org/314293005/diff/60001/chrome/browser/custom_home_pages_table_model.cc File chrome/browser/custom_home_pages_table_model.cc (right): https://codereview.chromium.org/314293005/diff/60001/chrome/browser/custom_home_pages_table_model.cc#newcode234 chrome/browser/custom_home_pages_table_model.cc:234: if (taskId != base::CancelableTaskTracker::kBadTaskId) On 2014/06/11 11:08:40, blundell ...
6 years, 6 months ago (2014-06-11 16:46:26 UTC) #5
blundell
LGTM with suggestion https://codereview.chromium.org/314293005/diff/100001/chrome/browser/safe_browsing/browser_feature_extractor.cc File chrome/browser/safe_browsing/browser_feature_extractor.cc (right): https://codereview.chromium.org/314293005/diff/100001/chrome/browser/safe_browsing/browser_feature_extractor.cc#newcode316 chrome/browser/safe_browsing/browser_feature_extractor.cc:316: ClientPhishingRequest* request, How much noise would ...
6 years, 6 months ago (2014-06-12 09:21:18 UTC) #6
sdefresne
https://codereview.chromium.org/314293005/diff/100001/chrome/browser/safe_browsing/browser_feature_extractor.cc File chrome/browser/safe_browsing/browser_feature_extractor.cc (right): https://codereview.chromium.org/314293005/diff/100001/chrome/browser/safe_browsing/browser_feature_extractor.cc#newcode316 chrome/browser/safe_browsing/browser_feature_extractor.cc:316: ClientPhishingRequest* request, On 2014/06/12 09:21:18, blundell wrote: > How ...
6 years, 6 months ago (2014-06-12 11:18:01 UTC) #7
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-12 12:51:36 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/314293005/160001
6 years, 6 months ago (2014-06-12 12:55:45 UTC) #9
sdefresne
TBR-ing OWNERS of refactored client code TBR=bauerb for //chrome/browser/browsing_data TBR=sky for //chrome/browser/custom_home_pages_table_model.* TBR=asargent for //chrome/browser/extensions/api ...
6 years, 6 months ago (2014-06-12 14:57:34 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 6 months ago (2014-06-12 15:17:11 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-12 15:23:45 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/161927)
6 years, 6 months ago (2014-06-12 15:23:46 UTC) #13
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-12 15:56:52 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/314293005/160001
6 years, 6 months ago (2014-06-12 15:58:29 UTC) #15
asargent_no_longer_on_chrome
extensions lgtm
6 years, 6 months ago (2014-06-12 16:14:31 UTC) #16
Peter Kasting
LGTM
6 years, 6 months ago (2014-06-12 17:22:35 UTC) #17
Scott Hess - ex-Googler
LGTM for safe_browsing. Your option if you want to consider my nits elsewhere, either in ...
6 years, 6 months ago (2014-06-12 18:04:35 UTC) #18
commit-bot: I haz the power
Change committed as 276739
6 years, 6 months ago (2014-06-12 18:08:52 UTC) #19
sdefresne
On 2014/06/12 18:04:35, shess wrote: > LGTM for safe_browsing. Your option if you want to ...
6 years, 6 months ago (2014-06-12 18:15:34 UTC) #20
Feng Qian
6 years, 6 months ago (2014-06-12 22:09:14 UTC) #21
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/330703005/ by feng@chromium.org.

The reason for reverting is: Break Clank ToT build:

https://uberchromegw.corp.google.com/i/clank.tot/builders/instrumentation-yak....

Powered by Google App Engine
This is Rietveld 408576698