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

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

Issue 11740026: Pull delegate check back into IsDownloadReadyForCompletion so that if (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed test. Created 7 years, 11 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" 5 #include "content/browser/download/download_item_impl_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/download/download_item_impl.h" 8 #include "content/browser/download/download_item_impl.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 19 matching lines...) Expand all
30 void DownloadItemImplDelegate::DetermineDownloadTarget( 30 void DownloadItemImplDelegate::DetermineDownloadTarget(
31 DownloadItemImpl* download, const DownloadTargetCallback& callback) { 31 DownloadItemImpl* download, const DownloadTargetCallback& callback) {
32 // TODO(rdsmith/asanka): Do something useful if forced file path is null. 32 // TODO(rdsmith/asanka): Do something useful if forced file path is null.
33 FilePath target_path(download->GetForcedFilePath()); 33 FilePath target_path(download->GetForcedFilePath());
34 callback.Run(target_path, 34 callback.Run(target_path,
35 DownloadItem::TARGET_DISPOSITION_OVERWRITE, 35 DownloadItem::TARGET_DISPOSITION_OVERWRITE,
36 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, 36 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
37 target_path); 37 target_path);
38 } 38 }
39 39
40 void DownloadItemImplDelegate::ReadyForDownloadCompletion( 40 bool DownloadItemImplDelegate::ShouldCompleteDownload(
41 DownloadItemImpl* download, 41 DownloadItemImpl* download,
42 const base::Closure& complete_callback) { 42 const base::Closure& complete_callback) {
43 complete_callback.Run(); 43 return true;
44 } 44 }
45 45
46 bool DownloadItemImplDelegate::ShouldOpenDownload( 46 bool DownloadItemImplDelegate::ShouldOpenDownload(
47 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) { 47 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) {
48 return false; 48 return false;
49 } 49 }
50 50
51 bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension( 51 bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension(
52 const FilePath& path) { 52 const FilePath& path) {
53 return false; 53 return false;
(...skipping 12 matching lines...) Expand all
66 66
67 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} 67 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {}
68 68
69 void DownloadItemImplDelegate::ShowDownloadInBrowser( 69 void DownloadItemImplDelegate::ShowDownloadInBrowser(
70 DownloadItemImpl* download) {} 70 DownloadItemImpl* download) {}
71 71
72 void DownloadItemImplDelegate::AssertStateConsistent( 72 void DownloadItemImplDelegate::AssertStateConsistent(
73 DownloadItemImpl* download) const {} 73 DownloadItemImpl* download) const {}
74 74
75 } // namespace content 75 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_delegate.h ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698