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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 }; | 165 }; |
166 | 166 |
167 } // namespace | 167 } // namespace |
168 | 168 |
169 DownloadManagerImpl::DownloadManagerImpl( | 169 DownloadManagerImpl::DownloadManagerImpl( |
170 net::NetLog* net_log, | 170 net::NetLog* net_log, |
171 BrowserContext* browser_context) | 171 BrowserContext* browser_context) |
172 : item_factory_(new DownloadItemFactoryImpl()), | 172 : item_factory_(new DownloadItemFactoryImpl()), |
173 file_factory_(new DownloadFileFactory()), | 173 file_factory_(new DownloadFileFactory()), |
174 history_size_(0), | |
175 shutdown_needed_(true), | 174 shutdown_needed_(true), |
176 browser_context_(browser_context), | 175 browser_context_(browser_context), |
177 delegate_(NULL), | 176 delegate_(NULL), |
178 net_log_(net_log), | 177 net_log_(net_log), |
179 weak_factory_(this) { | 178 weak_factory_(this) { |
180 DCHECK(browser_context); | 179 DCHECK(browser_context); |
181 } | 180 } |
182 | 181 |
183 DownloadManagerImpl::~DownloadManagerImpl() { | 182 DownloadManagerImpl::~DownloadManagerImpl() { |
184 DCHECK(!shutdown_needed_); | 183 DCHECK(!shutdown_needed_); |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 if (delegate_) | 691 if (delegate_) |
693 delegate_->OpenDownload(download); | 692 delegate_->OpenDownload(download); |
694 } | 693 } |
695 | 694 |
696 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { | 695 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { |
697 if (delegate_) | 696 if (delegate_) |
698 delegate_->ShowDownloadInShell(download); | 697 delegate_->ShowDownloadInShell(download); |
699 } | 698 } |
700 | 699 |
701 } // namespace content | 700 } // namespace content |
OLD | NEW |