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 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 private: | 158 private: |
159 base::hash_map<int64, DownloadItem*>::const_iterator iter_; | 159 base::hash_map<int64, DownloadItem*>::const_iterator iter_; |
160 // Allow copy and assign. | 160 // Allow copy and assign. |
161 }; | 161 }; |
162 | 162 |
163 void EnsureNoPendingDownloadJobsOnFile(bool* result) { | 163 void EnsureNoPendingDownloadJobsOnFile(bool* result) { |
164 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 164 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
165 *result = (DownloadFile::GetNumberOfDownloadFiles() == 0); | 165 *result = (DownloadFile::GetNumberOfDownloadFiles() == 0); |
166 BrowserThread::PostTask( | 166 BrowserThread::PostTask( |
167 BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure()); | 167 BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure()); |
168 } | 168 } |
169 | 169 |
170 class DownloadItemFactoryImpl : public DownloadItemFactory { | 170 class DownloadItemFactoryImpl : public DownloadItemFactory { |
171 public: | 171 public: |
172 DownloadItemFactoryImpl() {} | 172 DownloadItemFactoryImpl() {} |
173 virtual ~DownloadItemFactoryImpl() {} | 173 virtual ~DownloadItemFactoryImpl() {} |
174 | 174 |
175 virtual DownloadItemImpl* CreatePersistedItem( | 175 virtual DownloadItemImpl* CreatePersistedItem( |
176 DownloadItemImplDelegate* delegate, | 176 DownloadItemImplDelegate* delegate, |
177 DownloadId download_id, | 177 DownloadId download_id, |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 if (delegate_) | 655 if (delegate_) |
656 delegate_->OpenDownload(download); | 656 delegate_->OpenDownload(download); |
657 } | 657 } |
658 | 658 |
659 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { | 659 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { |
660 if (delegate_) | 660 if (delegate_) |
661 delegate_->ShowDownloadInShell(download); | 661 delegate_->ShowDownloadInShell(download); |
662 } | 662 } |
663 | 663 |
664 } // namespace content | 664 } // namespace content |
OLD | NEW |