OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FAVICON_FAVICON_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ |
6 #define CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ | 6 #define CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 // page that has been browsed in the past. |expired| in the callback is | 75 // page that has been browsed in the past. |expired| in the callback is |
76 // always false. | 76 // always false. |
77 Handle GetFaviconForURL(const GURL& page_url, | 77 Handle GetFaviconForURL(const GURL& page_url, |
78 int icon_types, | 78 int icon_types, |
79 CancelableRequestConsumerBase* consumer, | 79 CancelableRequestConsumerBase* consumer, |
80 const FaviconDataCallback& callback); | 80 const FaviconDataCallback& callback); |
81 | 81 |
82 // Marks all types of favicon for the page as being out of date. | 82 // Marks all types of favicon for the page as being out of date. |
83 void SetFaviconOutOfDateForPage(const GURL& page_url); | 83 void SetFaviconOutOfDateForPage(const GURL& page_url); |
84 | 84 |
85 // Clone a Favicon from an existing page. Needed if you want to declare | |
Greg Billock
2011/11/11 17:47:56
I'm not sure I understand. Does this method assign
groby-ooo-7-16
2011/11/14 23:53:36
Clarified text, hopefully.
On 2011/11/11 17:47:56
| |
86 // favicons (tentatively) in advance, before a page was ever visited. | |
87 void CloneFavicon(const GURL& old_page_url, const GURL& new_page_url); | |
88 | |
85 // Allows the importer to set many favicons for many pages at once. The pages | 89 // Allows the importer to set many favicons for many pages at once. The pages |
86 // must exist, any favicon sets for unknown pages will be discarded. Existing | 90 // must exist, any favicon sets for unknown pages will be discarded. Existing |
87 // favicons will not be overwritten. | 91 // favicons will not be overwritten. |
88 void SetImportedFavicons( | 92 void SetImportedFavicons( |
89 const std::vector<history::ImportedFaviconUsage>& favicon_usage); | 93 const std::vector<history::ImportedFaviconUsage>& favicon_usage); |
90 | 94 |
91 // Sets the favicon for a page. | 95 // Sets the favicon for a page. |
92 void SetFavicon(const GURL& page_url, | 96 void SetFavicon(const GURL& page_url, |
93 const GURL& icon_url, | 97 const GURL& icon_url, |
94 const std::vector<unsigned char>& image_data, | 98 const std::vector<unsigned char>& image_data, |
95 history::IconType icon_type); | 99 history::IconType icon_type); |
96 | 100 |
97 private: | 101 private: |
98 | 102 |
99 | 103 |
100 Profile* profile_; | 104 Profile* profile_; |
101 | 105 |
102 // Helper to forward an empty result if we cannot get the history service. | 106 // Helper to forward an empty result if we cannot get the history service. |
103 void ForwardEmptyResultAsync(GetFaviconRequest* request); | 107 void ForwardEmptyResultAsync(GetFaviconRequest* request); |
104 | 108 |
105 DISALLOW_COPY_AND_ASSIGN(FaviconService); | 109 DISALLOW_COPY_AND_ASSIGN(FaviconService); |
106 }; | 110 }; |
107 | 111 |
108 #endif // CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ | 112 #endif // CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ |
OLD | NEW |