|
BrowserContext should simply own DownloadManager
This patch changes BrowserContext so it store a DownloadManager
directly (as UserData), instead of storing a refptr to it.
Client code (mostly tests) that used refptrs were changed to use
either raw pointers (when they are only referencing) or to use
scoped_ptr/ScopedVector in case of DownloadManagers created by them.
In cases where DownloadManager was used with Bind() to create a
callback, care was taken to make sure that we didn't get invalid
callbacks -- we were protected from this before because
DownloadManager was refcounted.
The Bind() in DownloadManagerImpl::CheckForFileRemoval() is using
a weak pointer to itself. The Bind() calls in
DownloadTestObserver were changed to go first thru the object
itself and then check whether the DownloadManager was still
valid.
Removed DownloadManager parameter from
PluginInstaller::DownloadStarted() since it was not used
anymore.
BUG= 237871
TEST=content_unittests and browser_tests filtered with Download\*
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+101 lines, -126 lines) |
Patch |
|
M |
chrome/browser/download/all_download_item_notifier_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/download/chrome_download_manager_delegate.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/download/chrome_download_manager_delegate_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/download/download_browsertest.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/download/download_history_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/download/download_shelf_unittest.cc
|
View
|
|
3 chunks |
+3 lines, -3 lines |
2 comments
|
Download
|
|
M |
chrome/browser/download/download_status_updater_unittest.cc
|
View
|
|
7 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
chrome/browser/download/download_ui_controller_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/download/test_download_shelf.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/download/test_download_shelf.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
2 comments
|
Download
|
|
M |
chrome/browser/plugins/plugin_installer.h
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/plugins/plugin_installer.cc
|
View
|
|
2 chunks |
+1 line, -5 lines |
0 comments
|
Download
|
|
M |
content/browser/browser_context.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/browser/download/download_id_unittest.cc
|
View
|
|
3 chunks |
+8 lines, -22 lines |
0 comments
|
Download
|
|
M |
content/browser/download/download_manager_impl.h
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/browser/download/download_manager_impl.cc
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
|
content/browser/download/download_manager_impl_unittest.cc
|
View
|
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
content/public/browser/download_manager.h
|
View
|
|
2 chunks |
+3 lines, -8 lines |
0 comments
|
Download
|
|
M |
content/public/test/download_test_observer.h
|
View
|
|
4 chunks |
+11 lines, -6 lines |
2 comments
|
Download
|
|
M |
content/public/test/download_test_observer.cc
|
View
|
|
6 chunks |
+33 lines, -34 lines |
2 comments
|
Download
|
|
M |
content/public/test/mock_download_manager.h
|
View
|
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
content/public/test/test_file_error_injector.h
|
View
|
|
3 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/public/test/test_file_error_injector.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
Total messages: 6 (0 generated)
|