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

Unified Diff: chrome/browser/history/top_sites_impl.cc

Issue 369503007: Remove dead code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/history/top_sites_impl.cc
diff --git a/chrome/browser/history/top_sites_impl.cc b/chrome/browser/history/top_sites_impl.cc
index d1fd053df57c59a336fe0995a1d102431ddc496e..544da6350887ae166f62b3d98559142ae86b19e2 100644
--- a/chrome/browser/history/top_sites_impl.cc
+++ b/chrome/browser/history/top_sites_impl.cc
@@ -128,7 +128,7 @@ void TopSitesImpl::Init(const base::FilePath& db_name) {
backend_->GetMostVisitedThumbnails(
base::Bind(&TopSitesImpl::OnGotMostVisitedThumbnails,
base::Unretained(this)),
- &cancelable_task_tracker_);
+ &backend_task_tracker_);
}
bool TopSitesImpl::SetPageThumbnail(const GURL& url,
@@ -378,7 +378,8 @@ void TopSitesImpl::Shutdown() {
// Cancel all requests so that the service doesn't callback to us after we've
// invoked Shutdown (this could happen if we have a pending request and
// Shutdown is invoked).
- history_consumer_.CancelAllRequests();
+ history_task_tracker_.TryCancelAll();
+ backend_task_tracker_.TryCancelAll();
backend_->Shutdown();
}
@@ -444,10 +445,10 @@ void TopSitesImpl::DiffMostVisited(const MostVisitedURLList& old_list,
}
}
-CancelableRequestProvider::Handle TopSitesImpl::StartQueryForMostVisited() {
+base::CancelableTaskTracker::TaskId TopSitesImpl::StartQueryForMostVisited() {
DCHECK(loaded_);
if (!profile_)
- return 0;
+ return base::CancelableTaskTracker::kBadTaskId;
HistoryService* hs = HistoryServiceFactory::GetForProfile(
profile_, Profile::EXPLICIT_ACCESS);
@@ -458,9 +459,9 @@ CancelableRequestProvider::Handle TopSitesImpl::StartQueryForMostVisited() {
kDaysOfHistory,
base::Bind(&TopSitesImpl::OnTopSitesAvailableFromHistory,
base::Unretained(this)),
- &cancelable_task_tracker_);
blundell 2014/07/03 08:29:12 is this a bugfix?
sdefresne 2014/07/22 14:29:06 This is unnecessary and removed.
+ &history_task_tracker_);
}
- return 0;
+ return base::CancelableTaskTracker::kBadTaskId;
}
bool TopSitesImpl::IsKnownURL(const GURL& url) {

Powered by Google App Engine
This is Rietveld 408576698