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

Side by Side Diff: content/public/browser/download_manager_delegate.cc

Issue 10831302: Download resumption - Preliminary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed signed/unsigned compare issue. Created 8 years 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
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/public/browser/download_manager_delegate.h" 5 #include "content/public/browser/download_manager_delegate.h"
6 6
7 #include "base/file_util.h"
7 #include "content/public/browser/download_id.h" 8 #include "content/public/browser/download_id.h"
8 #include "content/public/browser/download_item.h" 9 #include "content/public/browser/download_item.h"
9 10
10 namespace content { 11 namespace content {
11 12
12 DownloadId DownloadManagerDelegate::GetNextId() { 13 DownloadId DownloadManagerDelegate::GetNextId() {
13 return DownloadId::Invalid(); 14 return DownloadId::Invalid();
14 } 15 }
15 16
16 bool DownloadManagerDelegate::DetermineDownloadTarget( 17 bool DownloadManagerDelegate::DetermineDownloadTarget(
17 DownloadItem* item, 18 DownloadItem* item,
18 const DownloadTargetCallback& callback) { 19 const DownloadTargetCallback& callback) {
19 return false; 20 return false;
20 } 21 }
21 22
23 int64 DownloadManagerDelegate::GetIntermediateFileLength(
24 const FilePath& path, bool temporary) {
25 // Validate the start offset.
26 int64 end = 0;
27 if (file_util::GetFileSize(path, &end)) {
28 return end;
29 }
30 return 0;
31 }
32
22 WebContents* DownloadManagerDelegate:: 33 WebContents* DownloadManagerDelegate::
23 GetAlternativeWebContentsToNotifyForDownload() { 34 GetAlternativeWebContentsToNotifyForDownload() {
24 return NULL; 35 return NULL;
25 } 36 }
26 37
27 bool DownloadManagerDelegate::ShouldOpenFileBasedOnExtension( 38 bool DownloadManagerDelegate::ShouldOpenFileBasedOnExtension(
28 const FilePath& path) { 39 const FilePath& path) {
29 return false; 40 return false;
30 } 41 }
31 42
32 bool DownloadManagerDelegate::ShouldCompleteDownload( 43 bool DownloadManagerDelegate::ShouldCompleteDownload(
33 DownloadItem* item, 44 DownloadItem* item,
34 const base::Closure& callback) { 45 const base::Closure& callback) {
35 return true; 46 return true;
36 } 47 }
37 48
38 bool DownloadManagerDelegate::ShouldOpenDownload( 49 bool DownloadManagerDelegate::ShouldOpenDownload(
39 DownloadItem* item, const DownloadOpenDelayedCallback& callback) { 50 DownloadItem* item, const DownloadOpenDelayedCallback& callback) {
40 return true; 51 return true;
41 } 52 }
42 53
43 bool DownloadManagerDelegate::GenerateFileHash() { 54 bool DownloadManagerDelegate::GenerateFileHash() {
44 return false; 55 return false;
45 } 56 }
46 57
47 DownloadManagerDelegate::~DownloadManagerDelegate() {} 58 DownloadManagerDelegate::~DownloadManagerDelegate() {}
48 59
49 } // namespace content 60 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/download_manager_delegate.h ('k') | content/public/browser/download_url_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698