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_LARGE_ICON_SERVICE_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ |
6 #define COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ | 6 #define COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // |desired_size_in_pixel| serves only as a hint to the service, no guarantees | 75 // |desired_size_in_pixel| serves only as a hint to the service, no guarantees |
76 // on the fetched size are provided. | 76 // on the fetched size are provided. |
77 // | 77 // |
78 // The callback is triggered when the operation finishes, where |success| | 78 // The callback is triggered when the operation finishes, where |success| |
79 // tells whether the fetch actually managed to database a new icon in the | 79 // tells whether the fetch actually managed to database a new icon in the |
80 // FaviconService. | 80 // FaviconService. |
81 // | 81 // |
82 // WARNING: This function will share the |page_url| with a Google server. This | 82 // WARNING: This function will share the |page_url| with a Google server. This |
83 // Can be used only for urls that are not privacy sensitive or for users that | 83 // Can be used only for urls that are not privacy sensitive or for users that |
84 // sync their history with Google servers. | 84 // sync their history with Google servers. |
| 85 // TODO(jkrcal): It is not clear from the name of this function, that it |
| 86 // actually adds the icon to the local cache. Maybe "StoreLargeIcon..."? |
85 void GetLargeIconOrFallbackStyleFromGoogleServerSkippingLocalCache( | 87 void GetLargeIconOrFallbackStyleFromGoogleServerSkippingLocalCache( |
86 const GURL& page_url, | 88 const GURL& page_url, |
87 int min_source_size_in_pixel, | 89 int min_source_size_in_pixel, |
88 int desired_size_in_pixel, | 90 int desired_size_in_pixel, |
89 const base::Callback<void(bool success)>& callback); | 91 const base::Callback<void(bool success)>& callback); |
90 | 92 |
91 private: | 93 private: |
92 base::CancelableTaskTracker::TaskId GetLargeIconOrFallbackStyleImpl( | 94 base::CancelableTaskTracker::TaskId GetLargeIconOrFallbackStyleImpl( |
93 const GURL& page_url, | 95 const GURL& page_url, |
94 int min_source_size_in_pixel, | 96 int min_source_size_in_pixel, |
(...skipping 11 matching lines...) Expand all Loading... |
106 std::vector<int> large_icon_types_; | 108 std::vector<int> large_icon_types_; |
107 | 109 |
108 std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher_; | 110 std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher_; |
109 | 111 |
110 DISALLOW_COPY_AND_ASSIGN(LargeIconService); | 112 DISALLOW_COPY_AND_ASSIGN(LargeIconService); |
111 }; | 113 }; |
112 | 114 |
113 } // namespace favicon | 115 } // namespace favicon |
114 | 116 |
115 #endif // COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ | 117 #endif // COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ |
OLD | NEW |