| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/download/download_manager_impl.h" | 5 #include "content/browser/download/download_manager_impl.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 BrowserThread::PostTask( | 101 BrowserThread::PostTask( |
| 102 BrowserThread::UI, FROM_HERE, | 102 BrowserThread::UI, FROM_HERE, |
| 103 base::Bind(&DownloadManager::StartDownload, download_manager, | 103 base::Bind(&DownloadManager::StartDownload, download_manager, |
| 104 base::Passed(&failed_created_info), | 104 base::Passed(&failed_created_info), |
| 105 base::Passed(&empty_byte_stream), params->callback())); | 105 base::Passed(&empty_byte_stream), params->callback())); |
| 106 return nullptr; | 106 return nullptr; |
| 107 } | 107 } |
| 108 | 108 |
| 109 return std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>( | 109 return std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>( |
| 110 UrlDownloader::BeginDownload(download_manager, std::move(url_request), | 110 UrlDownloader::BeginDownload(download_manager, std::move(url_request), |
| 111 params->referrer()) | 111 params->referrer(), false) |
| 112 .release()); | 112 .release()); |
| 113 } | 113 } |
| 114 | 114 |
| 115 class DownloadItemFactoryImpl : public DownloadItemFactory { | 115 class DownloadItemFactoryImpl : public DownloadItemFactory { |
| 116 public: | 116 public: |
| 117 DownloadItemFactoryImpl() {} | 117 DownloadItemFactoryImpl() {} |
| 118 ~DownloadItemFactoryImpl() override {} | 118 ~DownloadItemFactoryImpl() override {} |
| 119 | 119 |
| 120 DownloadItemImpl* CreatePersistedItem( | 120 DownloadItemImpl* CreatePersistedItem( |
| 121 DownloadItemImplDelegate* delegate, | 121 DownloadItemImplDelegate* delegate, |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 if (delegate_) | 747 if (delegate_) |
| 748 delegate_->OpenDownload(download); | 748 delegate_->OpenDownload(download); |
| 749 } | 749 } |
| 750 | 750 |
| 751 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { | 751 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { |
| 752 if (delegate_) | 752 if (delegate_) |
| 753 delegate_->ShowDownloadInShell(download); | 753 delegate_->ShowDownloadInShell(download); |
| 754 } | 754 } |
| 755 | 755 |
| 756 } // namespace content | 756 } // namespace content |
| OLD | NEW |