| 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 c8f04660663ed1d5af5023a1a69a25c9d0876523..c874f1f55fa98a9c039b2b9b41d80358a9073b8b 100644
|
| --- a/chrome/browser/history/top_sites_impl.cc
|
| +++ b/chrome/browser/history/top_sites_impl.cc
|
| @@ -291,6 +291,7 @@ void TopSitesImpl::GetMostVisitedURLs(
|
| bool TopSitesImpl::GetPageThumbnail(
|
| const GURL& url, scoped_refptr<base::RefCountedMemory>* bytes) {
|
| // WARNING: this may be invoked on any thread.
|
| + // Perform exact match.
|
| {
|
| base::AutoLock lock(lock_);
|
| if (thread_safe_cache_->GetPageThumbnail(url, bytes))
|
| @@ -308,6 +309,15 @@ bool TopSitesImpl::GetPageThumbnail(
|
| }
|
| }
|
|
|
| + // Still not found, so trim query, and perform prefix match.
|
| + {
|
| + GURL::Replacements replacements;
|
| + replacements.ClearQuery();
|
| + GURL url_no_query(url.ReplaceComponents(replacements));
|
| + base::AutoLock lock(lock_);
|
| + if (thread_safe_cache_->GetPageThumbnailForPrefix(url_no_query, bytes))
|
| + return true;
|
| + }
|
| return false;
|
| }
|
|
|
|
|