New issue
Advanced search Search tips

Issue 842245 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Sign in to add a comment

Allow loading/storing in-progress download information without loading Chrome

Project Member Reported by qin...@chromium.org, May 11 2018

Issue description

For download to work without the remaining of Chrome, we need to load and store in-progress information without chrome running
 

Comment 1 by qin...@chromium.org, May 11 2018

Blocking: 803135
Project Member

Comment 2 by bugdroid1@chromium.org, May 24 2018

Project Member

Comment 3 by bugdroid1@chromium.org, May 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/826f29b4b11aaed28c34cacf62087d703515a4f3

commit 826f29b4b11aaed28c34cacf62087d703515a4f3
Author: Min Qin <qinmin@chromium.org>
Date: Sat May 26 06:36:19 2018

Add LevelDB implementation of DownloadDB

This CL:
1. adds the leveldb implementation of DownloadDB.
   New tests are also added to test the db functionality.
2. refactors the components/download/downloader dir.
   The in-progress files are moved to the sub in_progress dir.
   renames components/download/downloader to components/download/database

The BUILD.gn file is moved from original dir, adding holte@ as TBR
BUG=842245
TBR=holte@chromium.org, nyquist@chromium.org

Change-Id: I9db4ab257abe1f455b0a9d729e85b521ca664381
Reviewed-on: https://chromium-review.googlesource.com/1058527
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562117}
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/chrome/browser/BUILD.gn
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/chrome/browser/download/chrome_download_manager_delegate.cc
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/BUILD.gn
[add] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/BUILD.gn
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/DEPS
[add] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_conversions.cc
[add] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_conversions.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_conversions_unittest.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_entry.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_entry.h
[add] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_impl.cc
[add] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_impl.h
[add] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_db_impl_unittest.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_info.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_info.h
[add] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/download_namespace.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/download_entry.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/download_entry.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/in_progress_cache.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/in_progress_cache_impl.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/in_progress_cache_impl.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/in_progress_cache_impl_unittest.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/in_progress_info.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/in_progress_info.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/ukm_info.cc
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/in_progress/ukm_info.h
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/proto/BUILD.gn
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/proto/download_entry.proto
[rename] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/database/proto/download_source.proto
[delete] https://crrev.com/4f5f0e82de38a3678bd7c48784c754b6bfed7390/components/download/downloader/in_progress/BUILD.gn
[delete] https://crrev.com/4f5f0e82de38a3678bd7c48784c754b6bfed7390/components/download/downloader/in_progress/in_progress_conversions.h
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/internal/common/BUILD.gn
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/internal/common/download_item_impl_delegate.cc
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/public/common/BUILD.gn
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/components/download/public/common/download_utils.h
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/content/browser/BUILD.gn
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/content/browser/DEPS
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/826f29b4b11aaed28c34cacf62087d703515a4f3/content/browser/download/download_utils.cc

Comment 4 by qin...@chromium.org, May 27 2018

Blocking: 695115

Comment 5 by qin...@chromium.org, May 27 2018

Blocking: 846815

Comment 6 by qin...@chromium.org, May 29 2018

Blockedon: 847661
Project Member

Comment 7 by bugdroid1@chromium.org, May 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24ef62f22e25de08dac4ac70d059d70614466f91

commit 24ef62f22e25de08dac4ac70d059d70614466f91
Author: Min Qin <qinmin@chromium.org>
Date: Thu May 31 20:17:30 2018

Add DownloadDBCache to read from in-progress download db

This is behind a commandline flag.
DownloadDBCache is a equivalent to the InProgressCache download currently uses.
It will load all DownloadDBEntry upon browser start.
It listens to in-progress DownloadItem, and update the database when needed.
This CL also makes the DownloadHistory wait for the InProgressDownloadManager
before start loading all history items.
A separate CL will resolve the conflicts between Downloaditems from both
history and InProgressDownloadManager.

Bug: 842245
Change-Id: Ifb460a1f0fdd640615fdfbbcae8b6ce6872642a4
Reviewed-on: https://chromium-review.googlesource.com/1076681
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563363}
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/chrome/browser/download/download_history.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/chrome/browser/download/download_history.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/BUILD.gn
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_db_conversions.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_db_conversions_unittest.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_db_entry.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_db_entry.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_db_impl.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_db_impl_unittest.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_info.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_info.h
[add] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_namespace.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/download_namespace.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/in_progress/in_progress_info.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/in_progress/in_progress_info.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/proto/download_entry.proto
[add] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/switches.cc
[add] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/database/switches.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/internal/common/BUILD.gn
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/internal/common/DEPS
[add] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/internal/common/download_db_cache.cc
[add] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/internal/common/download_db_cache.h
[add] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/internal/common/download_db_cache_unittest.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/internal/common/download_utils.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/public/common/download_utils.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/components/download/public/common/in_progress_download_manager.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/content/public/browser/download_manager.h
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/content/public/test/mock_download_manager.cc
[modify] https://crrev.com/24ef62f22e25de08dac4ac70d059d70614466f91/content/public/test/mock_download_manager.h

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4593f160bd505075bffc5735ec6d87753fba3acb

commit 4593f160bd505075bffc5735ec6d87753fba3acb
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Fri Jun 01 02:24:43 2018

Revert "Add DownloadDBCache to read from in-progress download db"

This reverts commit 24ef62f22e25de08dac4ac70d059d70614466f91.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 563363 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzI0ZWY2MmYyMmUyNWRlMDhkYWM0YWM3MGQwNTlkNzA2MTQ0NjZmOTEM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.memory/Linux%20ChromiumOS%20MSan%20Tests/7388

Sample Failed Step: components_unittests

Original change's description:
> Add DownloadDBCache to read from in-progress download db
> 
> This is behind a commandline flag.
> DownloadDBCache is a equivalent to the InProgressCache download currently uses.
> It will load all DownloadDBEntry upon browser start.
> It listens to in-progress DownloadItem, and update the database when needed.
> This CL also makes the DownloadHistory wait for the InProgressDownloadManager
> before start loading all history items.
> A separate CL will resolve the conflicts between Downloaditems from both
> history and InProgressDownloadManager.
> 
> Bug: 842245
> Change-Id: Ifb460a1f0fdd640615fdfbbcae8b6ce6872642a4
> Reviewed-on: https://chromium-review.googlesource.com/1076681
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: David Trainor <dtrainor@chromium.org>
> Commit-Queue: Min Qin <qinmin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#563363}

Change-Id: Ia2055d48fae71f39a9d7348a94415e37d6f92d2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 842245
Reviewed-on: https://chromium-review.googlesource.com/1081971
Cr-Commit-Position: refs/heads/master@{#563494}
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/chrome/browser/download/download_history.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/chrome/browser/download/download_history.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/BUILD.gn
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_db_conversions.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_db_conversions_unittest.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_db_entry.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_db_entry.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_db_impl.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_db_impl_unittest.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_info.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_info.h
[delete] https://crrev.com/d38171d3670c98676c42f67291d3de1702c616dc/components/download/database/download_namespace.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/download_namespace.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/in_progress/in_progress_info.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/in_progress/in_progress_info.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/database/proto/download_entry.proto
[delete] https://crrev.com/d38171d3670c98676c42f67291d3de1702c616dc/components/download/database/switches.cc
[delete] https://crrev.com/d38171d3670c98676c42f67291d3de1702c616dc/components/download/database/switches.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/internal/common/BUILD.gn
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/internal/common/DEPS
[delete] https://crrev.com/d38171d3670c98676c42f67291d3de1702c616dc/components/download/internal/common/download_db_cache.cc
[delete] https://crrev.com/d38171d3670c98676c42f67291d3de1702c616dc/components/download/internal/common/download_db_cache.h
[delete] https://crrev.com/d38171d3670c98676c42f67291d3de1702c616dc/components/download/internal/common/download_db_cache_unittest.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/internal/common/download_utils.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/public/common/download_utils.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/components/download/public/common/in_progress_download_manager.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/content/public/browser/download_manager.h
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/content/public/test/mock_download_manager.cc
[modify] https://crrev.com/4593f160bd505075bffc5735ec6d87753fba3acb/content/public/test/mock_download_manager.h

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0

commit 5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0
Author: Min Qin <qinmin@chromium.org>
Date: Fri Jun 01 19:39:24 2018

Reland "Add DownloadDBCache to read from in-progress download db"

This is a reland of 24ef62f22e25de08dac4ac70d059d70614466f91

Original change's description:
> Add DownloadDBCache to read from in-progress download db
>
> This is behind a commandline flag.
> DownloadDBCache is a equivalent to the InProgressCache download currently uses.
> It will load all DownloadDBEntry upon browser start.
> It listens to in-progress DownloadItem, and update the database when needed.
> This CL also makes the DownloadHistory wait for the InProgressDownloadManager
> before start loading all history items.
> A separate CL will resolve the conflicts between Downloaditems from both
> history and InProgressDownloadManager.
>
> Bug: 842245
> Change-Id: Ifb460a1f0fdd640615fdfbbcae8b6ce6872642a4
> Reviewed-on: https://chromium-review.googlesource.com/1076681
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: David Trainor <dtrainor@chromium.org>
> Commit-Queue: Min Qin <qinmin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#563363}

nothing changed in content/, add jam@ as TBR
TBR=jam@chromium.org

Bug: 842245
Change-Id: I8b89dd23bd616503c8d0db32dcc66a4cb8d23238
Reviewed-on: https://chromium-review.googlesource.com/1082671
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563757}
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/chrome/browser/download/download_history.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/chrome/browser/download/download_history.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/BUILD.gn
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_db_conversions.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_db_conversions_unittest.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_db_entry.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_db_entry.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_db_impl.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_db_impl_unittest.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_info.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_info.h
[add] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_namespace.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/download_namespace.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/in_progress/in_progress_info.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/in_progress/in_progress_info.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/proto/download_entry.proto
[add] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/switches.cc
[add] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/database/switches.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/internal/common/BUILD.gn
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/internal/common/DEPS
[add] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/internal/common/download_db_cache.cc
[add] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/internal/common/download_db_cache.h
[add] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/internal/common/download_db_cache_unittest.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/internal/common/download_utils.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/public/common/download_utils.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/components/download/public/common/in_progress_download_manager.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/content/public/browser/download_manager.h
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/content/public/test/mock_download_manager.cc
[modify] https://crrev.com/5ca2c5ebf2e120833b88f78c50cd389cfa6bccd0/content/public/test/mock_download_manager.h

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d68521d0181774ec6e709e8e034c3f4442e7f85

commit 8d68521d0181774ec6e709e8e034c3f4442e7f85
Author: Min Qin <qinmin@chromium.org>
Date: Sun Jun 10 00:17:18 2018

import in-progress downloads into DownloadManagerImpl on start

This CL make InProgressDownloadManager to pass all downloads to
DownloadManagerImpl on start up.
So DownloadManagerImpl will use the DownloadItemImpl from
InProgressDownloadManager, without relying on history db.
On the other hand, if a download in ending state(cancelled, completed)
is already propagated into history DB, InProgress download info will
be removed.

Bug: 842245
Change-Id: If567aac1b71a254ea9c502021f5e78b7ebdb2b4c
Reviewed-on: https://chromium-review.googlesource.com/1091289
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565899}
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/internal/common/download_db_cache.cc
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/internal/common/download_db_cache.h
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/internal/common/download_db_cache_unittest.cc
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/internal/common/download_item_impl_delegate.cc
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/internal/common/download_item_impl_unittest.cc
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/public/common/download_item_impl.h
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/public/common/download_item_impl_delegate.h
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/components/download/public/common/in_progress_download_manager.h
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/8d68521d0181774ec6e709e8e034c3f4442e7f85/content/browser/download/download_manager_impl_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jun 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91ccd3d10d970881a51bb9cb1497967ea674fac2

commit 91ccd3d10d970881a51bb9cb1497967ea674fac2
Author: Min Qin <qinmin@chromium.org>
Date: Mon Jun 11 20:37:56 2018

Override DetermineDownloadTarget in InProgressDownloadmanager

When DownloadManagerImpl is not started, InProgressDownloadManager is
the delegate for DownloadItemImpl.
This CL provides a simple implementation of the DetermineDownloadTarget()
method, so download can resume without being cancelled.

BUG=842245

Change-Id: I418b4d271c897628152bdf119a0b1403d22d3444
Reviewed-on: https://chromium-review.googlesource.com/1093777
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566135}
[modify] https://crrev.com/91ccd3d10d970881a51bb9cb1497967ea674fac2/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/91ccd3d10d970881a51bb9cb1497967ea674fac2/components/download/public/common/in_progress_download_manager.h

Project Member

Comment 12 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec4f918d395a764bcbd49419e4ddfdb0811d7074

commit ec4f918d395a764bcbd49419e4ddfdb0811d7074
Author: Min Qin <qinmin@chromium.org>
Date: Wed Jun 20 05:17:23 2018

Allow InProgressDownloadManager to resume download

This CL allows InProgressDownloadManager to take a URLLoaderFactoryGetter,
and resume the download by itself.

BUG=842245

Change-Id: Ie2e6dff715455ee8449be05d49c43144de8d25c8
Reviewed-on: https://chromium-review.googlesource.com/1102885
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568729}
[modify] https://crrev.com/ec4f918d395a764bcbd49419e4ddfdb0811d7074/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/ec4f918d395a764bcbd49419e4ddfdb0811d7074/components/download/public/common/in_progress_download_manager.h

Project Member

Comment 13 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/26d1c8e85e2edf99c417b92f72b1022f42489ff3

commit 26d1c8e85e2edf99c417b92f72b1022f42489ff3
Author: Min Qin <qinmin@chromium.org>
Date: Wed Jun 20 05:19:39 2018

Adding a flag to allow Chrome to start with ServiceManager only

This CL adds a flag into BrowserParts to allow Chrome to start with
only the ServiceManager, without loading additional functionalities
such as profile.
This will allow features like download/sync to run without fully
instantiating Chrome, thus saving memory footprints.
Once ServiceManager is started, serviceManagerStartupComplete() will
get called. And Browser startup will be paused if the request is
to start ServiceManager only

BUG=842245

Change-Id: I436c4bde16db55af012b5d9cf468c073c86a86cc
Reviewed-on: https://chromium-review.googlesource.com/1093303
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568731}
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/chrome/android/java/src/org/chromium/chrome/browser/init/BrowserParts.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/chrome/android/junit/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTaskTest.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/app/android/content_main.cc
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/browser/android/browser_startup_controller.cc
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/browser/android/browser_startup_controller.h
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/public/android/java/src/org/chromium/content/app/ContentChildProcessServiceDelegate.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/public/android/java/src/org/chromium/content/app/ContentMain.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/public/android/java/src/org/chromium/content_public/browser/BrowserStartupController.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/public/android/javatests/src/org/chromium/content/browser/BrowserStartupControllerTest.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/shell/android/linker_test_apk/src/org/chromium/chromium_linker_test_apk/ChromiumLinkerTestActivity.java
[modify] https://crrev.com/26d1c8e85e2edf99c417b92f72b1022f42489ff3/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java

Project Member

Comment 14 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03a8c40f18c75dd716739d5e35dd24a9cfeda7fb

commit 03a8c40f18c75dd716739d5e35dd24a9cfeda7fb
Author: Min Qin <qinmin@chromium.org>
Date: Wed Jun 20 18:28:03 2018

Override ShouldOpenDownload() for InProgressDownloadManager

When download reaches 100%, this method is called to complete the download.
We need to return true for InProgressDownloadManager, as auto-open
doesn't apply when Chrome is not running fully

BUG=842245

Change-Id: I4891d1dca8c9af0aaa1b4f0da9ae3d862ddff5f0
Reviewed-on: https://chromium-review.googlesource.com/1107171
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568938}
[modify] https://crrev.com/03a8c40f18c75dd716739d5e35dd24a9cfeda7fb/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/03a8c40f18c75dd716739d5e35dd24a9cfeda7fb/components/download/public/common/in_progress_download_manager.h

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1c155906756474591bd694d706d6e90e91d6800

commit b1c155906756474591bd694d706d6e90e91d6800
Author: Min Qin <qinmin@chromium.org>
Date: Fri Jun 22 21:24:51 2018

Introduce DownloadStartObserver to listen to started downloads

If browser is running without DownloadManagerImpl, we need
InProgressDownloadManager to inform UI when a download is started.
This CL introduces DownloadStartObserver, and it can be passed from
chrome/ to components/.
When a download is started, InProgressDownloadManager can inform
the observer about the newly started DownloadItem.

BUG=842245

Change-Id: Ie02c0cd7a96d02fbbe689bb7a671ba51da45f6fb
Reviewed-on: https://chromium-review.googlesource.com/1109036
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569780}
[modify] https://crrev.com/b1c155906756474591bd694d706d6e90e91d6800/chrome/browser/android/download/download_controller.cc
[modify] https://crrev.com/b1c155906756474591bd694d706d6e90e91d6800/chrome/browser/android/download/download_controller_base.h
[modify] https://crrev.com/b1c155906756474591bd694d706d6e90e91d6800/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/b1c155906756474591bd694d706d6e90e91d6800/components/download/public/common/BUILD.gn
[add] https://crrev.com/b1c155906756474591bd694d706d6e90e91d6800/components/download/public/common/download_start_observer.h
[modify] https://crrev.com/b1c155906756474591bd694d706d6e90e91d6800/components/download/public/common/in_progress_download_manager.h

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/39c142371edfcfe8fc27fcb1333f1ca18f0ff747

commit 39c142371edfcfe8fc27fcb1333f1ca18f0ff747
Author: Min Qin <qinmin@chromium.org>
Date: Sat Jun 23 00:05:01 2018

All callbacks to notify when InProgressDownloadManager is initialized

Currently DownloadManagerImpl intializes InProgressDownloadManager.
However, when only ServiceManager is running, DownloadManagerImpl will
not be created.
As a result, some other class will initialize InProgressDownloadManager.
And when chrome fully starts, DownloadManagerImpl needs to know whether
InProgressManager has been initialized.
This CL allows InProgressDownloadManager to take more callbacks to
notify when initialized.
So multiple classes can observe the initialization event.

BUG=842245

Change-Id: I5881b10db0f93f98262ab1baebc67621c2743fbe
Reviewed-on: https://chromium-review.googlesource.com/1111027
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569849}
[modify] https://crrev.com/39c142371edfcfe8fc27fcb1333f1ca18f0ff747/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/39c142371edfcfe8fc27fcb1333f1ca18f0ff747/components/download/public/common/in_progress_download_manager.h
[modify] https://crrev.com/39c142371edfcfe8fc27fcb1333f1ca18f0ff747/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/39c142371edfcfe8fc27fcb1333f1ca18f0ff747/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/39c142371edfcfe8fc27fcb1333f1ca18f0ff747/content/browser/download/download_manager_impl_unittest.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Jun 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c7496eca4802ae48773ccbbd793c63d67b87740a

commit c7496eca4802ae48773ccbbd793c63d67b87740a
Author: Nico Weber <thakis@chromium.org>
Date: Sat Jun 23 20:37:51 2018

Revert "All callbacks to notify when InProgressDownloadManager is initialized"

This reverts commit 39c142371edfcfe8fc27fcb1333f1ca18f0ff747.

Reason for revert:
Broke many tests on many bots, eg. https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Win10%20Tests%20x64%20%28dbg%29/1473

Original change's description:
> All callbacks to notify when InProgressDownloadManager is initialized
> 
> Currently DownloadManagerImpl intializes InProgressDownloadManager.
> However, when only ServiceManager is running, DownloadManagerImpl will
> not be created.
> As a result, some other class will initialize InProgressDownloadManager.
> And when chrome fully starts, DownloadManagerImpl needs to know whether
> InProgressManager has been initialized.
> This CL allows InProgressDownloadManager to take more callbacks to
> notify when initialized.
> So multiple classes can observe the initialization event.
> 
> BUG=842245
> 
> Change-Id: I5881b10db0f93f98262ab1baebc67621c2743fbe
> Reviewed-on: https://chromium-review.googlesource.com/1111027
> Commit-Queue: Min Qin <qinmin@chromium.org>
> Reviewed-by: David Trainor <dtrainor@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#569849}

TBR=dtrainor@chromium.org,qinmin@chromium.org

Change-Id: Ic2e8b09dc8aca3680c7a5939fdfb545e0dfec82a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 842245
Reviewed-on: https://chromium-review.googlesource.com/1112977
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569879}
[modify] https://crrev.com/c7496eca4802ae48773ccbbd793c63d67b87740a/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/c7496eca4802ae48773ccbbd793c63d67b87740a/components/download/public/common/in_progress_download_manager.h
[modify] https://crrev.com/c7496eca4802ae48773ccbbd793c63d67b87740a/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/c7496eca4802ae48773ccbbd793c63d67b87740a/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/c7496eca4802ae48773ccbbd793c63d67b87740a/content/browser/download/download_manager_impl_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Jun 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f509280e1c74a2a5a680753ce6b343d935364c71

commit f509280e1c74a2a5a680753ce6b343d935364c71
Author: Min Qin <qinmin@chromium.org>
Date: Mon Jun 25 19:50:41 2018

Reland "All callbacks to notify when InProgressDownloadManager is initialized"

This reverts commit c7496eca4802ae48773ccbbd793c63d67b87740a.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "All callbacks to notify when InProgressDownloadManager is initialized"
> 
> This reverts commit 39c142371edfcfe8fc27fcb1333f1ca18f0ff747.
> 
> Reason for revert:
> Broke many tests on many bots, eg. https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Win10%20Tests%20x64%20%28dbg%29/1473
> 
> Original change's description:
> > All callbacks to notify when InProgressDownloadManager is initialized
> > 
> > Currently DownloadManagerImpl intializes InProgressDownloadManager.
> > However, when only ServiceManager is running, DownloadManagerImpl will
> > not be created.
> > As a result, some other class will initialize InProgressDownloadManager.
> > And when chrome fully starts, DownloadManagerImpl needs to know whether
> > InProgressManager has been initialized.
> > This CL allows InProgressDownloadManager to take more callbacks to
> > notify when initialized.
> > So multiple classes can observe the initialization event.
> > 
> > BUG=842245
> > 
> > Change-Id: I5881b10db0f93f98262ab1baebc67621c2743fbe
> > Reviewed-on: https://chromium-review.googlesource.com/1111027
> > Commit-Queue: Min Qin <qinmin@chromium.org>
> > Reviewed-by: David Trainor <dtrainor@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#569849}
> 
> TBR=dtrainor@chromium.org,qinmin@chromium.org
> 
> Change-Id: Ic2e8b09dc8aca3680c7a5939fdfb545e0dfec82a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 842245
> Reviewed-on: https://chromium-review.googlesource.com/1112977
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#569879}

TBR=thakis@chromium.org,dtrainor@chromium.org,qinmin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 842245
Change-Id: I9a2d1e2215f755785190400e554408f3bf2e7de5
Reviewed-on: https://chromium-review.googlesource.com/1113839
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570140}
[modify] https://crrev.com/f509280e1c74a2a5a680753ce6b343d935364c71/components/download/internal/common/in_progress_download_manager.cc
[modify] https://crrev.com/f509280e1c74a2a5a680753ce6b343d935364c71/components/download/public/common/in_progress_download_manager.h
[modify] https://crrev.com/f509280e1c74a2a5a680753ce6b343d935364c71/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/f509280e1c74a2a5a680753ce6b343d935364c71/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/f509280e1c74a2a5a680753ce6b343d935364c71/content/browser/download/download_manager_impl_unittest.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Jun 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1fc649b601a08b37baaf3b557d2ec14d3b1445f1

commit 1fc649b601a08b37baaf3b557d2ec14d3b1445f1
Author: Min Qin <qinmin@chromium.org>
Date: Thu Jun 28 19:45:50 2018

lazily create DownloadInfobarController

DownloadInfobarController depends on profile, which may not be available on
startup.
Lazily create this when needed.

BUG=842245

Change-Id: Ieecc314dc6e3cf7d12b8209fa38f4c34385f5204
Reviewed-on: https://chromium-review.googlesource.com/1115347
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571230}
[modify] https://crrev.com/1fc649b601a08b37baaf3b557d2ec14d3b1445f1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java

Project Member

Comment 20 by bugdroid1@chromium.org, Jun 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7164dfb051b7a1e83a748ed5cdffd449bb234470

commit 7164dfb051b7a1e83a748ed5cdffd449bb234470
Author: Min Qin <qinmin@chromium.org>
Date: Fri Jun 29 20:07:41 2018

Add DownloadDBCache as an observer to newly created in-progress download

The newly created in-progress download can get removed by user.
In this case, DownloadItem::OnDownloadUpdated() is never called, and
DownloadDBCache will never be informed of the removal.
This causes DownloadDBCache to store the download info forever.
This CL fixes that behavior by allowing DownloadDBCache to listen
to all the events once the DownloadItem is created.

BUG=842245

Change-Id: I560071a32ec376ae2c6ebe8f72f62a9527bb3362
Reviewed-on: https://chromium-review.googlesource.com/1119504
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571602}
[modify] https://crrev.com/7164dfb051b7a1e83a748ed5cdffd449bb234470/components/download/internal/common/download_db_cache.cc
[modify] https://crrev.com/7164dfb051b7a1e83a748ed5cdffd449bb234470/components/download/internal/common/in_progress_download_manager.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f4590fbcd093718810552449f4bbc1ea094d38a9

commit f4590fbcd093718810552449f4bbc1ea094d38a9
Author: Min Qin <qinmin@chromium.org>
Date: Mon Jul 09 20:35:39 2018

Remove a DCHECK that is no longer accurate

When Creating a download item from history db, the item might have already
imported from the in-progress db.
So this DCHECK is no longer correct

BUG=842245

Change-Id: Iff0c7f77f33bd910ba42602a526c914d0e12bcd7
Reviewed-on: https://chromium-review.googlesource.com/1129366
Reviewed-by: Xing Liu <xingliu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573433}
[modify] https://crrev.com/f4590fbcd093718810552449f4bbc1ea094d38a9/content/browser/download/download_manager_impl.cc

Project Member

Comment 22 by bugdroid1@chromium.org, Jul 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fd320644d68f7fd9c22220791b42e7820c1f6044

commit fd320644d68f7fd9c22220791b42e7820c1f6044
Author: Min Qin <qinmin@chromium.org>
Date: Tue Jul 10 19:32:06 2018

Remove 2 BrowserThread::UI DCHECK

If download resumes when only service manager is running,
download controller could be called when there is no BrowserThread.
The BrowserThread will only be introduced when full browser is started.
Remove these 2 DCHECks as they will no longer be accurate.

BUG=842245

Change-Id: I8ae4819852465fa2a88240fddedf3c0b6dc0d8fb
Reviewed-on: https://chromium-review.googlesource.com/1129627
Reviewed-by: Xing Liu <xingliu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573856}
[modify] https://crrev.com/fd320644d68f7fd9c22220791b42e7820c1f6044/chrome/browser/android/download/download_controller.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Jul 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/871b0dbb66c85679e88df8f62fd4ec0e3f471594

commit 871b0dbb66c85679e88df8f62fd4ec0e3f471594
Author: Min Qin <qinmin@chromium.org>
Date: Wed Jul 11 23:30:24 2018

Don't remove ref-count on download IO TaskRunner

There is no need to remove the IO TaskRunner reference.
The global io thread task_runner is never deleted.
If io TaskRunner is set, just ignore future calls.

BUG=842245

Change-Id: Ifefad6442d8efde238379218e9f11a9f3d99a75a
Reviewed-on: https://chromium-review.googlesource.com/1134197
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574402}
[modify] https://crrev.com/871b0dbb66c85679e88df8f62fd4ec0e3f471594/components/download/internal/common/download_task_runner.cc
[modify] https://crrev.com/871b0dbb66c85679e88df8f62fd4ec0e3f471594/content/browser/download/download_manager_impl.cc

Project Member

Comment 24 by bugdroid1@chromium.org, Jul 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67332adc6ff38009e3d0ae6d01d2c883c9b41982

commit 67332adc6ff38009e3d0ae6d01d2c883c9b41982
Author: Min Qin <qinmin@chromium.org>
Date: Wed Jul 25 18:31:05 2018

Solve an issue that OnDownloadCreated may not be called in LoadHistoryDownloads

When in-progress DB is enabled, DownloadHistory will wait for in-progress
DB to load first before loading its own downloads.
If a download item exists in both DB, then onDownloadCreated() will be called
before DownloadHistory load the same item.
As a result, when LoadHistoryDownloads() is called, the OnDownloadCreated()
reentrance call will not happen for that download.
This causes the DownloadHistoryData::PERSISTED to not get set.
And later on when the download is deleted, it will be skipped by DownloadHistory, thus showing inconsistent result.

This CL fixes the problem by explicitly adding the
DownloadHistoryData::PERSISTED after each item is loaded in
LoadHistoryDownload() call.

BUG=842245

Change-Id: Id15762e46992644e11d6c9bfd46ead39bb64b13b
Reviewed-on: https://chromium-review.googlesource.com/1145865
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577984}
[modify] https://crrev.com/67332adc6ff38009e3d0ae6d01d2c883c9b41982/chrome/browser/download/download_history.cc
[modify] https://crrev.com/67332adc6ff38009e3d0ae6d01d2c883c9b41982/chrome/browser/download/download_history.h

Project Member

Comment 25 by bugdroid1@chromium.org, Jul 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dc24395b02bf829072f79e1112d74bb38832e6f2

commit dc24395b02bf829072f79e1112d74bb38832e6f2
Author: Min Qin <qinmin@chromium.org>
Date: Wed Jul 25 18:46:08 2018

Retry initializing download db on failure

also fixes an issue that DownloadDBImpl could be null for incognito downloads

BUG=842245

Change-Id: I1688b6ad15c400a27d6877b60f149c7eee181794
Reviewed-on: https://chromium-review.googlesource.com/1147604
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577992}
[modify] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/database/BUILD.gn
[add] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/database/download_db.cc
[modify] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/database/download_db.h
[modify] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/database/download_db_impl.cc
[modify] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/database/download_db_impl.h
[modify] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/database/download_db_impl_unittest.cc
[modify] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/internal/common/download_db_cache.cc
[modify] https://crrev.com/dc24395b02bf829072f79e1112d74bb38832e6f2/components/download/internal/common/in_progress_download_manager.cc

Blockedon: 868290
Project Member

Comment 27 by bugdroid1@chromium.org, Jul 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a04f4d0a29b0966cd209be8d182b6e8167cd1462

commit a04f4d0a29b0966cd209be8d182b6e8167cd1462
Author: Xing Liu <xingliu@chromium.org>
Date: Fri Jul 27 18:51:47 2018

Download: Adds headers in download_db.h.

This CL adds some includes in download_db.h.

TBR=drtrainor@chromium.org,qinmin@chromium.org

Bug: 842245
Change-Id: I34fcfcf24e933d0be14f76705a65108c975e47e0
Reviewed-on: https://chromium-review.googlesource.com/1153402
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578729}
[modify] https://crrev.com/a04f4d0a29b0966cd209be8d182b6e8167cd1462/components/download/database/download_db.h

Project Member

Comment 28 by bugdroid1@chromium.org, Jul 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/447182f77092cd0fd6e3c418155bc70324577cee

commit 447182f77092cd0fd6e3c418155bc70324577cee
Author: Min Qin <qinmin@chromium.org>
Date: Mon Jul 30 18:43:18 2018

Make DownloadManagerImpl to generate download IDs for in-progress DB

Chrome assigns a download Id to each new download.
This ID was retrieved from the history DB on start up, and then
keep on incrementing.
For in-progress DB work, download will only be stored to history DB
once they finish.
As a result, the history DB don't have all the Ids on startup.
This CL lets the DownloadManagerImpl to get all Ids from both
history DB and In-progress downloads.
And use the largest Id to issueing out new Ids for new downloads.
This allows in-progress downloads to have their own IDs without
reporting them to history DB.

BUG=842245

Change-Id: Ia5130f02b0e32e09ba4395a6bfa10dfd5adafc82
Reviewed-on: https://chromium-review.googlesource.com/1144311
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579101}
[modify] https://crrev.com/447182f77092cd0fd6e3c418155bc70324577cee/components/download/database/in_progress/in_progress_cache_impl.cc
[modify] https://crrev.com/447182f77092cd0fd6e3c418155bc70324577cee/content/browser/download/download_manager_impl.cc
[modify] https://crrev.com/447182f77092cd0fd6e3c418155bc70324577cee/content/browser/download/download_manager_impl.h
[modify] https://crrev.com/447182f77092cd0fd6e3c418155bc70324577cee/content/browser/download/download_manager_impl_unittest.cc

Project Member

Comment 29 by bugdroid1@chromium.org, Aug 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7289cfc68d607f389159e4f8ddd657b6364ca545

commit 7289cfc68d607f389159e4f8ddd657b6364ca545
Author: Min Qin <qinmin@chromium.org>
Date: Wed Aug 01 23:05:29 2018

Don't add incomplete download to history

When Download DB is enabled, there is no need to add an incomplete download
to history.
The only case we need to add it is when extension is used, or it is a save page
download.

Bug: 842245
Change-Id: I1a1ba64510a73c2ce70a6fd50709e238da6129cf
Reviewed-on: https://chromium-review.googlesource.com/1155795
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579982}
[modify] https://crrev.com/7289cfc68d607f389159e4f8ddd657b6364ca545/chrome/browser/download/download_history.cc
[modify] https://crrev.com/7289cfc68d607f389159e4f8ddd657b6364ca545/chrome/browser/download/download_history.h
[modify] https://crrev.com/7289cfc68d607f389159e4f8ddd657b6364ca545/chrome/browser/download/download_history_unittest.cc

Blockedon: 870502
Project Member

Comment 31 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b2279cd081d9bf6aff6aae5f9881930c4559d68c

commit b2279cd081d9bf6aff6aae5f9881930c4559d68c
Author: Min Qin <qinmin@chromium.org>
Date: Thu Oct 04 22:54:41 2018

don't nofity tracker if browser hasn't been started

If browser is not started, we don't have a profile to get the tracker
The Download completed message is used by in-product help/

BUG=842245

Change-Id: I2716dbc659e7e192198070ccd9e3d700a89f2810
Reviewed-on: https://chromium-review.googlesource.com/c/1263275
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596897}
[modify] https://crrev.com/b2279cd081d9bf6aff6aae5f9881930c4559d68c/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java

Project Member

Comment 32 by bugdroid1@chromium.org, Oct 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/400072b80dbd8bbf71bd6572b7f5ff971b06daed

commit 400072b80dbd8bbf71bd6572b7f5ff971b06daed
Author: Min Qin <qinmin@chromium.org>
Date: Fri Oct 05 20:35:22 2018

Creating URLLoaderFactoryGetter for InProgressDownloadManager when running service manager mode

This CL allows us to create the network service when service manager
is running, and sets the URLLOaderFactoryGetter for InProgressManager.
This should allow download to resume without browser process.

BUG=842245

Change-Id: Id985b5d6adc4144f4b51588ba4659f57cf607e31
Reviewed-on: https://chromium-review.googlesource.com/c/1264523
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597278}
[modify] https://crrev.com/400072b80dbd8bbf71bd6572b7f5ff971b06daed/chrome/browser/android/download/download_manager_service.cc
[modify] https://crrev.com/400072b80dbd8bbf71bd6572b7f5ff971b06daed/chrome/browser/android/download/download_manager_service.h

Project Member

Comment 33 by bugdroid1@chromium.org, Oct 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/caed5db1d3726df8ac8385fbbab9d85b9c06737b

commit caed5db1d3726df8ac8385fbbab9d85b9c06737b
Author: Min Qin <qinmin@chromium.org>
Date: Wed Oct 10 19:08:27 2018

Allow download actions to be carried out after pending downloads are loaded

Currently chrome always waits until history is loaded.
This CL changes the behavior to wait until pending downloads are loaded.
It will allow download to resume without full browser process.

BUG=842245

Change-Id: If38358ef4643cb49eb966444e17ebfde785860ff
Reviewed-on: https://chromium-review.googlesource.com/c/1265907
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598433}
[modify] https://crrev.com/caed5db1d3726df8ac8385fbbab9d85b9c06737b/chrome/browser/android/download/download_manager_service.cc
[modify] https://crrev.com/caed5db1d3726df8ac8385fbbab9d85b9c06737b/chrome/browser/android/download/download_manager_service.h

Blockedon: 894167
Project Member

Comment 35 by bugdroid1@chromium.org, Oct 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/510b78feca3e1c553afde103d2b4e8aff426239d

commit 510b78feca3e1c553afde103d2b4e8aff426239d
Author: Min Qin <qinmin@chromium.org>
Date: Thu Oct 11 21:23:37 2018

Don't initialize OfflineContentAggregatorNotificationBridgeUiFactory on all download actions

Seems only DOWNLOAD_OPEN needs this, we will skip launch browser process for
other actions.

BUG=842245

Change-Id: I3570c80b3a9b33e53f557ead826ac4e5bd6a5fb2
Reviewed-on: https://chromium-review.googlesource.com/c/1262719
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598946}
[modify] https://crrev.com/510b78feca3e1c553afde103d2b4e8aff426239d/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java
[modify] https://crrev.com/510b78feca3e1c553afde103d2b4e8aff426239d/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java

Project Member

Comment 36 by bugdroid1@chromium.org, Oct 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618

commit 0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618
Author: Min Qin <qinmin@chromium.org>
Date: Tue Oct 16 22:11:52 2018

Adding a helper class for launching download service with finch

Since feature list are not loaded before native library, this CL introduces
a helper class to write the feature values to SharedPreferences, and loads
them when needed. It allows download and other features to launch finch
trials to start ServiceManager on startup.

BUG=842245

Change-Id: I8dcc8a97ae16152e1bf33bbe7f7d7349cdffa0b4
Reviewed-on: https://chromium-review.googlesource.com/c/1271587
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600150}
[modify] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
[modify] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java
[modify] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
[modify] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java
[add] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/android/java/src/org/chromium/chrome/browser/init/ServiceManagerStartupUtils.java
[modify] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/android/java_sources.gni
[modify] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/browser/android/chrome_feature_list.cc
[modify] https://crrev.com/0dbf7abc9f925eadd6c5c18f977a1e8b0af2d618/chrome/browser/android/chrome_feature_list.h

Project Member

Comment 37 by bugdroid1@chromium.org, Oct 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fca04e80c2b08073d2b9b9560c08df6ae4608d0e

commit fca04e80c2b08073d2b9b9560c08df6ae4608d0e
Author: Min Qin <qinmin@chromium.org>
Date: Mon Oct 22 23:31:31 2018

only populate DownloadHistoryData for inprogress download

When download history is not fully loaded, onDownloadCreated() can get
called by downloads already created by the DownloadManager.
And DownloadHistory will call set_info() to attach DownloadRow
to the download item regardless of its state.
However, this is not needed for non in-progress download. For non in-progress
downloads, if set_info() is called, a later DownloadHistory::OnDownloadUpdated()
call could still result in clear_info() gets called before
DownloadHistory::ItemAdded(). So the assumption in the comments may not
hold.
This CL also removes the call to OnDownloadUpdated() in ItemAdded().
OnDownloadUpdated() can be called any time before ItemAdded(), and it
will queue a sql update to the history db. So there is no need
to call OnDownloadUpdated after ItemAdded().
This CL also exposes and fixes a bug in DownloadHistoryTest

BUG=842245

Change-Id: I8d6da374671fa0e56d0c2eb57577ce5726812b3e
Reviewed-on: https://chromium-review.googlesource.com/c/1294072
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601778}
[modify] https://crrev.com/fca04e80c2b08073d2b9b9560c08df6ae4608d0e/chrome/browser/download/download_history.cc
[modify] https://crrev.com/fca04e80c2b08073d2b9b9560c08df6ae4608d0e/chrome/browser/download/download_history_unittest.cc

Project Member

Comment 38 by bugdroid1@chromium.org, Oct 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9f9636009daf7290516218ae990918b763364140

commit 9f9636009daf7290516218ae990918b763364140
Author: Min Qin <qinmin@chromium.org>
Date: Tue Oct 23 21:15:11 2018

Create InProgressDownloadManager when DownloadManagerService is created without full browser

When full browser is not launched, we should create InProgressDownloadManager
to handle all the operations.

BUG=842245

Change-Id: I2687000288c9459c8df8099ff4721a2b6755d96e
Reviewed-on: https://chromium-review.googlesource.com/c/1297237
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602097}
[modify] https://crrev.com/9f9636009daf7290516218ae990918b763364140/chrome/browser/android/download/download_manager_service.cc
[modify] https://crrev.com/9f9636009daf7290516218ae990918b763364140/chrome/browser/android/download/download_manager_service.h

Project Member

Comment 39 by bugdroid1@chromium.org, Oct 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9f9636009daf7290516218ae990918b763364140

commit 9f9636009daf7290516218ae990918b763364140
Author: Min Qin <qinmin@chromium.org>
Date: Tue Oct 23 21:15:11 2018

Create InProgressDownloadManager when DownloadManagerService is created without full browser

When full browser is not launched, we should create InProgressDownloadManager
to handle all the operations.

BUG=842245

Change-Id: I2687000288c9459c8df8099ff4721a2b6755d96e
Reviewed-on: https://chromium-review.googlesource.com/c/1297237
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602097}
[modify] https://crrev.com/9f9636009daf7290516218ae990918b763364140/chrome/browser/android/download/download_manager_service.cc
[modify] https://crrev.com/9f9636009daf7290516218ae990918b763364140/chrome/browser/android/download/download_manager_service.h

Sign in to add a comment