| 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 scoped_ptr<content::DownloadUrlParameters> params) OVERRIDE; | 76 scoped_ptr<content::DownloadUrlParameters> params) OVERRIDE; |
| 77 virtual void AddObserver(Observer* observer) OVERRIDE; | 77 virtual void AddObserver(Observer* observer) OVERRIDE; |
| 78 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 78 virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| 79 virtual void OnPersistentStoreQueryComplete( | 79 virtual void OnPersistentStoreQueryComplete( |
| 80 std::vector<content::DownloadPersistentStoreInfo>* entries) OVERRIDE; | 80 std::vector<content::DownloadPersistentStoreInfo>* entries) OVERRIDE; |
| 81 virtual void OnItemAddedToPersistentStore(int32 download_id, | 81 virtual void OnItemAddedToPersistentStore(int32 download_id, |
| 82 int64 db_handle) OVERRIDE; | 82 int64 db_handle) OVERRIDE; |
| 83 virtual int InProgressCount() const OVERRIDE; | 83 virtual int InProgressCount() const OVERRIDE; |
| 84 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 84 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
| 85 virtual void CheckForHistoryFilesRemoval() OVERRIDE; | 85 virtual void CheckForHistoryFilesRemoval() OVERRIDE; |
| 86 virtual content::DownloadItem* GetDownloadItem(int id) OVERRIDE; | |
| 87 virtual content::DownloadItem* GetDownload(int id) OVERRIDE; | 86 virtual content::DownloadItem* GetDownload(int id) OVERRIDE; |
| 88 virtual void SavePageDownloadFinished( | 87 virtual void SavePageDownloadFinished( |
| 89 content::DownloadItem* download) OVERRIDE; | 88 content::DownloadItem* download) OVERRIDE; |
| 90 virtual content::DownloadItem* GetActiveDownloadItem(int id) OVERRIDE; | |
| 91 | 89 |
| 92 private: | 90 private: |
| 93 typedef std::set<content::DownloadItem*> DownloadSet; | 91 typedef std::set<content::DownloadItem*> DownloadSet; |
| 94 typedef base::hash_map<int32, DownloadItemImpl*> DownloadMap; | 92 typedef base::hash_map<int32, DownloadItemImpl*> DownloadMap; |
| 95 typedef std::vector<DownloadItemImpl*> DownloadItemImplVector; | 93 typedef std::vector<DownloadItemImpl*> DownloadItemImplVector; |
| 96 | 94 |
| 97 // For testing. | 95 // For testing. |
| 98 friend class DownloadManagerTest; | 96 friend class DownloadManagerTest; |
| 99 friend class DownloadTest; | 97 friend class DownloadTest; |
| 100 | 98 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 226 |
| 229 // Allows an embedder to control behavior. Guaranteed to outlive this object. | 227 // Allows an embedder to control behavior. Guaranteed to outlive this object. |
| 230 content::DownloadManagerDelegate* delegate_; | 228 content::DownloadManagerDelegate* delegate_; |
| 231 | 229 |
| 232 net::NetLog* net_log_; | 230 net::NetLog* net_log_; |
| 233 | 231 |
| 234 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 232 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
| 235 }; | 233 }; |
| 236 | 234 |
| 237 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 235 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| OLD | NEW |