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

Unified Diff: chrome/browser/history/top_sites_cache.h

Issue 24632002: Implementing chrome://thumbnails page to view URLs in TopSites and cached thumbnails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trying to fix Linux compile by reordering initializing order of weak_ptr_factory_. Created 7 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
« no previous file with comments | « chrome/browser/history/top_sites.h ('k') | chrome/browser/history/top_sites_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites_cache.h
diff --git a/chrome/browser/history/top_sites_cache.h b/chrome/browser/history/top_sites_cache.h
index 939f88d59f7ee9845e36b9b7c7ed2b40a864649d..ad1c912cc25f42a2cc6cbc194dbde5e3361eb6e5 100644
--- a/chrome/browser/history/top_sites_cache.h
+++ b/chrome/browser/history/top_sites_cache.h
@@ -12,6 +12,8 @@
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/url_utils.h"
+class GURL;
+
namespace history {
// TopSiteCache caches thumbnails for visited pages. Retrieving thumbnails from
@@ -53,25 +55,25 @@ class TopSitesCache {
// thumbnail for the specified url. It is possible for a URL to be in TopSites
// but not have an thumbnail.
bool GetPageThumbnail(const GURL& url,
- scoped_refptr<base::RefCountedMemory>* bytes);
+ scoped_refptr<base::RefCountedMemory>* bytes) const;
// Fetches the thumbnail score for the specified url. Returns true if
// there is a thumbnail score for the specified url.
- bool GetPageThumbnailScore(const GURL& url, ThumbnailScore* score);
+ bool GetPageThumbnailScore(const GURL& url, ThumbnailScore* score) const;
// Returns the canonical URL for |url|.
- const GURL& GetCanonicalURL(const GURL& url);
+ const GURL& GetCanonicalURL(const GURL& url) const;
// Returns the canonical URL for |url_prefix| that matches by prefix.
- // Multiple matches exst, returns the canonical URL for the first
+ // If multiple matches exist, returns the canonical URL for the first
// matching entry under lexicographical order.
- const GURL& GetCanonicalURLForPrefix(const GURL& url_prefix);
+ const GURL& GetCanonicalURLForPrefix(const GURL& url_prefix) const;
// Returns true if |url| is known.
- bool IsKnownURL(const GURL& url);
+ bool IsKnownURL(const GURL& url) const;
// Returns the index into |top_sites_| for |url|.
- size_t GetURLIndex(const GURL& url);
+ size_t GetURLIndex(const GURL& url) const;
private:
// The entries in CanonicalURLs, see CanonicalURLs for details. The second
@@ -105,12 +107,12 @@ class TopSitesCache {
void StoreRedirectChain(const RedirectList& redirects, size_t destination);
// Returns the iterator into |canonical_urls_| for the |url|.
- CanonicalURLs::iterator GetCanonicalURLsIterator(const GURL& url);
+ CanonicalURLs::const_iterator GetCanonicalURLsIterator(const GURL& url) const;
// Returns the first iterator into |canonical_urls_| for which |prefix_url|
// is a URL prefix. Returns |canonical_urls_.end()| if no match is found.
- CanonicalURLs::iterator GetCanonicalURLsIteratorForPrefix(
- const GURL& prefix_url);
+ CanonicalURLs::const_iterator GetCanonicalURLsIteratorForPrefix(
+ const GURL& prefix_url) const;
// The top sites.
MostVisitedURLList top_sites_;
« no previous file with comments | « chrome/browser/history/top_sites.h ('k') | chrome/browser/history/top_sites_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698