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

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

Issue 11830007: Avoid sending notifications when the bitmap data in history has not changed (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
« no previous file with comments | « no previous file | chrome/browser/history/history_backend.cc » ('j') | chrome/browser/history/history_backend.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.h
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index ab0acb867eb890c3bdba179b6b2e155c17aaa6f0..7531a9ab1fb311ff033006f81d23e1a51a5c3c80 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -676,9 +676,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.
+ // If not NULL, |favicon_bitmaps_changed| is set to whether any of the bitmap
+ // data at |icon_id| is changed as a result of calling this method.
void SetFaviconBitmaps(
FaviconID icon_id,
- const std::vector<FaviconBitmapData>& favicon_bitmap_data);
+ const std::vector<FaviconBitmapData>& favicon_bitmap_data,
+ bool* favicon_bitmaps_changed);
// Returns true if |favicon_bitmap_data| and |icon_url_sizes| passed to
// SetFavicons() are valid.
@@ -700,8 +703,16 @@ 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|.
+ // |favicon_bitmaps_deleted| is set to true if at least one favicon bitmap
+ // is deleted.
void SetFaviconSizes(FaviconID icon_id,
- const FaviconSizes& favicon_sizes);
+ const FaviconSizes& favicon_sizes,
+ bool* favicon_bitmaps_deleted);
+
+ // Returns true if |new_bitmap_data| equals the bitmap data at |bitmap_id|.
+ bool IsFaviconBitmapDataEqual(
+ FaviconBitmapID bitmap_id,
+ const scoped_refptr<base::RefCountedMemory>& new_bitmap_data);
// Returns true if there are favicons for |page_url| and one of the types in
// |icon_types|.
« no previous file with comments | « no previous file | chrome/browser/history/history_backend.cc » ('j') | chrome/browser/history/history_backend.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698