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

Issue 2593183002: [downloads] Remove DownloadManager::RemoveAllDownloads. (Closed)

Created:
4 years ago by asanka
Modified:
3 years, 11 months ago
CC:
asanka, asvitkine+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, extensions-reviews_chromium.org, grt+watch_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[downloads] Remove DownloadManager::RemoveAllDownloads. This API was only being used by tests and most call sites were using it incorrectly. Calling RemoveAllDownloads() immediately after creating a DownloadManager is guaranteed to do nothing. Any new or persisted downloads are added by some other entity asynchronously long after the the DownloadManager has been created. In Chrome a DownloadManager starts out empty until the downloads history DB is succuessfully queried. In addition, this API is quite likely to do the wrong thing. A real browser would need to pick and choose which downloads it wants to remove based on whether the downloads are currently in progress or not -- which is why Chrome was not using this API. As a side-effect of removing the API, we can also remove the Download.ClearAllSize UMA metric. BUG=none Review-Url: https://codereview.chromium.org/2593183002 Cr-Commit-Position: refs/heads/master@{#441769} Committed: https://chromium.googlesource.com/chromium/src/+/6381bd4e0fb31b67ece9742b54e0f1496b45d4d6

Patch Set 1 #

Patch Set 2 : Fix SavePageBrowsertest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -105 lines) Patch
M chrome/browser/download/download_browsertest.cc View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/download/save_page_browsertest.cc View 1 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/streams_private/streams_private_apitest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/download/download_browsertest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/download/download_manager_impl.h View 3 chunks +0 lines, -5 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 3 chunks +6 lines, -38 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 1 chunk +0 lines, -35 lines 0 comments Download
M content/browser/download/download_stats.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/download/download_stats.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M content/public/browser/download_manager.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/test/mock_download_manager.h View 1 chunk +0 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (17 generated)
asanka
asvitkine: /histograms/ clamy: /content/public/ dtrainor: /download/ Thanks!
4 years ago (2016-12-21 21:06:43 UTC) #5
clamy
Thanks! content/public lgtm.
4 years ago (2016-12-22 16:08:36 UTC) #8
David Trainor- moved to gerrit
*/download lgtm
3 years, 11 months ago (2017-01-03 19:46:50 UTC) #13
Alexei Svitkine (slow)
lgtm
3 years, 11 months ago (2017-01-05 19:08:47 UTC) #14
asanka
Thanks everyone!
3 years, 11 months ago (2017-01-05 20:39:54 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2593183002/20001
3 years, 11 months ago (2017-01-05 20:40:47 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/335784)
3 years, 11 months ago (2017-01-05 20:50:56 UTC) #20
asanka
+jialiul: Could you give an owners' review for chrome/browser/safe_browsing ? +rdevlin.cronin: Could you give an ...
3 years, 11 months ago (2017-01-05 21:07:49 UTC) #22
Jialiu Lin
lgtm
3 years, 11 months ago (2017-01-05 21:09:54 UTC) #23
Devlin
extensions lgtm
3 years, 11 months ago (2017-01-05 21:17:47 UTC) #24
asanka
Thanks!
3 years, 11 months ago (2017-01-05 21:49:38 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2593183002/20001
3 years, 11 months ago (2017-01-05 21:50:26 UTC) #27
commit-bot: I haz the power
3 years, 11 months ago (2017-01-05 22:09:12 UTC) #30
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/6381bd4e0fb31b67ece9742b54e0...

Powered by Google App Engine
This is Rietveld 408576698