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

Unified Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc

Issue 352913002: Port HistoryService::ScheduleDBTask to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lifetime of base::CancelableTaskTracker for HistoryModelWorker Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
index 40cf7132b4f2356f6052f51b7119bc0d45f5ce10..4e9ce18ea9897fe4f313df7529d6e8ee59985325 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
@@ -92,7 +92,6 @@ class ProfileSigninConfirmationHelper
Profile* profile_;
// Used for async tasks.
- CancelableRequestConsumer request_consumer_;
base::CancelableTaskTracker task_tracker_;
// Keep track of how many async requests are pending.
@@ -159,10 +158,8 @@ void ProfileSigninConfirmationHelper::CheckHasTypedURLs() {
}
service->ScheduleDBTask(
new HasTypedURLsTask(
- base::Bind(
- &ProfileSigninConfirmationHelper::ReturnResult,
- this)),
- &request_consumer_);
+ base::Bind(&ProfileSigninConfirmationHelper::ReturnResult, this)),
+ &task_tracker_);
}
void ProfileSigninConfirmationHelper::set_pending_requests(int requests) {
@@ -174,7 +171,7 @@ void ProfileSigninConfirmationHelper::ReturnResult(bool result) {
// result of |true|, otherwise pass the last returned result.
if (!result_returned_ && (--pending_requests_ == 0 || result)) {
result_returned_ = true;
- request_consumer_.CancelAllRequests();
+ task_tracker_.TryCancelAll();
return_result_.Run(result);
}
}
« no previous file with comments | « chrome/browser/ui/search/instant_extended_interactive_uitest.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698