diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 00:32:01 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 00:32:01 +0000 |
commit | 89afcea333db036bc6710cd8a6ec90b388eee84a (patch) | |
tree | b0889227bdb1e7768e868911eaa64e45b40745ad /chrome/browser/download | |
parent | b1f498e33399652b128d9801ad7d96bbeee4ba87 (diff) | |
download | chromium_src-89afcea333db036bc6710cd8a6ec90b388eee84a.zip chromium_src-89afcea333db036bc6710cd8a6ec90b388eee84a.tar.gz chromium_src-89afcea333db036bc6710cd8a6ec90b388eee84a.tar.bz2 |
Sixth patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/370001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_file.h | 5 | ||||
-rw-r--r-- | chrome/browser/download/download_manager.h | 5 | ||||
-rw-r--r-- | chrome/browser/download/download_request_manager.h | 4 | ||||
-rw-r--r-- | chrome/browser/download/save_file_manager.h | 5 | ||||
-rw-r--r-- | chrome/browser/download/save_package.h | 6 |
5 files changed, 19 insertions, 6 deletions
diff --git a/chrome/browser/download/download_file.h b/chrome/browser/download/download_file.h index ef367ce..0705ffe 100644 --- a/chrome/browser/download/download_file.h +++ b/chrome/browser/download/download_file.h @@ -168,7 +168,6 @@ class DownloadFileManager : public base::RefCountedThreadSafe<DownloadFileManager> { public: DownloadFileManager(ResourceDispatcherHost* rdh); - ~DownloadFileManager(); // Called on shutdown on the UI thread. void Shutdown(); @@ -234,6 +233,10 @@ class DownloadFileManager static void DeleteFile(const FilePath& path); private: + friend class base::RefCountedThreadSafe<DownloadFileManager>; + + ~DownloadFileManager(); + // Timer helpers for updating the UI about the current progress of a download. void StartUpdateTimer(); void StopUpdateTimer(); diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h index 3974df6..30423ba 100644 --- a/chrome/browser/download/download_manager.h +++ b/chrome/browser/download/download_manager.h @@ -311,7 +311,6 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>, public: DownloadManager(); - ~DownloadManager(); static void RegisterUserPrefs(PrefService* prefs); @@ -465,6 +464,10 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>, int request_id); private: + friend class base::RefCountedThreadSafe<DownloadManager>; + + ~DownloadManager(); + // Opens a download via the Windows shell. void OpenDownloadInShell(const DownloadItem* download, gfx::NativeView parent_window); diff --git a/chrome/browser/download/download_request_manager.h b/chrome/browser/download/download_request_manager.h index 8e120bb..2b03572 100644 --- a/chrome/browser/download/download_request_manager.h +++ b/chrome/browser/download/download_request_manager.h @@ -148,7 +148,6 @@ class DownloadRequestManager : }; DownloadRequestManager(); - ~DownloadRequestManager(); // Returns the download status for a page. This does not change the state in // anyway. @@ -169,9 +168,12 @@ class DownloadRequestManager : void OnUserGesture(TabContents* tab); private: + friend class base::RefCountedThreadSafe<DownloadRequestManager>; friend class DownloadRequestManagerTest; friend class TabDownloadState; + ~DownloadRequestManager(); + // For unit tests. If non-null this is used instead of creating a dialog. class TestingDelegate { public: diff --git a/chrome/browser/download/save_file_manager.h b/chrome/browser/download/save_file_manager.h index a77f052..ba470d1 100644 --- a/chrome/browser/download/save_file_manager.h +++ b/chrome/browser/download/save_file_manager.h @@ -80,7 +80,6 @@ class SaveFileManager : public base::RefCountedThreadSafe<SaveFileManager> { public: SaveFileManager(ResourceDispatcherHost* rdh); - ~SaveFileManager(); // Lifetime management. void Shutdown(); @@ -144,6 +143,10 @@ class SaveFileManager void RemoveSavedFileFromFileMap(const SaveIDList & save_ids); private: + friend class base::RefCountedThreadSafe<SaveFileManager>; + + ~SaveFileManager(); + // A cleanup helper that runs on the file thread. void OnShutdown(); diff --git a/chrome/browser/download/save_package.h b/chrome/browser/download/save_package.h index a20f027..4d52864 100644 --- a/chrome/browser/download/save_package.h +++ b/chrome/browser/download/save_package.h @@ -94,8 +94,6 @@ class SavePackage : public base::RefCountedThreadSafe<SavePackage>, const FilePath& file_full_path, const FilePath& directory_full_path); - ~SavePackage(); - // Initialize the SavePackage. Returns true if it initializes properly. // Need to make sure that this method must be called in the UI thread because // using g_browser_process on a non-UI thread can cause crashes during @@ -197,10 +195,14 @@ class SavePackage : public base::RefCountedThreadSafe<SavePackage>, virtual void FileSelectionCanceled(void* params); private: + friend class base::RefCountedThreadSafe<SavePackage>; + // For testing only. SavePackage(const FilePath& file_full_path, const FilePath& directory_full_path); + ~SavePackage(); + // Notes from Init() above applies here as well. void InternalInit(); |