|
[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
|
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
|
Total messages: 30 (17 generated)
|