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

Issue 2386103009: NTPSnippetsService: Garbage collect orphaned images at startup. (Closed)

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

Description

NTPSnippetsService: Garbage collect orphaned images at startup. Also extends the unittest to use a proper image_decoder to allow better test coverage (and actually verifying the intended behavior). BUG=649009 Committed: https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684 Cr-Commit-Position: refs/heads/master@{#423529}

Patch Set 1 #

Patch Set 2 : patch restored #

Total comments: 28

Patch Set 3 : addressed comments #

Patch Set 4 : removed unused function #

Patch Set 5 : snippet ids instead of snippets #

Total comments: 5

Patch Set 6 : final comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -55 lines) Patch
M components/ntp_snippets/remote/ntp_snippets_database.h View 1 2 3 4 5 4 chunks +11 lines, -6 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_database.cc View 1 2 3 4 5 5 chunks +44 lines, -34 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_database_unittest.cc View 1 2 4 chunks +49 lines, -0 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_service.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_service.cc View 1 2 3 4 5 11 chunks +29 lines, -10 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_service_unittest.cc View 1 2 3 8 chunks +78 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
tschumann
4 years, 2 months ago (2016-10-06 09:44:16 UTC) #2
jkrcal
lgtm, thanks! https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.cc File components/ntp_snippets/remote/ntp_snippets_database.cc (right): https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.cc#newcode139 components/ntp_snippets/remote/ntp_snippets_database.cc:139: std::unique_ptr<std::vector<std::string>> keys) { Maybe |image_keys| to make ...
4 years, 2 months ago (2016-10-06 10:12:47 UTC) #3
Marc Treib
https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.cc File components/ntp_snippets/remote/ntp_snippets_database.cc (right): https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.cc#newcode136 components/ntp_snippets/remote/ntp_snippets_database.cc:136: void NTPSnippetsDatabase::DeleteUnreferencedImages( nit: Please match the order of methods ...
4 years, 2 months ago (2016-10-06 10:21:30 UTC) #4
tschumann
https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.cc File components/ntp_snippets/remote/ntp_snippets_database.cc (right): https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.cc#newcode136 components/ntp_snippets/remote/ntp_snippets_database.cc:136: void NTPSnippetsDatabase::DeleteUnreferencedImages( On 2016/10/06 10:21:30, Marc Treib wrote: > ...
4 years, 2 months ago (2016-10-06 10:56:11 UTC) #5
Marc Treib
https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.h File components/ntp_snippets/remote/ntp_snippets_database.h (right): https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.h#newcode81 components/ntp_snippets/remote/ntp_snippets_database.h:81: std::unique_ptr<std::set<std::string>> alive_snippets); On 2016/10/06 10:56:10, tschumann wrote: > On ...
4 years, 2 months ago (2016-10-06 11:37:20 UTC) #10
tschumann
https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.h File components/ntp_snippets/remote/ntp_snippets_database.h (right): https://codereview.chromium.org/2386103009/diff/20001/components/ntp_snippets/remote/ntp_snippets_database.h#newcode81 components/ntp_snippets/remote/ntp_snippets_database.h:81: std::unique_ptr<std::set<std::string>> alive_snippets); On 2016/10/06 11:37:20, Marc Treib wrote: > ...
4 years, 2 months ago (2016-10-06 12:21:44 UTC) #11
Marc Treib
lgtm https://codereview.chromium.org/2386103009/diff/80001/components/ntp_snippets/remote/ntp_snippets_database.cc File components/ntp_snippets/remote/ntp_snippets_database.cc (right): https://codereview.chromium.org/2386103009/diff/80001/components/ntp_snippets/remote/ntp_snippets_database.cc#newcode301 components/ntp_snippets/remote/ntp_snippets_database.cc:301: nit: remove the extra empty line https://codereview.chromium.org/2386103009/diff/80001/components/ntp_snippets/remote/ntp_snippets_database.h File ...
4 years, 2 months ago (2016-10-06 12:47:35 UTC) #12
tschumann
https://codereview.chromium.org/2386103009/diff/80001/components/ntp_snippets/remote/ntp_snippets_database.h File components/ntp_snippets/remote/ntp_snippets_database.h (right): https://codereview.chromium.org/2386103009/diff/80001/components/ntp_snippets/remote/ntp_snippets_database.h#newcode81 components/ntp_snippets/remote/ntp_snippets_database.h:81: std::unique_ptr<std::set<std::string>> alive_snippets); On 2016/10/06 12:47:35, Marc Treib wrote: > ...
4 years, 2 months ago (2016-10-06 13:21:36 UTC) #13
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/2386103009/100001
4 years, 2 months ago (2016-10-06 13:40:36 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-06 14:44:08 UTC) #17
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 14:47:18 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684
Cr-Commit-Position: refs/heads/master@{#423529}

Powered by Google App Engine
This is Rietveld 408576698