summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/history_backend.cc
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 21:57:31 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 21:57:31 +0000
commitde68fde9be3924779dfeaf062273f22be294ec7d (patch)
tree3448269d1c1f7e07cdd7d98c825d216421b7bf79 /chrome/browser/history/history_backend.cc
parent8a5d3e8cae23f8b75e56e37cfb7af946f2a0fcb1 (diff)
downloadchromium_src-de68fde9be3924779dfeaf062273f22be294ec7d.zip
chromium_src-de68fde9be3924779dfeaf062273f22be294ec7d.tar.gz
chromium_src-de68fde9be3924779dfeaf062273f22be294ec7d.tar.bz2
iOS and non iOS use different decoder for SkBitmap to PNG.
Currently: - Sync sends the favicon PNG data to the history database - The history database sends a notification (indirectly) to sync that its favicon data has changed. In the process of the 'updated data' being sent to sync, the PNG data is decoded to ImageSkia and reencoded to PNG. Sync receives the reencoded data. Sync compares byte-for-byte the 'updated data' with the data that it has sent to the database. If the data from sync was encoded by a different PNG codec than the one used natively, the 'updated data' doesn't match exactly and sync erroneously thinks that it has an update to push to the server. This CL removes the decode/encode if possible in in FaviconUtil::SelectFaviconFramesFromPNGs to avoid pushing erroneous updates. BUG=172053, 171465 Test=SingleClientBookmarksSyncTest.SetFaviconHiDPIDifferentCodec Review URL: https://chromiumcodereview.appspot.com/12034002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history_backend.cc')
-rw-r--r--chrome/browser/history/history_backend.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 63b8b5b..b543692 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -1990,7 +1990,6 @@ void HistoryBackend::MergeFavicon(
// Copy the favicon bitmaps mapped to |page_url| to the favicon at |icon_url|
// till the limit of |kMaxFaviconBitmapsPerIconURL| is reached.
- bool migrated_bitmaps = false;
for (size_t i = 0; i < icon_mappings.size(); ++i) {
if (favicon_sizes.size() >= kMaxFaviconBitmapsPerIconURL)
break;
@@ -2011,8 +2010,6 @@ void HistoryBackend::MergeFavicon(
if (it != favicon_sizes.end())
continue;
- migrated_bitmaps = true;
-
// Add the favicon bitmap as expired as it is not consistent with the
// merged in data.
thumbnail_db_->AddFaviconBitmap(favicon_id,
@@ -2033,13 +2030,9 @@ void HistoryBackend::MergeFavicon(
SetFaviconMappingsForPageAndRedirects(page_url, icon_type, favicon_ids);
}
- // Sync currently does not properly deal with notifications as a result of
- // replacing a favicon bitmap. For M25, do not send any notifications if a
- // bitmap was replaced and no bitmaps were added or deleted. This is a
- // temporary fix for http://crbug.com/169460.
- if (migrated_bitmaps || !replaced_bitmap)
- SendFaviconChangedNotificationForPageAndRedirects(page_url);
-
+ // Send notification to the UI as at least a favicon bitmap was added or
+ // replaced.
+ SendFaviconChangedNotificationForPageAndRedirects(page_url);
ScheduleCommit();
}