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

Side by Side Diff: components/favicon/core/favicon_service.h

Issue 2721363002: Extend LargeIconService to fetch missing favicons from a Google server (Closed)
Patch Set: Extend LargeIconService to fetch missing favicons from a Google server Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2017 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_SERVICE_H_ 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_
6 #define COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ 6 #define COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // contains image reps for all of ui::GetSupportedScaleFactors(). Use 182 // contains image reps for all of ui::GetSupportedScaleFactors(). Use
183 // MergeFavicon() if it does not. 183 // MergeFavicon() if it does not.
184 // TODO(pkotwicz): Save unresized favicon bitmaps to the database. 184 // TODO(pkotwicz): Save unresized favicon bitmaps to the database.
185 // TODO(pkotwicz): Support adding favicons for multiple icon URLs to the 185 // TODO(pkotwicz): Support adding favicons for multiple icon URLs to the
186 // thumbnail database. 186 // thumbnail database.
187 virtual void SetFavicons(const GURL& page_url, 187 virtual void SetFavicons(const GURL& page_url,
188 const GURL& icon_url, 188 const GURL& icon_url,
189 favicon_base::IconType icon_type, 189 favicon_base::IconType icon_type,
190 const gfx::Image& image) = 0; 190 const gfx::Image& image) = 0;
191 191
192 // Same as SetFavicons with three differences:
pkotwicz 2017/03/21 18:20:29 Nit: SetFavicons -> SetFavicons()
mastiz 2017/03/22 09:46:53 Done.
193 // 1) It will be a no-op if there is an existing cached favicon for *any* type
194 // for |page_url|.
195 // 2) If |icon_url| is known to the database, |bitmaps| will be ignored (i.e.
196 // the icon won't be overwritten) but the mappings from |page_url| to
197 // |icon_url| will be stored (conditioned to point 1 above).
198 // 3) If |icon_url| is stored, it will be marked as expired.
199 // The callback will receive whether the write actually happened.
200 virtual void SetLastResortFavicons(const GURL& page_url,
201 const GURL& icon_url,
202 favicon_base::IconType icon_type,
203 const gfx::Image& image,
204 base::Callback<void(bool)> callback) = 0;
205
192 // Avoid repeated requests to download missing favicon. 206 // Avoid repeated requests to download missing favicon.
193 virtual void UnableToDownloadFavicon(const GURL& icon_url) = 0; 207 virtual void UnableToDownloadFavicon(const GURL& icon_url) = 0;
194 virtual bool WasUnableToDownloadFavicon(const GURL& icon_url) const = 0; 208 virtual bool WasUnableToDownloadFavicon(const GURL& icon_url) const = 0;
195 virtual void ClearUnableToDownloadFavicons() = 0; 209 virtual void ClearUnableToDownloadFavicons() = 0;
196 }; 210 };
197 211
198 } // namespace favicon 212 } // namespace favicon
199 213
200 #endif // COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ 214 #endif // COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698