summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/options/cookies_view_unittest.cc2
-rw-r--r--chrome/browser/history/history.h11
-rw-r--r--chrome/browser/history/history_backend.cc4
-rw-r--r--chrome/browser/history/history_backend.h5
-rw-r--r--chrome/browser/history/history_marshaling.h4
-rw-r--r--chrome/browser/history/history_unittest.cc3
-rw-r--r--chrome/browser/importer/firefox2_importer.h3
-rw-r--r--chrome/browser/importer/firefox3_importer.h3
-rw-r--r--chrome/browser/importer/ie_importer.h3
-rw-r--r--chrome/browser/importer/importer.cc3
-rw-r--r--chrome/browser/importer/importer.h14
-rw-r--r--chrome/browser/importer/importer_bridge.h7
-rw-r--r--chrome/browser/importer/importer_unittest.cc9
-rw-r--r--chrome/browser/importer/safari_importer.h3
-rw-r--r--chrome/browser/importer/toolbar_importer.h3
-rw-r--r--chrome/browser/net/chrome_url_request_context.h6
-rw-r--r--chrome/browser/net/dns_master.h4
-rw-r--r--chrome/browser/net/sqlite_persistent_cookie_store.cc14
-rw-r--r--chrome/browser/net/url_fetcher.cc4
-rw-r--r--chrome/browser/net/url_fetcher_unittest.cc4
-rw-r--r--chrome/browser/net/url_request_context_getter.h7
-rw-r--r--chrome/browser/notifications/notification_object_proxy.h4
-rw-r--r--chrome/browser/notifications/notifications_prefs_cache.h4
-rw-r--r--chrome/browser/password_manager/password_store.h5
-rw-r--r--chrome/browser/password_manager/password_store_default.h3
-rw-r--r--chrome/browser/password_manager/password_store_gnome.h3
-rw-r--r--chrome/browser/password_manager/password_store_kwallet.h3
-rw-r--r--chrome/browser/password_manager/password_store_mac.h3
-rw-r--r--chrome/browser/password_manager/password_store_win.h3
-rw-r--r--chrome/browser/printing/print_job.h8
-rw-r--r--chrome/browser/printing/print_job_unittest.cc2
-rw-r--r--chrome/browser/printing/print_job_worker_owner.h7
-rw-r--r--chrome/browser/printing/printer_query.h3
-rw-r--r--chrome/browser/sync/glue/http_bridge.h2
-rw-r--r--chrome/browser/sync/glue/http_bridge_unittest.cc2
-rw-r--r--chrome/common/chrome_plugin_unittest.cc1
-rw-r--r--chrome/test/testing_profile.cc2
37 files changed, 129 insertions, 42 deletions
diff --git a/chrome/browser/gtk/options/cookies_view_unittest.cc b/chrome/browser/gtk/options/cookies_view_unittest.cc
index ea5f7af..ab6589f 100644
--- a/chrome/browser/gtk/options/cookies_view_unittest.cc
+++ b/chrome/browser/gtk/options/cookies_view_unittest.cc
@@ -36,6 +36,8 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
return context_;
}
private:
+ ~TestURLRequestContextGetter() {}
+
scoped_refptr<URLRequestContext> context_;
};
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index 6a886b9..1afe44d 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -59,8 +59,6 @@ class URLDatabase;
// on the main thread.
class HistoryDBTask : public base::RefCountedThreadSafe<HistoryDBTask> {
public:
- virtual ~HistoryDBTask() {}
-
// Invoked on the database thread. The return value indicates whether the
// task is done. A return value of true signals the task is done and
// RunOnDBThread should NOT be invoked again. A return value of false
@@ -73,6 +71,11 @@ class HistoryDBTask : public base::RefCountedThreadSafe<HistoryDBTask> {
// only invoked if the request was not canceled and returned true from
// RunOnDBThread.
virtual void DoneRunOnMainThread() = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<HistoryDBTask>;
+
+ virtual ~HistoryDBTask() {}
};
// The history service records page titles, and visit times, as well as
@@ -95,7 +98,6 @@ class HistoryService : public CancelableRequestProvider,
explicit HistoryService(Profile* profile);
// The empty constructor is provided only for testing.
HistoryService();
- ~HistoryService();
// Initializes the history service, returning true on success. On false, do
// not call any other functions. The given directory will be used for storing
@@ -521,6 +523,7 @@ class HistoryService : public CancelableRequestProvider,
private:
class BackendDelegate;
+ friend class base::RefCountedThreadSafe<HistoryService>;
friend class BackendDelegate;
friend class FaviconService;
friend class history::HistoryBackend;
@@ -534,6 +537,8 @@ class HistoryService : public CancelableRequestProvider,
friend class FavIconRequest;
friend class TestingProfile;
+ ~HistoryService();
+
// These are not currently used, hopefully we can do something in the future
// to ensure that the most important things happen first.
enum SchedulePriority {
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 7b45b22..1a3bd09 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -117,6 +117,10 @@ class CommitLaterTask : public base::RefCounted<CommitLaterTask> {
}
private:
+ friend class base::RefCounted<CommitLaterTask>;
+
+ ~CommitLaterTask() {}
+
scoped_refptr<HistoryBackend> history_backend_;
};
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index 0d854e2..49569f5 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -94,8 +94,6 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
Delegate* delegate,
BookmarkService* bookmark_service);
- ~HistoryBackend();
-
// Must be called after creation but before any objects are created. If this
// fails, all other functions will fail as well. (Since this runs on another
// thread, we don't bother returning failure.)
@@ -274,6 +272,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
#endif
private:
+ friend class base::RefCountedThreadSafe<HistoryBackend>;
friend class CommitLaterTask; // The commit task needs to call Commit().
friend class HistoryTest; // So the unit tests can poke our innards.
FRIEND_TEST(HistoryBackendTest, DeleteAll);
@@ -281,6 +280,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
FRIEND_TEST(HistoryBackendTest, URLsNoLongerBookmarked);
friend class ::TestingProfile;
+ ~HistoryBackend();
+
// Computes the name of the specified database on disk.
FilePath GetThumbnailFileName() const;
FilePath GetArchivedFileName() const;
diff --git a/chrome/browser/history/history_marshaling.h b/chrome/browser/history/history_marshaling.h
index 947f966..d6decb3 100644
--- a/chrome/browser/history/history_marshaling.h
+++ b/chrome/browser/history/history_marshaling.h
@@ -52,6 +52,10 @@ class HistoryAddPageArgs
bool did_replace_entry;
private:
+ friend class base::RefCountedThreadSafe<HistoryAddPageArgs>;
+
+ ~HistoryAddPageArgs() {}
+
DISALLOW_EVIL_CONSTRUCTORS(HistoryAddPageArgs);
};
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index aa9d00f..47cd4e8 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -785,7 +785,6 @@ class HistoryDBTaskImpl : public HistoryDBTask {
static const int kWantInvokeCount;
HistoryDBTaskImpl() : invoke_count(0), done_invoked(false) {}
- virtual ~HistoryDBTaskImpl() {}
virtual bool RunOnDBThread(HistoryBackend* backend, HistoryDatabase* db) {
return (++invoke_count == kWantInvokeCount);
@@ -800,6 +799,8 @@ class HistoryDBTaskImpl : public HistoryDBTask {
bool done_invoked;
private:
+ virtual ~HistoryDBTaskImpl() {}
+
DISALLOW_EVIL_CONSTRUCTORS(HistoryDBTaskImpl);
};
diff --git a/chrome/browser/importer/firefox2_importer.h b/chrome/browser/importer/firefox2_importer.h
index d517ee3..b0ae776 100644
--- a/chrome/browser/importer/firefox2_importer.h
+++ b/chrome/browser/importer/firefox2_importer.h
@@ -13,7 +13,6 @@ class TemplateURL;
class Firefox2Importer : public Importer {
public:
Firefox2Importer();
- virtual ~Firefox2Importer();
// Importer methods.
virtual void StartImport(ProfileInfo profile_info,
@@ -48,6 +47,8 @@ class Firefox2Importer : public Importer {
FRIEND_TEST(FirefoxImporterTest, Firefox2BookmarkParse);
FRIEND_TEST(FirefoxImporterTest, Firefox2CookesParse);
+ virtual ~Firefox2Importer();
+
void ImportBookmarks();
void ImportPasswords();
void ImportHistory();
diff --git a/chrome/browser/importer/firefox3_importer.h b/chrome/browser/importer/firefox3_importer.h
index 926272b..5123961 100644
--- a/chrome/browser/importer/firefox3_importer.h
+++ b/chrome/browser/importer/firefox3_importer.h
@@ -21,7 +21,6 @@ struct sqlite3;
class Firefox3Importer : public Importer {
public:
Firefox3Importer() { }
- virtual ~Firefox3Importer() { }
// Importer methods.
virtual void StartImport(ProfileInfo profile_info,
@@ -31,6 +30,8 @@ class Firefox3Importer : public Importer {
private:
typedef std::map<int64, std::set<GURL> > FaviconMap;
+ virtual ~Firefox3Importer() { }
+
void ImportBookmarks();
void ImportPasswords();
void ImportHistory();
diff --git a/chrome/browser/importer/ie_importer.h b/chrome/browser/importer/ie_importer.h
index f40d439e..ea38901 100644
--- a/chrome/browser/importer/ie_importer.h
+++ b/chrome/browser/importer/ie_importer.h
@@ -10,7 +10,6 @@
class IEImporter : public Importer {
public:
IEImporter() {}
- virtual ~IEImporter() {}
// Importer methods.
virtual void StartImport(ProfileInfo browser_info,
@@ -20,6 +19,8 @@ class IEImporter : public Importer {
private:
FRIEND_TEST(ImporterTest, IEImporter);
+ virtual ~IEImporter() {}
+
void ImportFavorites();
void ImportHistory();
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index 892d2aa..966cf5b 100644
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -364,6 +364,9 @@ Importer::Importer()
import_to_bookmark_bar_(false) {
}
+Importer::~Importer() {
+}
+
// static
bool Importer::ReencodeFavicon(const unsigned char* src_data, size_t src_len,
std::vector<unsigned char>* png_data) {
diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h
index 35e2959..ee832bd 100644
--- a/chrome/browser/importer/importer.h
+++ b/chrome/browser/importer/importer.h
@@ -69,7 +69,6 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
};
explicit ProfileWriter(Profile* profile) : profile_(profile) { }
- virtual ~ProfileWriter() { }
virtual bool BookmarkModelIsLoaded() const;
virtual bool TemplateURLModelIsLoaded() const;
@@ -128,6 +127,11 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
Profile* GetProfile() const { return profile_; }
+ protected:
+ friend class base::RefCountedThreadSafe<ProfileWriter>;
+
+ virtual ~ProfileWriter() { }
+
private:
// Generates a unique folder name. If folder_name is not unique, then this
// repeatedly tests for '|folder_name| + (i)' until a unique name is found.
@@ -155,7 +159,6 @@ class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>,
public NotificationObserver {
public:
ImporterHost();
- ~ImporterHost();
// BookmarkModelObserver methods.
virtual void Loaded(BookmarkModel* model);
@@ -270,6 +273,10 @@ class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>,
private:
+ friend class base::RefCountedThreadSafe<ImporterHost>;
+
+ ~ImporterHost();
+
// If we're not waiting on any model to finish loading, invokes the task_.
void InvokeTaskIfDone();
@@ -332,7 +339,10 @@ class Importer : public base::RefCountedThreadSafe<Importer> {
bool cancelled() const { return cancelled_; }
protected:
+ friend class base::RefCountedThreadSafe<Importer>;
+
Importer();
+ virtual ~Importer();
// Given raw image data, decodes the icon, re-sampling to the correct size as
// necessary, and re-encodes as PNG data in the given output vector. Returns
diff --git a/chrome/browser/importer/importer_bridge.h b/chrome/browser/importer/importer_bridge.h
index d3660d7..2da1b7d 100644
--- a/chrome/browser/importer/importer_bridge.h
+++ b/chrome/browser/importer/importer_bridge.h
@@ -23,7 +23,6 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
: writer_(writer),
host_(host) {
}
- virtual ~ImporterBridge() {}
virtual void AddBookmarkEntries(
const std::vector<ProfileWriter::BookmarkEntry>& bookmarks,
@@ -58,12 +57,14 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
virtual void NotifyEnded() = 0;
protected:
-
+ friend class base::RefCountedThreadSafe<ImporterBridge>;
// TODO: In order to run Toolbar5Importer OOP we need to cut this
// connection, but as an interim step we allow Toolbar5Import to break
// the abstraction here and assume import is in-process.
friend class Toolbar5Importer;
+ virtual ~ImporterBridge() {}
+
ProfileWriter* writer_;
ImporterHost* host_;
@@ -100,6 +101,8 @@ class InProcessImporterBridge : public ImporterBridge {
virtual void NotifyEnded();
private:
+ ~InProcessImporterBridge() {}
+
DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge);
};
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index 23b7220..7d9f36a 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -258,6 +258,8 @@ class TestObserver : public ProfileWriter,
}
private:
+ ~TestObserver() {}
+
int bookmark_count_;
int history_count_;
int password_count_;
@@ -630,6 +632,8 @@ class FirefoxObserver : public ProfileWriter,
}
private:
+ ~FirefoxObserver() {}
+
int bookmark_count_;
int history_count_;
int password_count_;
@@ -735,9 +739,6 @@ class Firefox3Observer : public ProfileWriter,
import_search_engines_(import_search_engines) {
}
- ~Firefox3Observer(){
- }
-
virtual void ImportItemStarted(ImportItem item) {}
virtual void ImportItemEnded(ImportItem item) {}
virtual void ImportStarted() {}
@@ -834,6 +835,8 @@ class Firefox3Observer : public ProfileWriter,
}
private:
+ ~Firefox3Observer() {}
+
int bookmark_count_;
int history_count_;
int password_count_;
diff --git a/chrome/browser/importer/safari_importer.h b/chrome/browser/importer/safari_importer.h
index ff9e9ef..b42f401 100644
--- a/chrome/browser/importer/safari_importer.h
+++ b/chrome/browser/importer/safari_importer.h
@@ -27,7 +27,6 @@ class SafariImporter : public Importer {
// |library_dir| is the full path to the ~/Library directory,
// We pass it in as a parameter for testing purposes.
explicit SafariImporter(const FilePath& library_dir);
- virtual ~SafariImporter();
// Importer methods.
virtual void StartImport(ProfileInfo profile_info,
@@ -46,6 +45,8 @@ class SafariImporter : public Importer {
FRIEND_TEST(SafariImporterTest, FavIconImport);
FRIEND_TEST(SafariImporterTest, HistoryImport);
+ virtual ~SafariImporter();
+
// Multiple URLs can share the same FavIcon, this is a map
// of URLs -> IconIDs that we load as a temporary step before
// actually loading the icons.
diff --git a/chrome/browser/importer/toolbar_importer.h b/chrome/browser/importer/toolbar_importer.h
index e2cf511..37a97fe 100644
--- a/chrome/browser/importer/toolbar_importer.h
+++ b/chrome/browser/importer/toolbar_importer.h
@@ -33,7 +33,6 @@ bool IsGoogleGAIACookieInstalled();
class Toolbar5Importer : public URLFetcher::Delegate, public Importer {
public:
Toolbar5Importer();
- virtual ~Toolbar5Importer();
// Importer view calls this method to begin the process. The items parameter
// should only either be NONE or FAVORITES, since as of right now these are
@@ -59,6 +58,8 @@ class Toolbar5Importer : public URLFetcher::Delegate, public Importer {
private:
FRIEND_TEST(Toolbar5ImporterTest, BookmarkParse);
+ virtual ~Toolbar5Importer();
+
// Internal states of the toolbar importer.
enum InternalStateEnum {
NOT_USED = -1,
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index 0918cde..916e765 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -43,9 +43,6 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter,
ChromeURLRequestContextGetter(Profile* profile,
ChromeURLRequestContextFactory* factory);
- // Must be called on the IO thread.
- virtual ~ChromeURLRequestContextGetter();
-
// Note that GetURLRequestContext() can only be called from the IO
// thread (it will assert otherwise). GetCookieStore() however can
// be called from any thread.
@@ -100,6 +97,9 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter,
const NotificationDetails& details);
private:
+ // Must be called on the IO thread.
+ virtual ~ChromeURLRequestContextGetter();
+
// Registers an observer on |profile|'s preferences which will be used
// to update the context when the default language and charset change.
void RegisterPrefsObserver(Profile* profile);
diff --git a/chrome/browser/net/dns_master.h b/chrome/browser/net/dns_master.h
index 451e9ed..8309789 100644
--- a/chrome/browser/net/dns_master.h
+++ b/chrome/browser/net/dns_master.h
@@ -44,7 +44,6 @@ class DnsMaster : public base::RefCountedThreadSafe<DnsMaster> {
// |host_resolver| instance.
DnsMaster(net::HostResolver* host_resolver,
TimeDelta max_queue_delay_ms, size_t max_concurrent);
- ~DnsMaster();
// Cancel pending requests and prevent new ones from being made.
void Shutdown();
@@ -101,6 +100,7 @@ class DnsMaster : public base::RefCountedThreadSafe<DnsMaster> {
size_t max_concurrent_lookups() const { return max_concurrent_lookups_; }
private:
+ friend class base::RefCountedThreadSafe<DnsMaster>;
FRIEND_TEST(DnsMasterTest, BenefitLookupTest);
FRIEND_TEST(DnsMasterTest, ShutdownWhenResolutionIsPendingTest);
FRIEND_TEST(DnsMasterTest, SingleLookupTest);
@@ -110,6 +110,8 @@ class DnsMaster : public base::RefCountedThreadSafe<DnsMaster> {
FRIEND_TEST(DnsMasterTest, PriorityQueueReorderTest);
friend class WaitForResolutionHelper; // For testing.
+ ~DnsMaster();
+
class LookupRequest;
// A simple priority queue for handling host names.
diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.cc b/chrome/browser/net/sqlite_persistent_cookie_store.cc
index c79fa42..0216b40 100644
--- a/chrome/browser/net/sqlite_persistent_cookie_store.cc
+++ b/chrome/browser/net/sqlite_persistent_cookie_store.cc
@@ -32,12 +32,6 @@ class SQLitePersistentCookieStore::Backend
DCHECK(db_) << "Database must exist.";
}
- // You should call Close() before destructing this object.
- ~Backend() {
- DCHECK(!db_) << "Close should have already been called.";
- DCHECK(num_pending_ == 0 && pending_.empty());
- }
-
// Batch a cookie addition.
void AddCookie(const std::string& key,
const net::CookieMonster::CanonicalCookie& cc);
@@ -53,6 +47,14 @@ class SQLitePersistentCookieStore::Backend
void Close();
private:
+ friend class base::RefCountedThreadSafe<SQLitePersistentCookieStore::Backend>;
+
+ // You should call Close() before destructing this object.
+ ~Backend() {
+ DCHECK(!db_) << "Close should have already been called.";
+ DCHECK(num_pending_ == 0 && pending_.empty());
+ }
+
class PendingOperation {
public:
typedef enum {
diff --git a/chrome/browser/net/url_fetcher.cc b/chrome/browser/net/url_fetcher.cc
index 7d0aad7..600fb73 100644
--- a/chrome/browser/net/url_fetcher.cc
+++ b/chrome/browser/net/url_fetcher.cc
@@ -53,6 +53,10 @@ class URLFetcher::Core
URLFetcher::Delegate* delegate() const { return delegate_; }
private:
+ friend class base::RefCountedThreadSafe<URLFetcher::Core>;
+
+ ~Core() {}
+
// Wrapper functions that allow us to ensure actions happen on the right
// thread.
void StartURLRequest();
diff --git a/chrome/browser/net/url_fetcher_unittest.cc b/chrome/browser/net/url_fetcher_unittest.cc
index 8ec69dc..d186b40 100644
--- a/chrome/browser/net/url_fetcher_unittest.cc
+++ b/chrome/browser/net/url_fetcher_unittest.cc
@@ -30,6 +30,8 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
return context_;
}
private:
+ ~TestURLRequestContextGetter() {}
+
scoped_refptr<URLRequestContext> context_;
};
@@ -176,6 +178,8 @@ class CancelTestURLRequestContextGetter : public URLRequestContextGetter {
}
private:
+ ~CancelTestURLRequestContextGetter() {}
+
scoped_refptr<URLRequestContext> context_;
bool* destructor_called_;
};
diff --git a/chrome/browser/net/url_request_context_getter.h b/chrome/browser/net/url_request_context_getter.h
index b5c8070..78edbd1 100644
--- a/chrome/browser/net/url_request_context_getter.h
+++ b/chrome/browser/net/url_request_context_getter.h
@@ -17,13 +17,16 @@ class URLRequestContext;
class URLRequestContextGetter
: public base::RefCountedThreadSafe<URLRequestContextGetter> {
public:
- virtual ~URLRequestContextGetter() {}
-
virtual URLRequestContext* GetURLRequestContext() = 0;
// Defaults to GetURLRequestContext()->cookie_store(), but
// implementations can override it.
virtual net::CookieStore* GetCookieStore();
+
+ protected:
+ friend class base::RefCountedThreadSafe<URLRequestContextGetter>;
+
+ virtual ~URLRequestContextGetter() {}
};
#endif // CHROME_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_
diff --git a/chrome/browser/notifications/notification_object_proxy.h b/chrome/browser/notifications/notification_object_proxy.h
index a5ad53b..ff71bc3 100644
--- a/chrome/browser/notifications/notification_object_proxy.h
+++ b/chrome/browser/notifications/notification_object_proxy.h
@@ -43,6 +43,10 @@ class NotificationObjectProxy :
}
private:
+ friend class base::RefCountedThreadSafe<NotificationObjectProxy>;
+
+ ~NotificationObjectProxy() {}
+
// Called on UI thread to schedule a message for sending.
void DeliverMessage(IPC::Message* message);
diff --git a/chrome/browser/notifications/notifications_prefs_cache.h b/chrome/browser/notifications/notifications_prefs_cache.h
index 8edbc36..58fb873 100644
--- a/chrome/browser/notifications/notifications_prefs_cache.h
+++ b/chrome/browser/notifications/notifications_prefs_cache.h
@@ -31,6 +31,10 @@ class NotificationsPrefsCache :
void CacheDeniedOrigin(const GURL& origin);
private:
+ friend class base::RefCountedThreadSafe<NotificationsPrefsCache>;
+
+ ~NotificationsPrefsCache() {}
+
// Helper functions which read preferences.
bool IsOriginAllowed(const GURL& origin);
bool IsOriginDenied(const GURL& origin);
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);
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index 3d0353f..eec13db 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -38,7 +38,6 @@ class PrintJob : public PrintJobWorkerOwner,
// Create a empty PrintJob. When initializing with this constructor,
// post-constructor initialization must be done with Initialize().
PrintJob();
- virtual ~PrintJob();
// Grabs the ownership of the PrintJobWorker from another job, which is
// usually a PrinterQuery.
@@ -92,6 +91,8 @@ class PrintJob : public PrintJobWorkerOwner,
// Access the current printed document. Warning: may be NULL.
PrintedDocument* document() const;
+ protected:
+ virtual ~PrintJob();
private:
// Updates document_ to a new instance.
@@ -181,7 +182,6 @@ class JobEventDetails : public base::RefCountedThreadSafe<JobEventDetails> {
};
JobEventDetails(Type type, PrintedDocument* document, PrintedPage* page);
- ~JobEventDetails();
// Getters.
PrintedDocument* document() const;
@@ -191,6 +191,10 @@ class JobEventDetails : public base::RefCountedThreadSafe<JobEventDetails> {
}
private:
+ friend class base::RefCountedThreadSafe<JobEventDetails>;
+
+ ~JobEventDetails();
+
scoped_refptr<PrintedDocument> document_;
scoped_refptr<PrintedPage> page_;
const Type type_;
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc
index 8c79e6a..87d7efa 100644
--- a/chrome/browser/printing/print_job_unittest.cc
+++ b/chrome/browser/printing/print_job_unittest.cc
@@ -65,10 +65,10 @@ class TestPrintJob : public printing::PrintJob {
public:
explicit TestPrintJob(volatile bool* check) : check_(check) {
}
+ private:
~TestPrintJob() {
*check_ = true;
}
- private:
volatile bool* check_;
};
diff --git a/chrome/browser/printing/print_job_worker_owner.h b/chrome/browser/printing/print_job_worker_owner.h
index e1ba719..510f15f 100644
--- a/chrome/browser/printing/print_job_worker_owner.h
+++ b/chrome/browser/printing/print_job_worker_owner.h
@@ -18,8 +18,6 @@ class PrintSettings;
class PrintJobWorkerOwner :
public base::RefCountedThreadSafe<PrintJobWorkerOwner> {
public:
- virtual ~PrintJobWorkerOwner() {
- }
// Finishes the initialization began by PrintJobWorker::Init(). Creates a
// new PrintedDocument if necessary. Solely meant to be called by
@@ -38,6 +36,11 @@ class PrintJobWorkerOwner :
// Cookie uniquely identifying the PrintedDocument and/or loaded settings.
virtual int cookie() const = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<PrintJobWorkerOwner>;
+
+ virtual ~PrintJobWorkerOwner() {}
};
} // namespace printing
diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h
index b4826ec..b9c2734 100644
--- a/chrome/browser/printing/printer_query.h
+++ b/chrome/browser/printing/printer_query.h
@@ -30,7 +30,6 @@ class PrinterQuery : public PrintJobWorkerOwner {
};
PrinterQuery();
- virtual ~PrinterQuery();
// PrintJobWorkerOwner
virtual void GetSettingsDone(const PrintSettings& new_settings,
@@ -68,6 +67,8 @@ class PrinterQuery : public PrintJobWorkerOwner {
bool is_valid() const;
private:
+ virtual ~PrinterQuery();
+
// Main message loop reference. Used to send notifications in the right
// thread.
MessageLoop* const ui_message_loop_;
diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h
index 8c2c5b9..807b79c 100644
--- a/chrome/browser/sync/glue/http_bridge.h
+++ b/chrome/browser/sync/glue/http_bridge.h
@@ -85,6 +85,8 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
virtual URLRequestContext* GetURLRequestContext();
private:
+ ~RequestContextGetter() {}
+
// User agent to apply to the URLRequestContext.
std::string user_agent_;
diff --git a/chrome/browser/sync/glue/http_bridge_unittest.cc b/chrome/browser/sync/glue/http_bridge_unittest.cc
index b64f5e3..a870e06 100644
--- a/chrome/browser/sync/glue/http_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/http_bridge_unittest.cc
@@ -24,6 +24,8 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
return context_;
}
private:
+ ~TestURLRequestContextGetter() {}
+
scoped_refptr<URLRequestContext> context_;
};
diff --git a/chrome/common/chrome_plugin_unittest.cc b/chrome/common/chrome_plugin_unittest.cc
index 854092c..43e3c53 100644
--- a/chrome/common/chrome_plugin_unittest.cc
+++ b/chrome/common/chrome_plugin_unittest.cc
@@ -32,6 +32,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter {
return context_;
}
private:
+ ~TestURLRequestContextGetter() {}
scoped_refptr<URLRequestContext> context_;
};
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index 775f20b..86e7eab 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -36,6 +36,8 @@ class QuittingHistoryDBTask : public HistoryDBTask {
}
private:
+ ~QuittingHistoryDBTask() {}
+
DISALLOW_COPY_AND_ASSIGN(QuittingHistoryDBTask);
};