InProgressCache stores some data for resumption, need to move them to DownloadDB
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7 commit 3c4cfe13d3174ff38458021fffebdd31cc1c7ab7 Author: Min Qin <qinmin@chromium.org> Date: Fri Aug 03 23:18:12 2018 Add methods to allow DownloadEntry from InProgressCache to get migrated to DownloadDB This CL adds methods to get all DownloadEntry from InProgressCache, convert them, and adding them back to the DownloadDB. This migration step allows us to move from InProgressCache to DownloadDB. BUG=870502 Change-Id: Id56346886b1cea2df6fa25954c89cdfb4db167d4 Reviewed-on: https://chromium-review.googlesource.com/1161487 Commit-Queue: Min Qin <qinmin@chromium.org> Reviewed-by: Xing Liu <xingliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#580695} [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/database/download_db_conversions.cc [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/database/download_db_conversions.h [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/database/in_progress/in_progress_cache.h [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/database/in_progress/in_progress_cache_impl.cc [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/database/in_progress/in_progress_cache_impl.h [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/internal/common/download_db_cache.cc [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/internal/common/download_db_cache.h [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/internal/common/download_db_cache_unittest.cc [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/internal/common/download_utils.cc [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/internal/common/in_progress_download_manager.cc [modify] https://crrev.com/3c4cfe13d3174ff38458021fffebdd31cc1c7ab7/components/download/public/common/download_utils.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/246ef154019d652d1e3929a749d3509a6867c52e commit 246ef154019d652d1e3929a749d3509a6867c52e Author: Min Qin <qinmin@chromium.org> Date: Tue Aug 07 21:32:44 2018 Download:: migrate in-progress cache metadata to level DB This CL migrates all in-progress cache metadata to level DB. The current implementation uses a file to store all in-progress data, which is not very scalable. This CL rewrites the current implemetation to use level DB. It also migrates the existing data from that file, and destroys it on success. UMAs are provided to track the migration and the DownloadDB. Bug: 870502 Change-Id: I7494b72e89ba68627f635666a62c9a29d211f46b Reviewed-on: https://chromium-review.googlesource.com/1163996 Reviewed-by: Xing Liu <xingliu@chromium.org> Reviewed-by: Steven Holte <holte@chromium.org> Commit-Queue: Min Qin <qinmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#581344} [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/chrome/browser/download/download_history.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/chrome/browser/download/download_history_unittest.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/BUILD.gn [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/download_db.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/download_db.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/download_db_impl.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/download_db_impl.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/in_progress/in_progress_cache.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/in_progress/in_progress_cache_impl.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/database/in_progress/in_progress_cache_impl.h [delete] https://crrev.com/1f53ca359237217e721c9a3bc74be92f30a87c37/components/download/database/switches.cc [delete] https://crrev.com/1f53ca359237217e721c9a3bc74be92f30a87c37/components/download/database/switches.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/internal/common/download_db_cache.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/internal/common/download_db_cache.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/internal/common/download_db_cache_unittest.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/internal/common/download_stats.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/internal/common/in_progress_download_manager.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/public/common/download_features.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/public/common/download_features.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/public/common/download_stats.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/components/download/public/common/in_progress_download_manager.h [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/content/browser/download/download_manager_impl.cc [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/tools/metrics/histograms/enums.xml [modify] https://crrev.com/246ef154019d652d1e3929a749d3509a6867c52e/tools/metrics/histograms/histograms.xml
Comment 1 by qin...@chromium.org
, Aug 2