Use leveldb proto. Design document: https://docs.google.com/document/d/1bewrjcoy1etBuASr2Bd5aMp5_g2ji21kXzmB1uohRFY/edit#heading=h.r92p156xw0rn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ca5a950a9da72f942db32e10751f459584998c22 commit ca5a950a9da72f942db32e10751f459584998c22 Author: shaktisahu <shaktisahu@chromium.org> Date: Wed May 31 02:28:35 2017 Download Service : Added leveldb proto layer Added DownloadStore which is a layer around a leveldb ProtoDatabase that stores download params, scheduling params, request headers and various metadata as protos. Callers of DownloadStore expect a list of Entry's, hence conversion utility methods were added to convert between Entry and protodb::Entry. Other details: 1- Moved NoopStore to download/internal/test/ 2- Replaced usage of OnceCallback with repeated Callback, since the proto database expects repeated Callback. In order to change ProtoDatabase to use OnceCallback, it probably requires a larger change invloving changing the client sites of ProtoDatabase. BUG= 722705 Review-Url: https://codereview.chromium.org/2881173003 Cr-Commit-Position: refs/heads/master@{#475750} [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/BUILD.gn [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/DEPS [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/download_store.cc [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/download_store.h [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/download_store_unittest.cc [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/model.h [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/model_impl.cc [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/model_impl.h [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/model_impl_unittest.cc [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/proto/BUILD.gn [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/proto/entry.proto [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/proto/request.proto [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/proto/scheduling.proto [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/proto_conversions.cc [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/proto_conversions.h [add] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/proto_conversions_unittest.cc [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/store.h [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/BUILD.gn [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/entry_utils.cc [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/entry_utils.h [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/mock_model_client.h [rename] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/noop_store.cc [rename] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/noop_store.h [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/test_store.cc [modify] https://crrev.com/ca5a950a9da72f942db32e10751f459584998c22/components/download/internal/test/test_store.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7f99e4119871345cfbdfb5553b218c7e5464ad42 commit 7f99e4119871345cfbdfb5553b218c7e5464ad42 Author: dtrainor <dtrainor@chromium.org> Date: Wed May 31 19:34:53 2017 Add initial Controller to DownloadService Add the basic structure for a Controller, which is responsible for gluing the Model and DownloadDriver in DownloadService. Initial support in this patch includes: - Successful initialization path of Model and DownloadDriver. - All possible paths for supporting StartDownload (minus actually sending the request to the DownloadDriver). BUG= 722705 Review-Url: https://codereview.chromium.org/2895953004 Cr-Commit-Position: refs/heads/master@{#475982} [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/chrome/browser/download/download_service_factory.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/BUILD.gn [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/client_set.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/client_set.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/client_set_unittest.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/config.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/config.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/controller.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/controller_impl.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/controller_impl.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/controller_impl_unittest.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/download_driver.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/download_service_impl.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/download_service_impl.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/download_service_impl_unittest.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/download_store.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/entry.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/entry.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/entry_utils.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/entry_utils.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/entry_utils_unittest.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/model.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/model_impl.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/model_impl.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/model_impl_unittest.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/startup_status.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/startup_status.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/stats.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/stats.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/BUILD.gn [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/empty_client.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/empty_client.h [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/mock_client.cc [add] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/mock_client.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/mock_model_client.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/test_download_driver.cc [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/internal/test/test_download_driver.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/public/clients.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/public/download_params.h [modify] https://crrev.com/7f99e4119871345cfbdfb5553b218c7e5464ad42/components/download/public/download_service.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/139fa8c20590336f9e5de24bc79be458fb9b5efb commit 139fa8c20590336f9e5de24bc79be458fb9b5efb Author: David Trainor <dtrainor@chromium.org> Date: Wed Jun 07 10:39:06 2017 Hook up DownloadServiceImpl to content Hook up the DownloadService factory method to build the proper internals (e.g. the proper content-specific components). As a part of this, the following changes are made: - Update components/download/content to content/factory and content/internal. - Migrate the DownloadService::Create implementation to components/download/content/factory. - Update DownloadServiceImpl unit tests now that it is more fleshed out. BUG= 722705 Change-Id: I408ecef822ec48d7bbbba0c36aa3f0a553b484be Reviewed-on: https://chromium-review.googlesource.com/520567 Commit-Queue: David Trainor <dtrainor@chromium.org> Reviewed-by: Tommy Nyquist <nyquist@chromium.org> Reviewed-by: Shakti Sahu <shaktisahu@chromium.org> Reviewed-by: Xing Liu <xingliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#477606} [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/chrome/browser/BUILD.gn [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/chrome/browser/download/download_service_factory.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/BUILD.gn [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/components_unittests.filter [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/BUILD.gn [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/DEPS [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/factory/BUILD.gn [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/factory/download_service_factory.cc [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/factory/download_service_factory.h [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/internal/BUILD.gn [rename] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/internal/download_driver_impl.cc [rename] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/internal/download_driver_impl.h [rename] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/content/internal/download_driver_impl_unittest.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/BUILD.gn [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/controller.h [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/controller_impl.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/controller_impl.h [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/controller_impl_unittest.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/download_service_impl.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/download_service_impl_unittest.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/entry_utils_unittest.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/model_impl_unittest.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/proto/BUILD.gn [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/test/BUILD.gn [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/test/download_params_utils.cc [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/test/download_params_utils.h [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/test/entry_utils.cc [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/test/entry_utils.h [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/test/mock_controller.cc [add] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/internal/test/mock_controller.h [modify] https://crrev.com/139fa8c20590336f9e5de24bc79be458fb9b5efb/components/download/public/download_service.h
Comment 1 by bugdroid1@chromium.org
, May 31 2017