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

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

Issue 2313563002: Reduce jank from favicon downscaling. (Closed)
Patch Set: Rename function and remove 'Fast' Created 4 years, 3 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: components/history/core/browser/history_service.cc
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index fd3a29ec3ad865d45b593fa11d69397573ed8d85..a7e47e12a931a21a49958dc3fb669277e152decb 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -65,6 +65,7 @@ static const char* kHistoryThreadName = "Chrome_HistoryThread";
void RunWithFaviconResults(
const favicon_base::FaviconResultsCallback& callback,
std::vector<favicon_base::FaviconRawBitmapResult>* bitmap_results) {
+ TRACE_EVENT0("browser", "RunWithFaviconResults");
callback.Run(*bitmap_results);
}
@@ -507,6 +508,7 @@ base::CancelableTaskTracker::TaskId HistoryService::GetFavicons(
const std::vector<int>& desired_sizes,
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) {
+ TRACE_EVENT0("browser", "HistoryService::GetFavicons");
DCHECK(thread_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<favicon_base::FaviconRawBitmapResult>* results =
@@ -524,6 +526,7 @@ base::CancelableTaskTracker::TaskId HistoryService::GetFaviconsForURL(
const std::vector<int>& desired_sizes,
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) {
+ TRACE_EVENT0("browser", "HistoryService::GetFaviconsForURL");
DCHECK(thread_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<favicon_base::FaviconRawBitmapResult>* results =
@@ -558,6 +561,7 @@ base::CancelableTaskTracker::TaskId HistoryService::GetFaviconForID(
int desired_size,
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) {
+ TRACE_EVENT0("browser", "HistoryService::GetFaviconForID");
DCHECK(thread_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<favicon_base::FaviconRawBitmapResult>* results =
@@ -577,6 +581,7 @@ HistoryService::UpdateFaviconMappingsAndFetch(
const std::vector<int>& desired_sizes,
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) {
+ TRACE_EVENT0("browser", "HistoryService::UpdateFaviconMappingsAndFetch");
DCHECK(thread_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<favicon_base::FaviconRawBitmapResult>* results =
@@ -595,6 +600,7 @@ void HistoryService::MergeFavicon(
favicon_base::IconType icon_type,
scoped_refptr<base::RefCountedMemory> bitmap_data,
const gfx::Size& pixel_size) {
+ TRACE_EVENT0("browser", "HistoryService::MergeFavicon");
DCHECK(thread_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread());
if (history_client_ && !history_client_->CanAddURL(page_url))
« components/favicon_base/favicon_util.cc ('K') | « components/history/core/browser/history_backend.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698