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

Issue 1133463005: Update all bookmarks which use an icon URL when a favicon's bitmap is updated (Closed)

Created:
5 years, 7 months ago by pkotwicz
Modified:
5 years, 5 months ago
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, tfarina, maxbogue+watch_chromium.org, browser-components-watch_chromium.org, pvalenzuela+watch_chromium.org, noyau+watch_chromium.org, plaree+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@startup_do_not_unexpire
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update 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 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+709 lines, -182 lines) Patch
M chrome/browser/history/android/android_provider_backend.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/android/android_provider_backend_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/history/chrome_history_client.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/history/chrome_history_client.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/sync/sessions/notification_service_sessions_router.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -3 lines 0 comments Download
M chrome/browser/sync/sessions/notification_service_sessions_router.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/test/integration/sessions_helper.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc View 1 2 3 4 5 1 chunk +42 lines, -0 lines 0 comments Download
M components/bookmarks/DEPS View 1 2 3 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M components/bookmarks/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/bookmarks/browser/bookmark_model.h View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -3 lines 0 comments Download
M components/bookmarks/browser/bookmark_model.cc View 1 2 3 4 5 6 7 8 2 chunks +30 lines, -12 lines 0 comments Download
M components/bookmarks/browser/bookmark_model_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +147 lines, -0 lines 0 comments Download
M components/history/core/browser/expire_history_backend_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M components/history/core/browser/history_backend.h View 1 2 3 4 5 6 7 8 4 chunks +29 lines, -5 lines 0 comments Download
M components/history/core/browser/history_backend.cc View 1 2 3 4 5 6 7 8 8 chunks +37 lines, -19 lines 0 comments Download
M components/history/core/browser/history_backend_notifier.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -2 lines 0 comments Download
M components/history/core/browser/history_backend_unittest.cc View 1 2 3 4 5 6 7 8 18 chunks +297 lines, -79 lines 0 comments Download
M components/history/core/browser/history_service.h View 1 2 3 4 5 6 7 8 3 chunks +20 lines, -9 lines 0 comments Download
M components/history/core/browser/history_service.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -9 lines 0 comments Download
M components/history/core/test/history_backend_db_base_test.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M ios/chrome/browser/history/history_client_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M ios/chrome/browser/history/history_client_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -4 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -1 line 0 comments Download

Messages

Total messages: 70 (30 generated)
pkotwicz
rogerm@ PTAL
5 years, 7 months ago (2015-05-12 02:41:26 UTC) #2
pkotwicz
rogerm@ Ping!
5 years, 7 months ago (2015-05-13 15:11:29 UTC) #4
Roger McFarlane (Chromium)
sorry! looking...
5 years, 7 months ago (2015-05-13 15:15:44 UTC) #5
Roger McFarlane (Chromium)
First pass: so far it looks fine to me. I'll do another quick pass after ...
5 years, 7 months ago (2015-05-13 16:07:05 UTC) #6
pkotwicz
https://codereview.chromium.org/1133463005/diff/20001/chrome/browser/sync/sessions/sessions_sync_manager.cc File chrome/browser/sync/sessions/sessions_sync_manager.cc (right): https://codereview.chromium.org/1133463005/diff/20001/chrome/browser/sync/sessions/sessions_sync_manager.cc#newcode400 chrome/browser/sync/sessions/sessions_sync_manager.cc:400: const std::vector<GURL>& icon_urls) { On 2015/05/13 16:07:05, Roger McFarlane ...
5 years, 7 months ago (2015-05-13 17:26:49 UTC) #7
Roger McFarlane (Chromium)
LGTM with nits. https://codereview.chromium.org/1133463005/diff/40001/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc File chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc (right): https://codereview.chromium.org/1133463005/diff/40001/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc#newcode233 chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc:233: // stored in the same row ...
5 years, 7 months ago (2015-05-13 18:28:13 UTC) #8
pkotwicz
Scott, can you please take a look? https://codereview.chromium.org/1133463005/diff/40001/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc File chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc (right): https://codereview.chromium.org/1133463005/diff/40001/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc#newcode233 chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc:233: // stored ...
5 years, 7 months ago (2015-05-14 14:18:54 UTC) #10
pkotwicz
sky@ Ping!
5 years, 7 months ago (2015-05-22 00:49:25 UTC) #11
sky
https://codereview.chromium.org/1133463005/diff/60001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1133463005/diff/60001/components/bookmarks/browser/bookmark_model.cc#newcode520 components/bookmarks/browser/bookmark_model.cc:520: // TODO: Do something more efficient if this gets ...
5 years, 7 months ago (2015-05-22 03:09:06 UTC) #12
pkotwicz
https://codereview.chromium.org/1133463005/diff/60001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1133463005/diff/60001/components/bookmarks/browser/bookmark_model.cc#newcode520 components/bookmarks/browser/bookmark_model.cc:520: // TODO: Do something more efficient if this gets ...
5 years, 7 months ago (2015-05-22 16:00:39 UTC) #13
sky
We need another solution then. Iterating over all the bookmarks lots of times is going ...
5 years, 7 months ago (2015-05-22 17:45:27 UTC) #14
pkotwicz
sky@ can you please take another look? Sorry for the delay. I have added a ...
5 years, 6 months ago (2015-06-07 20:45:12 UTC) #16
sky
I'm not particularly keen on increasing the in memory size of the bookmark model for ...
5 years, 6 months ago (2015-06-08 15:01:43 UTC) #17
pkotwicz
Scott, can you please take another look? What do you mean by: "Large changes"? BookmarkModel::OnFaviconsChanged() ...
5 years, 6 months ago (2015-06-11 15:06:28 UTC) #18
pkotwicz
Scott, can you please take another look? What do you mean by: "Large changes"? BookmarkModel::OnFaviconsChanged() ...
5 years, 6 months ago (2015-06-11 15:10:21 UTC) #19
sky
https://codereview.chromium.org/1133463005/diff/100001/components/bookmarks/browser/bookmark_model.h File components/bookmarks/browser/bookmark_model.h (right): https://codereview.chromium.org/1133463005/diff/100001/components/bookmarks/browser/bookmark_model.h#newcode457 components/bookmarks/browser/bookmark_model.h:457: NodesOrderedByIconURLSet nodes_ordered_by_favicon_url_set_; If you're saying the favicons rarely change, ...
5 years, 6 months ago (2015-06-15 14:40:54 UTC) #20
pkotwicz
Scott, can you please take another look? https://codereview.chromium.org/1133463005/diff/100001/components/bookmarks/browser/bookmark_model.h File components/bookmarks/browser/bookmark_model.h (right): https://codereview.chromium.org/1133463005/diff/100001/components/bookmarks/browser/bookmark_model.h#newcode457 components/bookmarks/browser/bookmark_model.h:457: NodesOrderedByIconURLSet nodes_ordered_by_favicon_url_set_; ...
5 years, 6 months ago (2015-06-15 14:50:21 UTC) #21
sky
Seems to me that is enough to not bother with the extra cache. How about ...
5 years, 6 months ago (2015-06-15 20:33:53 UTC) #22
pkotwicz
Scott, can you please take another look? I have removed the extra caching from BookmarkModel ...
5 years, 6 months ago (2015-06-19 14:53:48 UTC) #24
sky
https://codereview.chromium.org/1133463005/diff/160001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1133463005/diff/160001/components/bookmarks/browser/bookmark_model.cc#newcode500 components/bookmarks/browser/bookmark_model.cc:500: // Log Histogram to determine how often this method ...
5 years, 6 months ago (2015-06-19 16:38:02 UTC) #26
pkotwicz
Scott, can you please take another look? https://codereview.chromium.org/1133463005/diff/160001/components/history/core/browser/history_service.h File components/history/core/browser/history_service.h (right): https://codereview.chromium.org/1133463005/diff/160001/components/history/core/browser/history_service.h#newcode461 components/history/core/browser/history_service.h:461: // Callback ...
5 years, 6 months ago (2015-06-21 22:16:09 UTC) #30
sky
https://codereview.chromium.org/1133463005/diff/240001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1133463005/diff/240001/components/bookmarks/browser/bookmark_model.cc#newcode448 components/bookmarks/browser/bookmark_model.cc:448: for (const BookmarkNode* node : nodes) to_update.insert(nodes.begin(), nodes.end()) https://codereview.chromium.org/1133463005/diff/240001/components/bookmarks/browser/bookmark_model.cc#newcode457 ...
5 years, 6 months ago (2015-06-22 15:19:48 UTC) #31
pkotwicz
Scott, can you please take another look? I have added tests for BookmarkModel::OnFaviconsChanged() https://codereview.chromium.org/1133463005/diff/240001/components/bookmarks/browser/bookmark_model.cc File ...
5 years, 6 months ago (2015-06-26 15:14:28 UTC) #33
sky
https://codereview.chromium.org/1133463005/diff/240001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1133463005/diff/240001/components/bookmarks/browser/bookmark_model.cc#newcode457 components/bookmarks/browser/bookmark_model.cc:457: UMA_HISTOGRAM_BOOLEAN("Bookmarks.OnFaviconsChangedMultipleIconURLs", true); On 2015/06/26 15:14:28, pkotwicz wrote: > |icon_urls| ...
5 years, 5 months ago (2015-06-29 14:51:03 UTC) #34
pkotwicz
Scott, can you please take a look? I have replaced the icon URL std::set parameter ...
5 years, 5 months ago (2015-07-01 17:43:02 UTC) #37
sky
LGTM https://codereview.chromium.org/1133463005/diff/330001/components/history/core/browser/history_service.h File components/history/core/browser/history_service.h (right): https://codereview.chromium.org/1133463005/diff/330001/components/history/core/browser/history_service.h#newcode461 components/history/core/browser/history_service.h:461: // Callback for when favicon data changes. Contains ...
5 years, 5 months ago (2015-07-01 19:40:57 UTC) #38
pkotwicz
isherman@ can you please take a look at the change in tools/metrics/histograms/histograms.xml
5 years, 5 months ago (2015-07-05 23:39:57 UTC) #46
Ilya Sherman
https://codereview.chromium.org/1133463005/diff/470001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1133463005/diff/470001/components/bookmarks/browser/bookmark_model.cc#newcode452 components/bookmarks/browser/bookmark_model.cc:452: UMA_HISTOGRAM_BOOLEAN("Bookmarks.OnFaviconsChangedIconURL", true); I'd recommend building in a baseline for ...
5 years, 5 months ago (2015-07-06 17:57:40 UTC) #47
pkotwicz
https://codereview.chromium.org/1133463005/diff/470001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/1133463005/diff/470001/components/bookmarks/browser/bookmark_model.cc#newcode452 components/bookmarks/browser/bookmark_model.cc:452: UMA_HISTOGRAM_BOOLEAN("Bookmarks.OnFaviconsChangedIconURL", true); How would I build a baseline? https://codereview.chromium.org/1133463005/diff/470001/tools/metrics/histograms/histograms.xml ...
5 years, 5 months ago (2015-07-06 18:47:30 UTC) #48
pkotwicz
isherman@ can you please take another look?
5 years, 5 months ago (2015-07-06 18:47:57 UTC) #49
Ilya Sherman
https://codereview.chromium.org/1133463005/diff/470001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1133463005/diff/470001/tools/metrics/histograms/histograms.xml#newcode2620 tools/metrics/histograms/histograms.xml:2620: + non-empty |icon_url|. On 2015/07/06 18:47:30, pkotwicz wrote: > ...
5 years, 5 months ago (2015-07-07 02:40:36 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133463005/470001
5 years, 5 months ago (2015-07-07 14:31:51 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/42379)
5 years, 5 months ago (2015-07-07 14:43:21 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133463005/490001
5 years, 5 months ago (2015-07-07 15:31:53 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/76458)
5 years, 5 months ago (2015-07-07 15:42:15 UTC) #60
pkotwicz
rohitrao@ can you please take a look at the ios changes?
5 years, 5 months ago (2015-07-07 18:39:33 UTC) #64
rohitrao (ping after 24h)
ios/ LGTM
5 years, 5 months ago (2015-07-09 11:59:18 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133463005/530001
5 years, 5 months ago (2015-07-09 14:40:04 UTC) #68
commit-bot: I haz the power
Committed patchset #10 (id:530001)
5 years, 5 months ago (2015-07-09 16:15:45 UTC) #69
commit-bot: I haz the power
5 years, 5 months ago (2015-07-09 16:16:45 UTC) #70
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/ca240dde9b8b56120f93050ebfd200bf6714e56b
Cr-Commit-Position: refs/heads/master@{#338054}

Powered by Google App Engine
This is Rietveld 408576698