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

Unified Diff: components/history/core/browser/top_sites_impl.cc

Issue 2567043002: Cleanup: Remove unused SearchTabHelper::GetOpenUrls (Closed)
Patch Set: more Created 4 years 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: components/history/core/browser/top_sites_impl.cc
diff --git a/components/history/core/browser/top_sites_impl.cc b/components/history/core/browser/top_sites_impl.cc
index 57e72498d659f69250d919a70a96d9e6c81722e8..6c540ecfda54b2a197dc2cdf6018f5e3434be30a 100644
--- a/components/history/core/browser/top_sites_impl.cc
+++ b/components/history/core/browser/top_sites_impl.cc
@@ -172,41 +172,6 @@ bool TopSitesImpl::SetPageThumbnail(const GURL& url,
return SetPageThumbnailEncoded(url, thumbnail_data.get(), score);
}
-bool TopSitesImpl::SetPageThumbnailToJPEGBytes(
- const GURL& url,
- const base::RefCountedMemory* memory,
- const ThumbnailScore& score) {
- DCHECK(thread_checker_.CalledOnValidThread());
-
- if (!loaded_) {
- // TODO(sky): I need to cache these and apply them after the load
- // completes.
- return false;
- }
-
- bool add_temp_thumbnail = false;
- if (!IsKnownURL(url)) {
- if (!IsNonForcedFull()) {
- add_temp_thumbnail = true;
- } else {
- return false; // This URL is not known to us.
- }
- }
-
- if (!can_add_url_to_history_.Run(url))
- return false; // It's not a real webpage.
-
- if (add_temp_thumbnail) {
- // Always remove the existing entry and then add it back. That way if we end
- // up with too many temp thumbnails we'll prune the oldest first.
- RemoveTemporaryThumbnailByURL(url);
- AddTemporaryThumbnail(url, memory, score);
- return true;
- }
-
- return SetPageThumbnailEncoded(url, memory, score);
-}
-
// WARNING: this function may be invoked on any thread.
void TopSitesImpl::GetMostVisitedURLs(
const GetMostVisitedURLsCallback& callback,
@@ -444,12 +409,12 @@ void TopSitesImpl::DiffMostVisited(const MostVisitedURLList& old_list,
}
}
-base::CancelableTaskTracker::TaskId TopSitesImpl::StartQueryForMostVisited() {
+void TopSitesImpl::StartQueryForMostVisited() {
msw 2016/12/13 22:31:53 nit: reorder to match new decl order
Marc Treib 2016/12/14 11:12:22 Done. There were some other things out of order wr
DCHECK(loaded_);
if (!history_service_)
- return base::CancelableTaskTracker::kBadTaskId;
+ return;
- return history_service_->QueryMostVisitedURLs(
+ history_service_->QueryMostVisitedURLs(
num_results_to_request_from_history(), kDaysOfHistory,
base::Bind(&TopSitesImpl::OnTopSitesAvailableFromHistory,
base::Unretained(this)),
@@ -460,10 +425,6 @@ bool TopSitesImpl::IsKnownURL(const GURL& url) {
return loaded_ && cache_->IsKnownURL(url);
}
-const std::string& TopSitesImpl::GetCanonicalURLString(const GURL& url) const {
- return cache_->GetCanonicalURL(url).spec();
-}
-
bool TopSitesImpl::IsNonForcedFull() {
return loaded_ && cache_->GetNumNonForcedURLs() >= kNonForcedTopSitesNumber;
}

Powered by Google App Engine
This is Rietveld 408576698