| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_ |
| 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_ | 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Returns the thumbnail as an Image for the specified url. This adds an entry | 39 // Returns the thumbnail as an Image for the specified url. This adds an entry |
| 40 // for |url| if one has not yet been added. | 40 // for |url| if one has not yet been added. |
| 41 Images* GetImage(const GURL& url); | 41 Images* GetImage(const GURL& url); |
| 42 | 42 |
| 43 // Fetches the thumbnail for the specified url. Returns true if there is a | 43 // Fetches the thumbnail for the specified url. Returns true if there is a |
| 44 // thumbnail for the specified url. | 44 // thumbnail for the specified url. |
| 45 bool GetPageThumbnail(const GURL& url, | 45 bool GetPageThumbnail(const GURL& url, |
| 46 scoped_refptr<RefCountedBytes>* bytes); | 46 scoped_refptr<RefCountedBytes>* bytes); |
| 47 | 47 |
| 48 // Fetches the thumbnail score for the specified url. Returns true if |
| 49 // there is a thumbnail score for the specified url. |
| 50 bool GetPageThumbnailScore(const GURL& url, ThumbnailScore* score); |
| 51 |
| 48 // Returns the canonical URL for |url|. | 52 // Returns the canonical URL for |url|. |
| 49 GURL GetCanonicalURL(const GURL& url); | 53 GURL GetCanonicalURL(const GURL& url); |
| 50 | 54 |
| 51 // Returns true if |url| is known. | 55 // Returns true if |url| is known. |
| 52 bool IsKnownURL(const GURL& url); | 56 bool IsKnownURL(const GURL& url); |
| 53 | 57 |
| 54 // Returns the index into |top_sites_| for |url|. | 58 // Returns the index into |top_sites_| for |url|. |
| 55 size_t GetURLIndex(const GURL& url); | 59 size_t GetURLIndex(const GURL& url); |
| 56 | 60 |
| 57 // Removes any thumbnails that are no longer referenced by the top sites. | 61 // Removes any thumbnails that are no longer referenced by the top sites. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Generated from the redirects to and from the most visited pages. See | 103 // Generated from the redirects to and from the most visited pages. See |
| 100 // description above typedef for details. | 104 // description above typedef for details. |
| 101 CanonicalURLs canonical_urls_; | 105 CanonicalURLs canonical_urls_; |
| 102 | 106 |
| 103 DISALLOW_COPY_AND_ASSIGN(TopSitesCache); | 107 DISALLOW_COPY_AND_ASSIGN(TopSitesCache); |
| 104 }; | 108 }; |
| 105 | 109 |
| 106 } // namespace history | 110 } // namespace history |
| 107 | 111 |
| 108 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_ | 112 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_ |
| OLD | NEW |