diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 01:55:48 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 01:55:48 +0000 |
commit | 7991a2336f3e5b975d5f31ffa24f129eb8bf32ad (patch) | |
tree | 52df10a63cfa787c42796566263fcb81c6517d4f /chrome/browser/password_manager | |
parent | 6e82c3c6c3860a1005c96f4f6c138aa79a56d685 (diff) | |
download | chromium_src-7991a2336f3e5b975d5f31ffa24f129eb8bf32ad.zip chromium_src-7991a2336f3e5b975d5f31ffa24f129eb8bf32ad.tar.gz chromium_src-7991a2336f3e5b975d5f31ffa24f129eb8bf32ad.tar.bz2 |
Seventh patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/371006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
6 files changed, 14 insertions, 6 deletions
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h index 03612b7..5749824 100644 --- a/chrome/browser/password_manager/password_store.h +++ b/chrome/browser/password_manager/password_store.h @@ -31,7 +31,6 @@ class PasswordStoreConsumer { class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> { public: PasswordStore(); - virtual ~PasswordStore() {} // Reimplement this to add custom initialization. Always call this too. virtual bool Init(); @@ -73,6 +72,10 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> { virtual void CancelLoginsQuery(int handle); protected: + friend class base::RefCountedThreadSafe<PasswordStore>; + + virtual ~PasswordStore() {} + // Simple container class that represents a login lookup request. class GetLoginsRequest { public: diff --git a/chrome/browser/password_manager/password_store_default.h b/chrome/browser/password_manager/password_store_default.h index dad6e28..6b93481 100644 --- a/chrome/browser/password_manager/password_store_default.h +++ b/chrome/browser/password_manager/password_store_default.h @@ -25,7 +25,6 @@ class PasswordStoreDefault : public PasswordStore, public WebDataServiceConsumer { public: explicit PasswordStoreDefault(WebDataService* web_data_service); - virtual ~PasswordStoreDefault(); // Overridden to bypass the threading logic in PasswordStore, since // WebDataService's API is not threadsafe. @@ -41,6 +40,8 @@ class PasswordStoreDefault : public PasswordStore, virtual void CancelLoginsQuery(int handle); protected: + virtual ~PasswordStoreDefault(); + // Implements PasswordStore interface. void AddLoginImpl(const webkit_glue::PasswordForm& form); void UpdateLoginImpl(const webkit_glue::PasswordForm& form); diff --git a/chrome/browser/password_manager/password_store_gnome.h b/chrome/browser/password_manager/password_store_gnome.h index abbd054..efaafc0 100644 --- a/chrome/browser/password_manager/password_store_gnome.h +++ b/chrome/browser/password_manager/password_store_gnome.h @@ -19,11 +19,12 @@ class Task; class PasswordStoreGnome : public PasswordStore { public: PasswordStoreGnome(); - virtual ~PasswordStoreGnome(); virtual bool Init(); private: + virtual ~PasswordStoreGnome(); + void AddLoginImpl(const PasswordForm& form); void UpdateLoginImpl(const PasswordForm& form); void RemoveLoginImpl(const PasswordForm& form); diff --git a/chrome/browser/password_manager/password_store_kwallet.h b/chrome/browser/password_manager/password_store_kwallet.h index f0ca283..b60d374 100644 --- a/chrome/browser/password_manager/password_store_kwallet.h +++ b/chrome/browser/password_manager/password_store_kwallet.h @@ -23,13 +23,14 @@ class Task; class PasswordStoreKWallet : public PasswordStore { public: PasswordStoreKWallet(); - virtual ~PasswordStoreKWallet(); bool Init(); private: typedef std::vector<PasswordForm*> PasswordFormList; + virtual ~PasswordStoreKWallet(); + // Implements PasswordStore interface. void AddLoginImpl(const PasswordForm& form); void UpdateLoginImpl(const PasswordForm& form); diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h index 45ca859..a9c873c 100644 --- a/chrome/browser/password_manager/password_store_mac.h +++ b/chrome/browser/password_manager/password_store_mac.h @@ -23,9 +23,10 @@ class PasswordStoreMac : public PasswordStore { // Takes ownership of |keychain| and |login_db|, both of which must be // non-NULL. PasswordStoreMac(MacKeychain* keychain, LoginDatabaseMac* login_db); - virtual ~PasswordStoreMac(); private: + virtual ~PasswordStoreMac(); + void AddLoginImpl(const webkit_glue::PasswordForm& form); void UpdateLoginImpl(const webkit_glue::PasswordForm& form); void RemoveLoginImpl(const webkit_glue::PasswordForm& form); diff --git a/chrome/browser/password_manager/password_store_win.h b/chrome/browser/password_manager/password_store_win.h index 0fbc4fa..7a11dae 100644 --- a/chrome/browser/password_manager/password_store_win.h +++ b/chrome/browser/password_manager/password_store_win.h @@ -21,7 +21,6 @@ class PasswordStoreWin : public PasswordStoreDefault { public: // FilePath specifies path to WebDatabase. explicit PasswordStoreWin(WebDataService* web_data_service); - virtual ~PasswordStoreWin() {} // Overridden so that we can save the form for later use. virtual int GetLogins(const webkit_glue::PasswordForm& form, @@ -29,6 +28,8 @@ class PasswordStoreWin : public PasswordStoreDefault { virtual void CancelLoginsQuery(int handle); private: + virtual ~PasswordStoreWin() {} + // See PasswordStoreDefault. void OnWebDataServiceRequestDone(WebDataService::Handle h, const WDTypedResult* result); |