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

Unified Diff: content/browser/download/download_manager_impl.h

Issue 14593012: BrowserContext should simply own DownloadManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_manager_impl.h
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index bbdd0856ac6af37fa1459019aeb5e049c9659e90..2a9cdd0ca08899f5a4cca501dd26b89d6b3b417b 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -93,6 +93,8 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
scoped_ptr<DownloadFileFactory> file_factory);
virtual DownloadFileFactory* GetDownloadFileFactoryForTesting();
+ virtual ~DownloadManagerImpl();
+
private:
typedef std::set<DownloadItem*> DownloadSet;
typedef base::hash_map<int32, DownloadItemImpl*> DownloadMap;
@@ -102,10 +104,6 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
friend class DownloadManagerTest;
friend class DownloadTest;
- friend class base::RefCountedThreadSafe<DownloadManagerImpl>;
-
- virtual ~DownloadManagerImpl();
-
// Create a new active item based on the info. Separate from
// StartDownload() for testing.
DownloadItemImpl* CreateActiveItem(DownloadId id,
@@ -166,6 +164,8 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
net::NetLog* net_log_;
+ base::WeakPtrFactory<DownloadManagerImpl> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698