| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ |
| 6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ | 6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // Returns whether the driver is waiting for a download to complete or for | 46 // Returns whether the driver is waiting for a download to complete or for |
| 47 // data from the FaviconService. Reserved for testing. | 47 // data from the FaviconService. Reserved for testing. |
| 48 bool HasPendingTasksForTest(); | 48 bool HasPendingTasksForTest(); |
| 49 | 49 |
| 50 protected: | 50 protected: |
| 51 FaviconDriverImpl(FaviconService* favicon_service, | 51 FaviconDriverImpl(FaviconService* favicon_service, |
| 52 history::HistoryService* history_service, | 52 history::HistoryService* history_service, |
| 53 bookmarks::BookmarkModel* bookmark_model); | 53 bookmarks::BookmarkModel* bookmark_model); |
| 54 ~FaviconDriverImpl() override; | 54 ~FaviconDriverImpl() override; |
| 55 | 55 |
| 56 // Returns whether downloading favicon for |url| previously failed. | |
| 57 bool WasUnableToDownloadFavicon(const GURL& url); | |
| 58 | |
| 59 // Informs FaviconService that the favicon for |url| is out of date. If | 56 // Informs FaviconService that the favicon for |url| is out of date. If |
| 60 // |force_reload| is true, then discard information about favicon download | 57 // |force_reload| is true, then discard information about favicon download |
| 61 // failures. | 58 // failures. |
| 62 void SetFaviconOutOfDateForPage(const GURL& url, bool force_reload); | 59 void SetFaviconOutOfDateForPage(const GURL& url, bool force_reload); |
| 63 | 60 |
| 64 // Broadcasts new favicon URL candidates to FaviconHandlers. | 61 // Broadcasts new favicon URL candidates to FaviconHandlers. |
| 65 void OnUpdateFaviconURL(const GURL& page_url, | 62 void OnUpdateFaviconURL(const GURL& page_url, |
| 66 const std::vector<FaviconURL>& candidates); | 63 const std::vector<FaviconURL>& candidates); |
| 67 | 64 |
| 68 protected: | 65 protected: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 81 // |touch_icon_handler_| may be null depending on the platform and variations. | 78 // |touch_icon_handler_| may be null depending on the platform and variations. |
| 82 std::unique_ptr<FaviconHandler> favicon_handler_; | 79 std::unique_ptr<FaviconHandler> favicon_handler_; |
| 83 std::unique_ptr<FaviconHandler> touch_icon_handler_; | 80 std::unique_ptr<FaviconHandler> touch_icon_handler_; |
| 84 | 81 |
| 85 DISALLOW_COPY_AND_ASSIGN(FaviconDriverImpl); | 82 DISALLOW_COPY_AND_ASSIGN(FaviconDriverImpl); |
| 86 }; | 83 }; |
| 87 | 84 |
| 88 } // namespace favicon | 85 } // namespace favicon |
| 89 | 86 |
| 90 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ | 87 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ |
| OLD | NEW |