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

Issue 2555013003: [Offline Pages] Convert Download Suggestions Provider to using OfflinePageAdded (Closed)

Created:
4 years ago by dewittj
Modified:
4 years ago
Reviewers:
Marc Treib, vitaliii
CC:
chromium-reviews, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline Pages] Convert Download Suggestions Provider to using OfflinePageAdded Recently OfflinePageModelChanged was renamed to OfflinePageAdded to reflect the reality of when that function was being called. As a result, the OfflinePageAdded function now receives as a parameter the OfflinePageItem that was added. This allows for a much simpler observer function that directly operates on the new page in the download cache. BUG=638276 Committed: https://crrev.com/804d3453c04c1caf0bf66cd73d5e2ae36dde7ae7 Cr-Commit-Position: refs/heads/master@{#437616}

Patch Set 1 #

Patch Set 2 : Simplify #

Patch Set 3 : Refactor out the creation time test. #

Patch Set 4 : rebase #

Total comments: 13

Patch Set 5 : vitaliii comments. #

Patch Set 6 : One more comment. #

Total comments: 4

Patch Set 7 : Prevent crash #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -13 lines) Patch
M chrome/browser/ntp_snippets/download_suggestions_provider.cc View 1 2 3 4 5 6 6 chunks +39 lines, -13 lines 0 comments Download

Messages

Total messages: 33 (23 generated)
dewittj
PTAL, thanks! Note that the new routine does somewhat less than AsynchronouslyFetchOfflinePagesDownloads; I think the ...
4 years ago (2016-12-08 17:08:32 UTC) #8
vitaliii
Hi Justin, It is fine not to prune the dismissed ids in OfflinePageAdded notification, assuming ...
4 years ago (2016-12-08 17:40:32 UTC) #9
vitaliii
Some elaborations on my comments. Sorry for not noticing this immediately. https://codereview.chromium.org/2555013003/diff/60001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc (right): ...
4 years ago (2016-12-08 18:17:20 UTC) #10
dewittj
Thanks! https://codereview.chromium.org/2555013003/diff/60001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc (right): https://codereview.chromium.org/2555013003/diff/60001/chrome/browser/ntp_snippets/download_suggestions_provider.cc#newcode51 chrome/browser/ntp_snippets/download_suggestions_provider.cc:51: bool CompareOfflinePagesForSorting(const OfflinePageItem& left, On 2016/12/08 17:40:32, vitaliii ...
4 years ago (2016-12-08 19:09:02 UTC) #15
vitaliii
LGTM with a nit. You still need an owner approval from treib@. https://codereview.chromium.org/2555013003/diff/60001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc ...
4 years ago (2016-12-09 10:02:37 UTC) #18
Marc Treib
Sorry for the delay! LGTM with one more comment. https://codereview.chromium.org/2555013003/diff/100001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc (right): https://codereview.chromium.org/2555013003/diff/100001/chrome/browser/ntp_snippets/download_suggestions_provider.cc#newcode336 chrome/browser/ntp_snippets/download_suggestions_provider.cc:336: ...
4 years ago (2016-12-09 15:34:34 UTC) #19
dewittj
thanks! https://codereview.chromium.org/2555013003/diff/100001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc (right): https://codereview.chromium.org/2555013003/diff/100001/chrome/browser/ntp_snippets/download_suggestions_provider.cc#newcode324 chrome/browser/ntp_snippets/download_suggestions_provider.cc:324: DCHECK_EQ(ReadOfflinePageDismissedIDsFromPrefs().count( On 2016/12/09 10:02:37, vitaliii wrote: > nit: ...
4 years ago (2016-12-09 18:43:57 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2555013003/140001
4 years ago (2016-12-09 18:44:11 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years ago (2016-12-09 20:15:16 UTC) #31
commit-bot: I haz the power
4 years ago (2016-12-12 14:37:10 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/804d3453c04c1caf0bf66cd73d5e2ae36dde7ae7
Cr-Commit-Position: refs/heads/master@{#437616}

Powered by Google App Engine
This is Rietveld 408576698