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

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

Issue 6813040: Add TopSites::GetTemporaryThumbnailScore(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 8 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
« no previous file with comments | « chrome/browser/history/top_sites.h ('k') | chrome/browser/history/top_sites_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites.cc
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index 71d3316cbb1bfe15adc2b82dad942d7e1fd858e7..d1ea4a4edcabdd6f7e03d20fba5a708a4055b56e 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -257,6 +257,19 @@ bool TopSites::GetPageThumbnailScore(const GURL& url,
return thread_safe_cache_->GetPageThumbnailScore(url, score);
}
+bool TopSites::GetTemporaryPageThumbnailScore(const GURL& url,
+ ThumbnailScore* score) {
+ for (TempImages::iterator i = temp_images_.begin(); i != temp_images_.end();
+ ++i) {
+ if (i->first == url) {
+ *score = i->second.thumbnail_score;
+ return true;
+ }
+ }
+ return false;
+}
+
+
// Returns the index of |url| in |urls|, or -1 if not found.
static int IndexOf(const MostVisitedURLList& urls, const GURL& url) {
for (size_t i = 0; i < urls.size(); i++) {
« no previous file with comments | « chrome/browser/history/top_sites.h ('k') | chrome/browser/history/top_sites_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698