OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // The DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
8 // active browser context in Chrome. | 8 // active browser context in Chrome. |
9 // | 9 // |
10 // Download observers: | 10 // Download observers: |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
293 DownloadItem* GetActiveDownloadItem(int id); | 293 DownloadItem* GetActiveDownloadItem(int id); |
294 | 294 |
295 DownloadManagerDelegate* delegate() const { return delegate_; } | 295 DownloadManagerDelegate* delegate() const { return delegate_; } |
296 | 296 |
297 private: | 297 private: |
298 typedef std::set<DownloadItem*> DownloadSet; | 298 typedef std::set<DownloadItem*> DownloadSet; |
299 typedef base::hash_map<int64, DownloadItem*> DownloadMap; | 299 typedef base::hash_map<int64, DownloadItem*> DownloadMap; |
300 | 300 |
301 // For testing. | 301 // For testing. |
302 friend class DownloadManagerTest; | 302 friend class DownloadManagerTest; |
303 friend class DownloadService; | |
jam
2011/10/05 19:27:13
two issues come to mind:
1) this isn't a test clas
Randy Smith (Not in Mondays)
2011/10/08 23:46:54
I'm pretty sure I've cleaned up both issues (by gi
| |
304 friend class DownloadTest; | |
303 friend class MockDownloadManager; | 305 friend class MockDownloadManager; |
304 friend class DownloadTest; | |
305 | 306 |
306 friend class base::RefCountedThreadSafe<DownloadManager, | 307 friend class base::RefCountedThreadSafe<DownloadManager, |
307 BrowserThread::DeleteOnUIThread>; | 308 BrowserThread::DeleteOnUIThread>; |
308 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; | 309 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
309 friend class DeleteTask<DownloadManager>; | 310 friend class DeleteTask<DownloadManager>; |
310 | 311 |
311 void set_delegate(DownloadManagerDelegate* delegate) { delegate_ = delegate; } | 312 void set_delegate(DownloadManagerDelegate* delegate) { delegate_ = delegate; } |
312 | 313 |
313 virtual ~DownloadManager(); | 314 virtual ~DownloadManager(); |
314 | 315 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
427 DownloadManagerDelegate* delegate_; | 428 DownloadManagerDelegate* delegate_; |
428 | 429 |
429 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. | 430 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. |
430 // For debugging only. | 431 // For debugging only. |
431 int64 largest_db_handle_in_history_; | 432 int64 largest_db_handle_in_history_; |
432 | 433 |
433 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 434 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
434 }; | 435 }; |
435 | 436 |
436 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 437 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
OLD | NEW |