DescriptionUpdate all bookmarks which use an icon URL when a favicon's bitmap is updated
This CL causes two different types of notifications to be dispatched when
favicon data is changed in the database:
Type 1: The page URL <-> icon URL mapping has changed.
e.g. http://www.google.com changed from using
http://www.google.com/favicon1.ico to using
http://www.google.com/favicon2.ico
Type 2: The favicon bitmap data for an icon URL has changed.
e.g. a webmaster replaced http://www.google.com/favicon1.ico with a new
version
An update to the favicon database can cause either one type of notification
or both types of notifications to be dispatched.
Example Scenario:
1) A Google webmaster has updated http://www.google.com/favicon1.ico
2) A user has http://www.google.com bookmarked
3) A user visits http://www.google.com/searchresults
Both http://www.google.com and http://www.google.com/searchresults use
http://www.google.com/favicon1.ico
Old Behavior:
The favicon update which occurs in step #3 causes a notification to be sent
with an incomplete list of page URLs for which the favicon has changed. A
notification is sent for http://www.google.com/searchresults but not for
http://www.google.com even though both pages use the same icon URL.
As a consequence of no notification being sent for http://www.google.com:
- The favicon for the http://www.google.com bookmark is not updated
- If a user is logged into sync, sync reverts the favicon for
http://www.google.com/favicon1.ico to the old version when Chrome is restarted
New Behavior:
A "Type 2 notification" is dispatched indicating that the favicon at
http://www.google.com/favicon1.ico has changed. This allows the BookmarkModel
to refetch the favicons for all the bookmarks which use
http://www.google.com/favicon1.ico, namely the http://www.google.com bookmark.
The favicon for http://www.google.com/favicon1.ico is not reverted to an old
version when Chrome is restarted
This bug can be fixed by passing to the BookmarkModel a list of all of the
page URLs which use http://www.google.com/favicon1.ico in step #3. This is
impractical because the subset of pages that the user visited which use a given
icon URL is usually much larger than the subset of bookmarked pages which use a
given icon URL.
BUG=485657
TEST=HistoryBackendTest.*
TwoClientBookmarksSyncTest.SC_SetFaviconTwoBookmarksSameIconURL
BookmarkModelTest.*
Committed: https://crrev.com/ca240dde9b8b56120f93050ebfd200bf6714e56b
Cr-Commit-Position: refs/heads/master@{#338054}
Patch Set 1 : #
Total comments: 6
Patch Set 2 : #
Total comments: 6
Patch Set 3 : #
Total comments: 2
Patch Set 4 : #
Total comments: 2
Patch Set 5 : #
Total comments: 5
Patch Set 6 : #
Total comments: 7
Patch Set 7 : #Patch Set 8 : #
Total comments: 1
Patch Set 9 : #
Total comments: 5
Patch Set 10 : #Messages
Total messages: 70 (30 generated)
|