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

Unified Diff: chrome/browser/history/history.h

Issue 11746010: Cleanup history favicon code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history.h
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index e5df83012eaa1fa4ccd0947927d5e32bd99a6c3a..c67cdaf5a254fa1b2df9ff9206db9b1137594867 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -804,26 +804,19 @@ class HistoryService : public CancelableRequestProvider,
// Used by the FaviconService to set the favicons for a page on the history
// backend.
- // |favicon_bitmap_data| is a listing of additional favicon bitmaps to store
- // for |page_url|.
+ // |favicon_bitmap_data| replaces all the favicon bitmaps mapped to
+ // |page_url|.
// |expired| and |icon_type| fields in FaviconBitmapData are ignored.
- // |icon_url_sizes| is a mapping of all the icon urls of the favicons
- // available for |page_url| to the sizes that those favicons are available
- // from the web.
- // |favicon_bitmap_data| does not need to have entries for all the icon urls
- // or sizes listed in |icon_url_sizes|. However, the icon urls and pixel
- // sizes in |favicon_bitmap_data| must be a subset of |icon_url_sizes|. It is
- // important that |icon_url_sizes| be complete as mappings to favicons whose
- // icon url or pixel size is not in |icon_url_sizes| will be deleted.
- // Use MergeFavicon() if any of the icon URLs for |page_url| or any of the
- // favicon sizes of the icon URLs are not known.
+ // Use MergeFavicon() if |favicon_bitmap_data| is incomplete, and favicon
+ // bitmaps in the database should be preserved if possible. For instance,
+ // favicon bitmaps from sync are 1x only. MergeFavicon() is used to avoid
+ // deleting the 2x favicon bitmap if it is present in the history backend.
// See HistoryBackend::ValidateSetFaviconsParams() for more details on the
- // criteria for |favicon_bitmap_data| and |icon_url_sizes| to be valid.
+ // criteria for |favicon_bitmap_data| to be valid.
void SetFavicons(
const GURL& page_url,
history::IconType icon_type,
- const std::vector<history::FaviconBitmapData>& favicon_bitmap_data,
- const history::IconURLSizesMap& icon_url_sizes);
+ const std::vector<history::FaviconBitmapData>& favicon_bitmap_data);
// Used by the FaviconService to mark the favicon for the page as being out
// of date.
« no previous file with comments | « chrome/browser/history/android/android_provider_backend_unittest.cc ('k') | chrome/browser/history/history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698