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 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Should be called before the first call to ShouldCompleteDownload() to | 60 // Should be called before the first call to ShouldCompleteDownload() to |
61 // disable SafeBrowsing checks for |item|. | 61 // disable SafeBrowsing checks for |item|. |
62 static void DisableSafeBrowsing(content::DownloadItem* item); | 62 static void DisableSafeBrowsing(content::DownloadItem* item); |
63 | 63 |
64 // content::DownloadManagerDelegate | 64 // content::DownloadManagerDelegate |
65 virtual void Shutdown() OVERRIDE; | 65 virtual void Shutdown() OVERRIDE; |
66 virtual content::DownloadId GetNextId() OVERRIDE; | 66 virtual content::DownloadId GetNextId() OVERRIDE; |
67 virtual bool DetermineDownloadTarget( | 67 virtual bool DetermineDownloadTarget( |
68 content::DownloadItem* item, | 68 content::DownloadItem* item, |
69 const content::DownloadTargetCallback& callback) OVERRIDE; | 69 const content::DownloadTargetCallback& callback) OVERRIDE; |
| 70 virtual int64 GetIntermediateFileLength(const FilePath& path, |
| 71 bool temporary) OVERRIDE; |
70 virtual content::WebContents* | 72 virtual content::WebContents* |
71 GetAlternativeWebContentsToNotifyForDownload() OVERRIDE; | 73 GetAlternativeWebContentsToNotifyForDownload() OVERRIDE; |
72 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; | 74 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; |
73 virtual bool ShouldCompleteDownload( | 75 virtual bool ShouldCompleteDownload( |
74 content::DownloadItem* item, | 76 content::DownloadItem* item, |
75 const base::Closure& complete_callback) OVERRIDE; | 77 const base::Closure& complete_callback) OVERRIDE; |
76 virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE; | 78 virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE; |
77 virtual bool GenerateFileHash() OVERRIDE; | 79 virtual bool GenerateFileHash() OVERRIDE; |
78 virtual void AddItemToPersistentStore(content::DownloadItem* item) OVERRIDE; | 80 virtual void AddItemToPersistentStore(content::DownloadItem* item) OVERRIDE; |
79 virtual void UpdateItemInPersistentStore( | 81 virtual void UpdateItemInPersistentStore( |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 #endif | 259 #endif |
258 | 260 |
259 // The directory most recently chosen by the user in response to a Save As | 261 // The directory most recently chosen by the user in response to a Save As |
260 // dialog for a regular download. | 262 // dialog for a regular download. |
261 FilePath last_download_path_; | 263 FilePath last_download_path_; |
262 | 264 |
263 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 265 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
264 }; | 266 }; |
265 | 267 |
266 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 268 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
OLD | NEW |