| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const base::Time& start_time, | 74 const base::Time& start_time, |
| 75 const base::Time& end_time, | 75 const base::Time& end_time, |
| 76 int64 received_bytes, | 76 int64 received_bytes, |
| 77 int64 total_bytes, | 77 int64 total_bytes, |
| 78 content::DownloadItem::DownloadState state, | 78 content::DownloadItem::DownloadState state, |
| 79 bool opened) OVERRIDE; | 79 bool opened) OVERRIDE; |
| 80 virtual int InProgressCount() const OVERRIDE; | 80 virtual int InProgressCount() const OVERRIDE; |
| 81 virtual BrowserContext* GetBrowserContext() const OVERRIDE; | 81 virtual BrowserContext* GetBrowserContext() const OVERRIDE; |
| 82 virtual void CheckForHistoryFilesRemoval() OVERRIDE; | 82 virtual void CheckForHistoryFilesRemoval() OVERRIDE; |
| 83 virtual DownloadItem* GetDownload(int id) OVERRIDE; | 83 virtual DownloadItem* GetDownload(int id) OVERRIDE; |
| 84 virtual void MockDownloadOpenForTesting() OVERRIDE; | |
| 85 | 84 |
| 86 // For testing; specifically, accessed from TestFileErrorInjector. | 85 // For testing; specifically, accessed from TestFileErrorInjector. |
| 87 void SetDownloadItemFactoryForTesting( | 86 void SetDownloadItemFactoryForTesting( |
| 88 scoped_ptr<DownloadItemFactory> item_factory); | 87 scoped_ptr<DownloadItemFactory> item_factory); |
| 89 void SetDownloadFileFactoryForTesting( | 88 void SetDownloadFileFactoryForTesting( |
| 90 scoped_ptr<DownloadFileFactory> file_factory); | 89 scoped_ptr<DownloadFileFactory> file_factory); |
| 91 virtual DownloadFileFactory* GetDownloadFileFactoryForTesting(); | 90 virtual DownloadFileFactory* GetDownloadFileFactoryForTesting(); |
| 92 | 91 |
| 93 private: | 92 private: |
| 94 typedef std::set<DownloadItem*> DownloadSet; | 93 typedef std::set<DownloadItem*> DownloadSet; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 ObserverList<Observer> observers_; | 159 ObserverList<Observer> observers_; |
| 161 | 160 |
| 162 // The current active browser context. | 161 // The current active browser context. |
| 163 BrowserContext* browser_context_; | 162 BrowserContext* browser_context_; |
| 164 | 163 |
| 165 // Allows an embedder to control behavior. Guaranteed to outlive this object. | 164 // Allows an embedder to control behavior. Guaranteed to outlive this object. |
| 166 DownloadManagerDelegate* delegate_; | 165 DownloadManagerDelegate* delegate_; |
| 167 | 166 |
| 168 net::NetLog* net_log_; | 167 net::NetLog* net_log_; |
| 169 | 168 |
| 170 // Do we actually open downloads when requested? For testing purposes only. | |
| 171 bool open_enabled_; | |
| 172 | |
| 173 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 169 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
| 174 }; | 170 }; |
| 175 | 171 |
| 176 } // namespace content | 172 } // namespace content |
| 177 | 173 |
| 178 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 174 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| OLD | NEW |