Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Side by Side Diff: content/browser/download/download_item_impl_delegate.cc

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_item_impl_delegate.h"
6
5 #include "base/logging.h" 7 #include "base/logging.h"
6 #include "content/browser/download/download_item_impl_delegate.h" 8 #include "content/browser/download/download_file_factory.h"
7 9
8 class DownloadItemImpl; 10 class DownloadItemImpl;
9 11
10 // Infrastructure in DownloadItemImplDelegate to assert invariant that 12 // Infrastructure in DownloadItemImplDelegate to assert invariant that
11 // delegate always outlives all attached DownloadItemImpls. 13 // delegate always outlives all attached DownloadItemImpls.
12 DownloadItemImplDelegate::DownloadItemImplDelegate() 14 DownloadItemImplDelegate::DownloadItemImplDelegate()
13 : count_(0) {} 15 : count_(0) {}
14 16
15 DownloadItemImplDelegate::~DownloadItemImplDelegate() { 17 DownloadItemImplDelegate::~DownloadItemImplDelegate() {
16 DCHECK_EQ(0, count_); 18 DCHECK_EQ(0, count_);
17 } 19 }
18 20
19 void DownloadItemImplDelegate::Attach() { 21 void DownloadItemImplDelegate::Attach() {
20 ++count_; 22 ++count_;
21 } 23 }
22 24
23 void DownloadItemImplDelegate::Detach() { 25 void DownloadItemImplDelegate::Detach() {
24 DCHECK_LT(0, count_); 26 DCHECK_LT(0, count_);
25 --count_; 27 --count_;
26 } 28 }
27 29
30 void DownloadItemImplDelegate::DelegateStart(
31 DownloadItemImpl* download_item) {}
32
33 bool DownloadItemImplDelegate::ShouldOpenDownload(DownloadItemImpl* download) {
34 return false;
35 }
36
28 bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension( 37 bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension(
29 const FilePath& path) { 38 const FilePath& path) {
30 return false; 39 return false;
31 } 40 }
32 41
33 bool DownloadItemImplDelegate::ShouldOpenDownload(DownloadItemImpl* download) {
34 return false;
35 }
36
37 void DownloadItemImplDelegate::CheckForFileRemoval( 42 void DownloadItemImplDelegate::CheckForFileRemoval(
38 DownloadItemImpl* download_item) {} 43 DownloadItemImpl* download_item) {}
39 44
40 void DownloadItemImplDelegate::MaybeCompleteDownload( 45 void DownloadItemImplDelegate::MaybeCompleteDownload(
41 DownloadItemImpl* download) {} 46 DownloadItemImpl* download) {}
42 47
43 content::BrowserContext* DownloadItemImplDelegate::GetBrowserContext() const { 48 content::BrowserContext* DownloadItemImplDelegate::GetBrowserContext() const {
44 return NULL; 49 return NULL;
45 } 50 }
46 51
(...skipping 10 matching lines...) Expand all
57 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} 62 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {}
58 63
59 void DownloadItemImplDelegate::DownloadRenamedToIntermediateName( 64 void DownloadItemImplDelegate::DownloadRenamedToIntermediateName(
60 DownloadItemImpl* download) {} 65 DownloadItemImpl* download) {}
61 66
62 void DownloadItemImplDelegate::DownloadRenamedToFinalName( 67 void DownloadItemImplDelegate::DownloadRenamedToFinalName(
63 DownloadItemImpl* download) {} 68 DownloadItemImpl* download) {}
64 69
65 void DownloadItemImplDelegate::AssertStateConsistent( 70 void DownloadItemImplDelegate::AssertStateConsistent(
66 DownloadItemImpl* download) const {} 71 DownloadItemImpl* download) const {}
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_delegate.h ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698