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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 | 180 |
181 DownloadManagerImpl::~DownloadManagerImpl() { | 181 DownloadManagerImpl::~DownloadManagerImpl() { |
182 DCHECK(!shutdown_needed_); | 182 DCHECK(!shutdown_needed_); |
183 } | 183 } |
184 | 184 |
185 DownloadId DownloadManagerImpl::GetNextId() { | 185 DownloadId DownloadManagerImpl::GetNextId() { |
186 return delegate_->GetNextId(); | 186 return delegate_->GetNextId(); |
187 } | 187 } |
188 | 188 |
| 189 bool DownloadManagerImpl::ShouldOpenWithWebIntent(DownloadItem* item) { |
| 190 return delegate_->ShouldOpenWithWebIntent(item); |
| 191 } |
| 192 |
189 bool DownloadManagerImpl::ShouldOpenDownload(DownloadItem* item) { | 193 bool DownloadManagerImpl::ShouldOpenDownload(DownloadItem* item) { |
190 return delegate_->ShouldOpenDownload(item); | 194 return delegate_->ShouldOpenDownload(item); |
191 } | 195 } |
192 | 196 |
193 bool DownloadManagerImpl::ShouldOpenFileBasedOnExtension(const FilePath& path) { | 197 bool DownloadManagerImpl::ShouldOpenFileBasedOnExtension(const FilePath& path) { |
194 return delegate_->ShouldOpenFileBasedOnExtension(path); | 198 return delegate_->ShouldOpenFileBasedOnExtension(path); |
195 } | 199 } |
196 | 200 |
197 void DownloadManagerImpl::Shutdown() { | 201 void DownloadManagerImpl::Shutdown() { |
198 VLOG(20) << __FUNCTION__ << "()" | 202 VLOG(20) << __FUNCTION__ << "()" |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 if (it->second->IsComplete() && !it->second->GetOpened()) | 1210 if (it->second->IsComplete() && !it->second->GetOpened()) |
1207 ++num_unopened; | 1211 ++num_unopened; |
1208 } | 1212 } |
1209 download_stats::RecordOpensOutstanding(num_unopened); | 1213 download_stats::RecordOpensOutstanding(num_unopened); |
1210 } | 1214 } |
1211 | 1215 |
1212 void DownloadManagerImpl::SetFileManagerForTesting( | 1216 void DownloadManagerImpl::SetFileManagerForTesting( |
1213 DownloadFileManager* file_manager) { | 1217 DownloadFileManager* file_manager) { |
1214 file_manager_ = file_manager; | 1218 file_manager_ = file_manager; |
1215 } | 1219 } |
OLD | NEW |