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

Side by Side Diff: content/public/browser/download_manager.h

Issue 10069054: RefCounted types should not have public destructors, content/ remaining bits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to Trunk Created 8 years, 7 months 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 | Annotate | Revision Log
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 // 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 class BrowserContext; 54 class BrowserContext;
55 class DownloadManagerDelegate; 55 class DownloadManagerDelegate;
56 class DownloadQuery; 56 class DownloadQuery;
57 class DownloadUrlParameters; 57 class DownloadUrlParameters;
58 58
59 // Browser's download manager: manages all downloads and destination view. 59 // Browser's download manager: manages all downloads and destination view.
60 class CONTENT_EXPORT DownloadManager 60 class CONTENT_EXPORT DownloadManager
61 : public base::RefCountedThreadSafe<DownloadManager> { 61 : public base::RefCountedThreadSafe<DownloadManager> {
62 public: 62 public:
63 virtual ~DownloadManager() {}
64
65 static DownloadManager* Create( 63 static DownloadManager* Create(
66 DownloadManagerDelegate* delegate, 64 DownloadManagerDelegate* delegate,
67 net::NetLog* net_log); 65 net::NetLog* net_log);
68 66
69 // A method that can be used in tests to ensure that all the internal download 67 // A method that can be used in tests to ensure that all the internal download
70 // classes have no pending downloads. 68 // classes have no pending downloads.
71 static bool EnsureNoPendingDownloadsForTesting(); 69 static bool EnsureNoPendingDownloadsForTesting();
72 70
73 // Shutdown the download manager. Must be called before destruction. 71 // Shutdown the download manager. Must be called before destruction.
74 virtual void Shutdown() = 0; 72 virtual void Shutdown() = 0;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 238
241 virtual bool GenerateFileHash() = 0; 239 virtual bool GenerateFileHash() = 0;
242 240
243 virtual DownloadManagerDelegate* delegate() const = 0; 241 virtual DownloadManagerDelegate* delegate() const = 0;
244 242
245 // For testing only. May be called from tests indirectly (through 243 // For testing only. May be called from tests indirectly (through
246 // other for testing only methods). 244 // other for testing only methods).
247 virtual void SetDownloadManagerDelegate( 245 virtual void SetDownloadManagerDelegate(
248 DownloadManagerDelegate* delegate) = 0; 246 DownloadManagerDelegate* delegate) = 0;
249 247
248 protected:
249 virtual ~DownloadManager() {}
250
250 private: 251 private:
251 friend class base::RefCountedThreadSafe< 252 friend class base::RefCountedThreadSafe<DownloadManager>;
252 DownloadManager, BrowserThread::DeleteOnUIThread>;
253 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
254 friend class base::DeleteHelper<DownloadManager>;
255 }; 253 };
256 254
257 } // namespace content 255 } // namespace content
258 256
259 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ 257 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « content/public/browser/browser_message_filter.cc ('k') | content/public/browser/indexed_db_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698