diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 23:24:17 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-13 23:24:17 +0000 |
commit | 2ee1325b9a4d73e72c113bd6c4a64b34dfe77307 (patch) | |
tree | 2ae5ae0ac504d65be998a2b030f448d86ffa6922 /chrome/browser/history/history_backend.h | |
parent | 54dda8603e1f35ef1fce2853acfd149ff3432dab (diff) | |
download | chromium_src-2ee1325b9a4d73e72c113bd6c4a64b34dfe77307.zip chromium_src-2ee1325b9a4d73e72c113bd6c4a64b34dfe77307.tar.gz chromium_src-2ee1325b9a4d73e72c113bd6c4a64b34dfe77307.tar.bz2 |
Tell the UI to update the bookmark favicon when there is a new favicon bitmap available
Bug=148669
Test=Buy a retina mac
Use a --user-data-dir with bookmarks which were added pre Sep 13, 2012
Click on a low DPI bookmark in the bookmark bar
The bookmark should be updated to high DPI once the page has finished loading
Review URL: https://chromiumcodereview.appspot.com/10913235
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156673 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history_backend.h')
-rw-r--r-- | chrome/browser/history/history_backend.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h index deeab63..065c19e 100644 --- a/chrome/browser/history/history_backend.h +++ b/chrome/browser/history/history_backend.h @@ -231,7 +231,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, // given RedirectList. For example, if we have the redirect list A -> B -> C, // then calling this function with url=C would fill redirects with {B, A}. bool GetMostRecentRedirectsTo(const GURL& url, - history::RedirectList* redirects); + history::RedirectList* redirects); // Thumbnails ---------------------------------------------------------------- @@ -648,9 +648,12 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, // For each entry in |favicon_bitmap_data|, if a favicon bitmap already // exists at the entry's pixel size, replace the favicon bitmap's data with // the entry's bitmap data. Otherwise add a new favicon bitmap. + // |favicon_bitmap_added| is set to true if the function has added a favicon + // bitmap. void SetFaviconBitmaps( FaviconID icon_id, - const std::vector<FaviconBitmapData>& favicon_bitmap_data); + const std::vector<FaviconBitmapData>& favicon_bitmap_data, + bool* favicon_bitmap_added); // Returns true if |favicon_bitmap_data| and |icon_url_sizes| passed to // SetFavicons() are valid. @@ -672,7 +675,11 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, // detailed description of FaviconSizes. // Deletes any favicon bitmaps currently mapped to |icon_id| whose pixel // sizes are not contained in |favicon_sizes|. - void SetFaviconSizes(FaviconID icon_id, const FaviconSizes& favicon_sizes); + // |favicon_bitmap_removed| is set to true if the function removed a favicon + // bitmap. + void SetFaviconSizes(FaviconID icon_id, + const FaviconSizes& favicon_sizes, + bool* favicon_bitmap_removed); // Returns true if there are favicons for |page_url| and one of the types in // |icon_types|. @@ -721,8 +728,10 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, IconURLSizesMap* icon_url_sizes); // Maps the favicon ids in |icon_ids| to |page_url| (and all redirects) - // for |icon_type|. This will also broadcast notifications as necessary. - void SetFaviconMappingsForPageAndRedirects( + // for |icon_type|. + // Returns true if the mappings for the page or any of its redirects were + // changed. + bool SetFaviconMappingsForPageAndRedirects( const GURL& page_url, IconType icon_type, const std::vector<FaviconID>& icon_ids); @@ -733,6 +742,16 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, IconType icon_type, const std::vector<FaviconID>& icon_ids); + // Returns all the page URLs in the redirect chain for |page_url|. If there + // are no known redirects for |page_url|, returns a vector with |page_url|. + void GetCachedRecentRedirects(const GURL& page_url, + history::RedirectList* redirect_list); + + // Send notification that the favicon has changed for |page_url| and all its + // redirects. + void SendFaviconChangedNotificationForPageAndRedirects( + const GURL& page_url); + // Generic stuff ------------------------------------------------------------- // Processes the next scheduled HistoryDBTask, scheduling this method |