Cache downloaded images for snippets on disk.
isn't that the same as issue 584429 ?
No, that is just about doing the download on the native side. (The initial description also mentioned caching, but it makes sense to separate those.)
Per investigation on bug 594122 : We'll use LevelDB, with the existing proto wrappers.
Status: Work in progress. This will take a while, there are yaks to be shaved related to image fetching. First step will be to create a LevelDB to store snippets *without* their thumbnails.
Status: Still WIP. I hope to get the first CL (LevelDB for snippets, but not thumbnails yet) out this week.
Status: First CL in review (not much progress this week).
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4db94acd2c51b5c67cc00175b5a0dad4f865eb03 commit 4db94acd2c51b5c67cc00175b5a0dad4f865eb03 Author: treib <treib@chromium.org> Date: Thu Jun 02 11:32:42 2016 [NTP Snippets] Persist snippets in a LevelDB instead of prefs BUG= 605870 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/1987333003 Cr-Commit-Position: refs/heads/master@{#397367} [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/chrome/browser/resources/snippets_internals.js [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/chrome/browser/ui/webui/snippets_internals_message_handler.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/chrome/browser/ui/webui/snippets_internals_message_handler.h [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/components_tests.gyp [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets.gypi [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/BUILD.gn [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/DEPS [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippet.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippet.h [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_constants.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_constants.h [add] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_database.cc [add] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_database.h [add] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_database_unittest.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_service.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_service.h [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/ntp_snippets_service_unittest.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/pref_names.cc [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/pref_names.h [add] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/proto/BUILD.gn [add] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/components/ntp_snippets/proto/ntp_snippets.proto [modify] https://crrev.com/4db94acd2c51b5c67cc00175b5a0dad4f865eb03/ios/chrome/browser/ntp_snippets/ios_chrome_ntp_snippets_service_factory.cc
First CL landed (LevelDB for snippets, but not images yet). Continuing...
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/65f9bbedd611ba2fb9b1156014518111de3abf77 commit 65f9bbedd611ba2fb9b1156014518111de3abf77 Author: treib <treib@chromium.org> Date: Fri Jun 03 08:13:38 2016 NTPSnippetsDatabase: support multiple concurrent loads (follow-up to https://codereview.chromium.org/1987333003) So far, there are no multiple loads (yet), but this removes a weird wrinkle from the API and doesn't really make anything any more complex. BUG= 605870 Review-Url: https://codereview.chromium.org/2033723002 Cr-Commit-Position: refs/heads/master@{#397662} [modify] https://crrev.com/65f9bbedd611ba2fb9b1156014518111de3abf77/components/ntp_snippets/ntp_snippets_database.cc [modify] https://crrev.com/65f9bbedd611ba2fb9b1156014518111de3abf77/components/ntp_snippets/ntp_snippets_database.h
Prototype of image caching done; waiting for image_fetcher changes.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4fe73e380cb4d0a822f0fd621350d416a8dbfd10 commit 4fe73e380cb4d0a822f0fd621350d416a8dbfd10 Author: treib <treib@chromium.org> Date: Thu Jun 16 15:36:15 2016 Implement ProtoDatabase::GetEntry Before this CL, ProtoDatabase only exposed a LoadEntries method that loads the whole database at once. This CL adds a GetEntry method that loads a single entry. BUG= 605870 Review-Url: https://codereview.chromium.org/2049573003 Cr-Commit-Position: refs/heads/master@{#400160} [modify] https://crrev.com/4fe73e380cb4d0a822f0fd621350d416a8dbfd10/components/leveldb_proto/leveldb_database.cc [modify] https://crrev.com/4fe73e380cb4d0a822f0fd621350d416a8dbfd10/components/leveldb_proto/leveldb_database.h [modify] https://crrev.com/4fe73e380cb4d0a822f0fd621350d416a8dbfd10/components/leveldb_proto/proto_database.h [modify] https://crrev.com/4fe73e380cb4d0a822f0fd621350d416a8dbfd10/components/leveldb_proto/proto_database_impl.h [modify] https://crrev.com/4fe73e380cb4d0a822f0fd621350d416a8dbfd10/components/leveldb_proto/proto_database_impl_unittest.cc [modify] https://crrev.com/4fe73e380cb4d0a822f0fd621350d416a8dbfd10/components/leveldb_proto/testing/fake_db.h
First part landed, second part in review and hopefully landing soon.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e195cf32ea015eb62340da83540ae5f90f6b74a4 commit e195cf32ea015eb62340da83540ae5f90f6b74a4 Author: treib <treib@chromium.org> Date: Fri Jun 17 16:11:43 2016 [NTP Snippets] Cache images in a LevelDB TBRing a trivial change to the iOS factory TBR=noyau BUG= 605870 Review-Url: https://codereview.chromium.org/2047713002 Cr-Commit-Position: refs/heads/master@{#400435} [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/chrome/browser/search/suggestions/image_fetcher_impl.cc [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/image_fetcher/image_fetcher_delegate.h [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/ntp_snippets/ntp_snippets_database.cc [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/ntp_snippets/ntp_snippets_database.h [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/ntp_snippets/ntp_snippets_database_unittest.cc [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/ntp_snippets/ntp_snippets_service.cc [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/ntp_snippets/ntp_snippets_service.h [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/ntp_snippets/ntp_snippets_service_unittest.cc [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/components/ntp_snippets/proto/ntp_snippets.proto [modify] https://crrev.com/e195cf32ea015eb62340da83540ae5f90f6b74a4/ios/chrome/browser/ntp_snippets/ios_chrome_ntp_snippets_service_factory.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/509a7f00acc736e6e528642ed1c982295ad69c25 commit 509a7f00acc736e6e528642ed1c982295ad69c25 Author: treib <treib@chromium.org> Date: Mon Jun 20 11:12:49 2016 [NTP Snippets] Extend NTPSnippetsDatabase tests for images Also clean up the existing tests a bit BUG= 605870 Review-Url: https://codereview.chromium.org/2079833002 Cr-Commit-Position: refs/heads/master@{#400651} [modify] https://crrev.com/509a7f00acc736e6e528642ed1c982295ad69c25/components/ntp_snippets/ntp_snippets_database_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2241c15a71cb24a92593a2c88629554c205678a6 commit 2241c15a71cb24a92593a2c88629554c205678a6 Author: treib <treib@chromium.org> Date: Tue Jun 21 09:19:24 2016 [NTP Snippets] Shut down the service on database failure BUG= 605870 Review-Url: https://codereview.chromium.org/2083533002 Cr-Commit-Position: refs/heads/master@{#400929} [modify] https://crrev.com/2241c15a71cb24a92593a2c88629554c205678a6/components/ntp_snippets/ntp_snippets_database.cc [modify] https://crrev.com/2241c15a71cb24a92593a2c88629554c205678a6/components/ntp_snippets/ntp_snippets_database.h [modify] https://crrev.com/2241c15a71cb24a92593a2c88629554c205678a6/components/ntp_snippets/ntp_snippets_service.cc [modify] https://crrev.com/2241c15a71cb24a92593a2c88629554c205678a6/components/ntp_snippets/ntp_snippets_service.h
Comment 1 by bauerb@chromium.org
, Apr 22 2016Blocking: -594122