Commit d2d19203 authored by dcheng's avatar dcheng Committed by Commit bot

Standardize usage of virtual/override/final in chrome/browser/browsing_data

The Google C++ style guide states:

  Explicitly annotate overrides of virtual functions or virtual
  destructors with an override or (less frequently) final specifier.
  Older (pre-C++11) code will use the virtual keyword as an inferior
  alternative annotation. For clarity, use exactly one of override,
  final, or virtual when declaring an override.

To better conform to these guidelines, the following constructs have
been rewritten:

- if a base class has a virtual destructor, then:
    virtual ~Foo();                   ->  ~Foo() override;
- virtual void Foo() override;        ->  void Foo() override;
- virtual void Foo() override final;  ->  void Foo() final;

This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.

BUG=417463
R=mkwst@chromium.org

Review URL: https://codereview.chromium.org/666123002

Cr-Commit-Position: refs/heads/master@{#300575}
parent b64da3f3
......@@ -76,11 +76,11 @@ class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper {
const OriginAppCacheInfoMap& GetOriginAppCacheInfoMap() const;
// BrowsingDataAppCacheHelper methods.
virtual void StartFetching(const base::Closure& completion_callback) override;
virtual void DeleteAppCacheGroup(const GURL& manifest_url) override;
void StartFetching(const base::Closure& completion_callback) override;
void DeleteAppCacheGroup(const GURL& manifest_url) override;
private:
virtual ~CannedBrowsingDataAppCacheHelper();
~CannedBrowsingDataAppCacheHelper() override;
DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper);
};
......
......@@ -24,11 +24,11 @@ class BrowsingDataChannelIDHelperImpl
net::URLRequestContextGetter* request_context);
// BrowsingDataChannelIDHelper methods.
virtual void StartFetching(const FetchResultCallback& callback) override;
virtual void DeleteChannelID(const std::string& server_id) override;
void StartFetching(const FetchResultCallback& callback) override;
void DeleteChannelID(const std::string& server_id) override;
private:
virtual ~BrowsingDataChannelIDHelperImpl();
~BrowsingDataChannelIDHelperImpl() override;
// Fetch the certs. This must be called in the IO thread.
void FetchOnIOThread();
......
......@@ -68,11 +68,11 @@ class CannedBrowsingDataChannelIDHelper
size_t GetChannelIDCount() const;
// BrowsingDataChannelIDHelper methods.
virtual void StartFetching(const FetchResultCallback& callback) override;
virtual void DeleteChannelID(const std::string& server_id) override;
void StartFetching(const FetchResultCallback& callback) override;
void DeleteChannelID(const std::string& server_id) override;
private:
virtual ~CannedBrowsingDataChannelIDHelper();
~CannedBrowsingDataChannelIDHelper() override;
void FinishFetching();
......
......@@ -53,9 +53,7 @@ class BrowsingDataChannelIDHelperTest
}
// net::SSLConfigService::Observer implementation:
virtual void OnSSLConfigChanged() override {
ssl_config_changed_count_++;
}
void OnSSLConfigChanged() override { ssl_config_changed_count_++; }
protected:
content::TestBrowserThreadBundle thread_bundle_;
......
......@@ -126,9 +126,9 @@ class CannedBrowsingDataCookieHelper : public BrowsingDataCookieHelper {
bool empty() const;
// BrowsingDataCookieHelper methods.
virtual void StartFetching(
void StartFetching(
const net::CookieMonster::GetCookieListCallback& callback) override;
virtual void DeleteCookie(const net::CanonicalCookie& cookie) override;
void DeleteCookie(const net::CanonicalCookie& cookie) override;
// Returns the number of stored cookies.
size_t GetCookieCount() const;
......@@ -145,7 +145,7 @@ class CannedBrowsingDataCookieHelper : public BrowsingDataCookieHelper {
bool DeleteMatchingCookie(const net::CanonicalCookie& add_cookie,
canonical_cookie::CookieHashSet* cookie_set);
virtual ~CannedBrowsingDataCookieHelper();
~CannedBrowsingDataCookieHelper() override;
// Returns the |CookieSet| for the given |origin|.
canonical_cookie::CookieHashSet* GetCookiesFor(const GURL& origin);
......
......@@ -134,14 +134,13 @@ class CannedBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper {
const std::set<PendingDatabaseInfo>& GetPendingDatabaseInfo();
// BrowsingDataDatabaseHelper implementation.
virtual void StartFetching(
const base::Callback<void(const std::list<DatabaseInfo>&)>& callback)
override;
virtual void DeleteDatabase(const std::string& origin_identifier,
const std::string& name) override;
void StartFetching(const base::Callback<void(const std::list<DatabaseInfo>&)>&
callback) override;
void DeleteDatabase(const std::string& origin_identifier,
const std::string& name) override;
private:
virtual ~CannedBrowsingDataDatabaseHelper();
~CannedBrowsingDataDatabaseHelper() override;
std::set<PendingDatabaseInfo> pending_database_info_;
......
......@@ -34,12 +34,13 @@ class BrowsingDataFileSystemHelperImpl : public BrowsingDataFileSystemHelper {
// BrowsingDataFileSystemHelper implementation
explicit BrowsingDataFileSystemHelperImpl(
storage::FileSystemContext* filesystem_context);
virtual void StartFetching(const base::Callback<
void(const std::list<FileSystemInfo>&)>& callback) override;
virtual void DeleteFileSystemOrigin(const GURL& origin) override;
void StartFetching(
const base::Callback<void(const std::list<FileSystemInfo>&)>& callback)
override;
void DeleteFileSystemOrigin(const GURL& origin) override;
private:
virtual ~BrowsingDataFileSystemHelperImpl();
~BrowsingDataFileSystemHelperImpl() override;
// Enumerates all filesystem files, storing the resulting list into
// file_system_file_ for later use. This must be called on the file
......
......@@ -120,17 +120,18 @@ class CannedBrowsingDataFileSystemHelper
}
// BrowsingDataFileSystemHelper implementation.
virtual void StartFetching(const base::Callback<
void(const std::list<FileSystemInfo>&)>& callback) override;
void StartFetching(
const base::Callback<void(const std::list<FileSystemInfo>&)>& callback)
override;
// Note that this doesn't actually have an implementation for this canned
// class. It hasn't been necessary for anything that uses the canned
// implementation, as the canned class is only used in tests, or in read-only
// contexts (like the non-modal cookie dialog).
virtual void DeleteFileSystemOrigin(const GURL& origin) override {}
void DeleteFileSystemOrigin(const GURL& origin) override {}
private:
virtual ~CannedBrowsingDataFileSystemHelper();
~CannedBrowsingDataFileSystemHelper() override;
// Holds the current list of filesystems returned to the client.
std::list<FileSystemInfo> file_system_info_;
......
......@@ -21,20 +21,17 @@ class BrowsingDataFlashLSOHelperImpl
content::BrowserContext* browser_context);
// BrowsingDataFlashLSOHelper implementation:
virtual void StartFetching(
const GetSitesWithFlashDataCallback& callback) override;
virtual void DeleteFlashLSOsForSite(const std::string& site) override;
void StartFetching(const GetSitesWithFlashDataCallback& callback) override;
void DeleteFlashLSOsForSite(const std::string& site) override;
// PepperFlashSettingsManager::Client overrides:
virtual void OnGetSitesWithDataCompleted(
void OnGetSitesWithDataCompleted(
uint32 request_id,
const std::vector<std::string>& sites) override;
virtual void OnClearSiteDataCompleted(
uint32 request_id,
bool success) override;
void OnClearSiteDataCompleted(uint32 request_id, bool success) override;
private:
virtual ~BrowsingDataFlashLSOHelperImpl();
~BrowsingDataFlashLSOHelperImpl() override;
// Asynchronously fetches and deletes data and calls us back.
PepperFlashSettingsManager settings_manager_;
......
......@@ -115,13 +115,12 @@ class CannedBrowsingDataIndexedDBHelper
GetIndexedDBInfo() const;
// BrowsingDataIndexedDBHelper methods.
virtual void StartFetching(
const base::Callback<void(const std::list<content::IndexedDBInfo>&)>&
callback) override;
virtual void DeleteIndexedDB(const GURL& origin) override;
void StartFetching(const base::Callback<
void(const std::list<content::IndexedDBInfo>&)>& callback) override;
void DeleteIndexedDB(const GURL& origin) override;
private:
virtual ~CannedBrowsingDataIndexedDBHelper();
~CannedBrowsingDataIndexedDBHelper() override;
std::set<PendingIndexedDBInfo> pending_indexed_db_info_;
......
......@@ -92,13 +92,13 @@ class CannedBrowsingDataLocalStorageHelper
const std::set<GURL>& GetLocalStorageInfo() const;
// BrowsingDataLocalStorageHelper implementation.
virtual void StartFetching(
void StartFetching(
const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback)
override;
virtual void DeleteOrigin(const GURL& origin) override;
override;
void DeleteOrigin(const GURL& origin) override;
private:
virtual ~CannedBrowsingDataLocalStorageHelper();
~CannedBrowsingDataLocalStorageHelper() override;
std::set<GURL> pending_local_storage_info_;
......
......@@ -27,14 +27,14 @@ class QuotaManager;
// IO thread, we have to communicate over thread using PostTask.
class BrowsingDataQuotaHelperImpl : public BrowsingDataQuotaHelper {
public:
virtual void StartFetching(const FetchResultCallback& callback) override;
virtual void RevokeHostQuota(const std::string& host) override;
void StartFetching(const FetchResultCallback& callback) override;
void RevokeHostQuota(const std::string& host) override;
private:
BrowsingDataQuotaHelperImpl(base::MessageLoopProxy* ui_thread,
base::MessageLoopProxy* io_thread,
storage::QuotaManager* quota_manager);
virtual ~BrowsingDataQuotaHelperImpl();
~BrowsingDataQuotaHelperImpl() override;
void FetchQuotaInfo();
......
......@@ -250,7 +250,14 @@ class BrowsingDataRemover
// to be deleted by other objects so make destructor private and DeleteHelper
// a friend.
friend class base::DeleteHelper<BrowsingDataRemover>;
virtual ~BrowsingDataRemover();
// When plugins aren't enabled, there is no base class, so adding an override
// specifier would result in a compile error.
#if defined(ENABLE_PLUGINS)
~BrowsingDataRemover() override;
#else
~BrowsingDataRemover();
#endif
// Callback for when TemplateURLService has finished loading. Clears the data,
// clears the respective waiting flag, and invokes NotifyAndDeleteIfDone.
......@@ -261,8 +268,8 @@ class BrowsingDataRemover
#if defined(ENABLE_PLUGINS)
// PepperFlashSettingsManager::Client implementation.
virtual void OnDeauthorizeContentLicensesCompleted(uint32 request_id,
bool success) override;
void OnDeauthorizeContentLicensesCompleted(uint32 request_id,
bool success) override;
#endif
#if defined (OS_CHROMEOS)
......
......@@ -38,7 +38,7 @@ class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest {
public:
BrowsingDataRemoverBrowserTest() {}
virtual void SetUpOnMainThread() override {
void SetUpOnMainThread() override {
base::FilePath path;
PathService::Get(content::DIR_TEST_DATA, &path);
BrowserThread::PostTask(
......
......@@ -14,13 +14,13 @@ class BrowsingDataRemoverCompletionObserver
: public BrowsingDataRemover::Observer {
public:
explicit BrowsingDataRemoverCompletionObserver(BrowsingDataRemover* remover);
virtual ~BrowsingDataRemoverCompletionObserver();
~BrowsingDataRemoverCompletionObserver() override;
void BlockUntilCompletion();
protected:
// BrowsingDataRemover::Observer:
virtual void OnBrowsingDataRemoverDone() override;
void OnBrowsingDataRemoverDone() override;
private:
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
......@@ -32,14 +32,14 @@ class BrowsingDataRemoverCompletionInhibitor
: public BrowsingDataRemover::CompletionInhibitor {
public:
BrowsingDataRemoverCompletionInhibitor();
virtual ~BrowsingDataRemoverCompletionInhibitor();
~BrowsingDataRemoverCompletionInhibitor() override;
void BlockUntilNearCompletion();
void ContinueToCompletion();
protected:
// BrowsingDataRemover::CompletionInhibitor:
virtual void OnBrowsingDataRemoverWouldComplete(
void OnBrowsingDataRemoverWouldComplete(
BrowsingDataRemover* remover,
const base::Closure& continue_to_completion) override;
......
......@@ -133,41 +133,29 @@ struct StoragePartitionRemovalData {
class TestStoragePartition : public StoragePartition {
public:
TestStoragePartition() {}
virtual ~TestStoragePartition() {}
~TestStoragePartition() override {}
// content::StoragePartition implementation.
virtual base::FilePath GetPath() override { return base::FilePath(); }
virtual net::URLRequestContextGetter* GetURLRequestContext() override {
base::FilePath GetPath() override { return base::FilePath(); }
net::URLRequestContextGetter* GetURLRequestContext() override { return NULL; }
net::URLRequestContextGetter* GetMediaURLRequestContext() override {
return NULL;
}
virtual net::URLRequestContextGetter* GetMediaURLRequestContext() override {
return NULL;
}
virtual storage::QuotaManager* GetQuotaManager() override { return NULL; }
virtual content::AppCacheService* GetAppCacheService() override {
return NULL;
}
virtual storage::FileSystemContext* GetFileSystemContext() override {
return NULL;
}
virtual storage::DatabaseTracker* GetDatabaseTracker() override {
return NULL;
}
virtual content::DOMStorageContext* GetDOMStorageContext() override {
return NULL;
}
virtual content::IndexedDBContext* GetIndexedDBContext() override {
return NULL;
}
virtual content::ServiceWorkerContext* GetServiceWorkerContext() override {
storage::QuotaManager* GetQuotaManager() override { return NULL; }
content::AppCacheService* GetAppCacheService() override { return NULL; }
storage::FileSystemContext* GetFileSystemContext() override { return NULL; }
storage::DatabaseTracker* GetDatabaseTracker() override { return NULL; }
content::DOMStorageContext* GetDOMStorageContext() override { return NULL; }
content::IndexedDBContext* GetIndexedDBContext() override { return NULL; }
content::ServiceWorkerContext* GetServiceWorkerContext() override {
return NULL;
}
virtual void ClearDataForOrigin(uint32 remove_mask,
uint32 quota_storage_remove_mask,
const GURL& storage_origin,
net::URLRequestContextGetter* rq_context,
const base::Closure& callback) override {
void ClearDataForOrigin(uint32 remove_mask,
uint32 quota_storage_remove_mask,
const GURL& storage_origin,
net::URLRequestContextGetter* rq_context,
const base::Closure& callback) override {
BrowserThread::PostTask(BrowserThread::UI,
FROM_HERE,
base::Bind(&TestStoragePartition::AsyncRunCallback,
......@@ -175,13 +163,13 @@ class TestStoragePartition : public StoragePartition {
callback));
}
virtual void ClearData(uint32 remove_mask,
uint32 quota_storage_remove_mask,
const GURL& storage_origin,
const OriginMatcherFunction& origin_matcher,
const base::Time begin,
const base::Time end,
const base::Closure& callback) override {
void ClearData(uint32 remove_mask,
uint32 quota_storage_remove_mask,
const GURL& storage_origin,
const OriginMatcherFunction& origin_matcher,
const base::Time begin,
const base::Time end,
const base::Closure& callback) override {
// Store stuff to verify parameters' correctness later.
storage_partition_removal_data_.remove_mask = remove_mask;
storage_partition_removal_data_.quota_storage_remove_mask =
......@@ -317,7 +305,7 @@ class RemoveChannelIDTester : public net::SSLConfigService::Observer {
ssl_config_service_->AddObserver(this);
}
virtual ~RemoveChannelIDTester() {
~RemoveChannelIDTester() override {
ssl_config_service_->RemoveObserver(this);
}
......@@ -361,9 +349,7 @@ class RemoveChannelIDTester : public net::SSLConfigService::Observer {
}
// net::SSLConfigService::Observer implementation:
virtual void OnSSLConfigChanged() override {
ssl_config_changed_count_++;
}
void OnSSLConfigChanged() override { ssl_config_changed_count_++; }
private:
static void GetAllChannelIDsCallback(
......@@ -441,7 +427,7 @@ class RemoveAutofillTester : public autofill::PersonalDataManagerObserver {
personal_data_manager_->AddObserver(this);
}
virtual ~RemoveAutofillTester() {
~RemoveAutofillTester() override {
personal_data_manager_->RemoveObserver(this);
}
......@@ -512,7 +498,7 @@ class RemoveAutofillTester : public autofill::PersonalDataManagerObserver {
}
private:
virtual void OnPersonalDataChanged() override {
void OnPersonalDataChanged() override {
base::MessageLoop::current()->Quit();
}
......@@ -597,25 +583,24 @@ class MockDomainReliabilityService : public DomainReliabilityService {
public:
MockDomainReliabilityService() : clear_count_(0) {}
virtual ~MockDomainReliabilityService() {}
~MockDomainReliabilityService() override {}
virtual scoped_ptr<DomainReliabilityMonitor> CreateMonitor(
scoped_ptr<DomainReliabilityMonitor> CreateMonitor(
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner)
override {
NOTREACHED();
return scoped_ptr<DomainReliabilityMonitor>();
}
virtual void ClearBrowsingData(DomainReliabilityClearMode clear_mode,
const base::Closure& callback) override {
void ClearBrowsingData(DomainReliabilityClearMode clear_mode,
const base::Closure& callback) override {
clear_count_++;
last_clear_mode_ = clear_mode;
callback.Run();
}
virtual void GetWebUIData(
const base::Callback<void(scoped_ptr<base::Value>)>& callback)
const override {
void GetWebUIData(const base::Callback<void(scoped_ptr<base::Value>)>&
callback) const override {
NOTREACHED();
}
......@@ -638,7 +623,7 @@ struct TestingDomainReliabilityServiceFactoryUserData
: context(context),
service(service),
attached(false) {}
virtual ~TestingDomainReliabilityServiceFactoryUserData() {}
~TestingDomainReliabilityServiceFactoryUserData() override {}
content::BrowserContext* const context;
MockDomainReliabilityService* const service;
......@@ -801,9 +786,9 @@ class BrowsingDataRemoverTest : public testing::Test,
}
// content::NotificationObserver implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override {
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override {
DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED);
// We're not taking ownership of the details object, but storing a copy of
......
......@@ -126,12 +126,12 @@ class CannedBrowsingDataServiceWorkerHelper
GetServiceWorkerUsageInfo() const;
// BrowsingDataServiceWorkerHelper methods.
virtual void StartFetching(const base::Callback<void(
void StartFetching(const base::Callback<void(
const std::list<content::ServiceWorkerUsageInfo>&)>& callback) override;
virtual void DeleteServiceWorkers(const GURL& origin) override;
void DeleteServiceWorkers(const GURL& origin) override;
private:
virtual ~CannedBrowsingDataServiceWorkerHelper();
~CannedBrowsingDataServiceWorkerHelper() override;
std::set<PendingServiceWorkerUsageInfo> pending_service_worker_info_;
......
......@@ -148,7 +148,7 @@ class CookieTreeNode : public ui::TreeNode<CookieTreeNode> {
CookieTreeNode() {}
explicit CookieTreeNode(const base::string16& title)
: ui::TreeNode<CookieTreeNode>(title) {}
virtual ~CookieTreeNode() {}
~CookieTreeNode() override {}
// Delete backend storage for this node, and any children nodes. (E.g. delete
// the cookie from CookieMonster, clear the database, and so forth.)
......@@ -173,13 +173,13 @@ class CookieTreeNode : public ui::TreeNode<CookieTreeNode> {
class CookieTreeRootNode : public CookieTreeNode {
public:
explicit CookieTreeRootNode(CookiesTreeModel* model);
virtual ~CookieTreeRootNode();
~CookieTreeRootNode() override;
CookieTreeHostNode* GetOrCreateHostNode(const GURL& url);
// CookieTreeNode methods:
virtual CookiesTreeModel* GetModel() const override;
virtual DetailedInfo GetDetailedInfo() const override;
CookiesTreeModel* GetModel() const override;
DetailedInfo GetDetailedInfo() const override;
private:
CookiesTreeModel* model_;
......@@ -194,10 +194,10 @@ class CookieTreeHostNode : public CookieTreeNode {
static base::string16 TitleForUrl(const GURL& url);
explicit CookieTreeHostNode(const GURL& url);
virtual ~CookieTreeHostNode();
~CookieTreeHostNode() override;
// CookieTreeNode methods:
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
// CookieTreeHostNode methods:
CookieTreeCookiesNode* GetOrCreateCookiesNode();
......@@ -260,11 +260,11 @@ class CookieTreeCookieNode : public CookieTreeNode {
// CookieTreeCookieNode is valid.
explicit CookieTreeCookieNode(
std::list<net::CanonicalCookie>::iterator cookie);
virtual ~CookieTreeCookieNode();
~CookieTreeCookieNode() override;
// CookieTreeNode methods:
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// cookie_ is expected to remain valid as long as the CookieTreeCookieNode is
......@@ -277,9 +277,9 @@ class CookieTreeCookieNode : public CookieTreeNode {
class CookieTreeCookiesNode : public CookieTreeNode {
public:
CookieTreeCookiesNode();
virtual ~CookieTreeCookiesNode();
~CookieTreeCookiesNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddCookieNode(CookieTreeCookieNode* child) {
AddChildSortedByTitle(child);
......@@ -299,10 +299,10 @@ class CookieTreeAppCacheNode : public CookieTreeNode {
explicit CookieTreeAppCacheNode(
const GURL& origin_url,
std::list<content::AppCacheInfo>::iterator appcache_info);
virtual ~CookieTreeAppCacheNode();
~CookieTreeAppCacheNode() override;
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
GURL origin_url_;
......@@ -313,9 +313,9 @@ class CookieTreeAppCacheNode : public CookieTreeNode {
class CookieTreeAppCachesNode : public CookieTreeNode {
public:
CookieTreeAppCachesNode();
virtual ~CookieTreeAppCachesNode();
~CookieTreeAppCachesNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddAppCacheNode(CookieTreeAppCacheNode* child) {
AddChildSortedByTitle(child);
......@@ -335,10 +335,10 @@ class CookieTreeDatabaseNode : public CookieTreeNode {
explicit CookieTreeDatabaseNode(
std::list<BrowsingDataDatabaseHelper::DatabaseInfo>::iterator
database_info);
virtual ~CookieTreeDatabaseNode();
~CookieTreeDatabaseNode() override;
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// database_info_ is expected to remain valid as long as the
......@@ -352,9 +352,9 @@ class CookieTreeDatabaseNode : public CookieTreeNode {
class CookieTreeDatabasesNode : public CookieTreeNode {
public:
CookieTreeDatabasesNode();
virtual ~CookieTreeDatabasesNode();
~CookieTreeDatabasesNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddDatabaseNode(CookieTreeDatabaseNode* child) {
AddChildSortedByTitle(child);
......@@ -374,10 +374,10 @@ class CookieTreeFileSystemNode : public CookieTreeNode {
explicit CookieTreeFileSystemNode(
std::list<BrowsingDataFileSystemHelper::FileSystemInfo>::iterator
file_system_info);
virtual ~CookieTreeFileSystemNode();
~CookieTreeFileSystemNode() override;
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// file_system_info_ expected to remain valid as long as the
......@@ -391,9 +391,9 @@ class CookieTreeFileSystemNode : public CookieTreeNode {
class CookieTreeFileSystemsNode : public CookieTreeNode {
public:
CookieTreeFileSystemsNode();
virtual ~CookieTreeFileSystemsNode();
~CookieTreeFileSystemsNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddFileSystemNode(CookieTreeFileSystemNode* child) {
AddChildSortedByTitle(child);
......@@ -411,11 +411,11 @@ class CookieTreeLocalStorageNode : public CookieTreeNode {
explicit CookieTreeLocalStorageNode(
std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator
local_storage_info);
virtual ~CookieTreeLocalStorageNode();
~CookieTreeLocalStorageNode() override;
// CookieTreeNode methods:
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// local_storage_info_ is expected to remain valid as long as the
......@@ -429,9 +429,9 @@ class CookieTreeLocalStorageNode : public CookieTreeNode {
class CookieTreeLocalStoragesNode : public CookieTreeNode {
public:
CookieTreeLocalStoragesNode();
virtual ~CookieTreeLocalStoragesNode();
~CookieTreeLocalStoragesNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddLocalStorageNode(CookieTreeLocalStorageNode* child) {
AddChildSortedByTitle(child);
......@@ -450,11 +450,11 @@ class CookieTreeSessionStorageNode : public CookieTreeNode {
explicit CookieTreeSessionStorageNode(
std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator
session_storage_info);
virtual ~CookieTreeSessionStorageNode();
~CookieTreeSessionStorageNode() override;
// CookieTreeNode methods:
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// session_storage_info_ is expected to remain valid as long as the
......@@ -468,9 +468,9 @@ class CookieTreeSessionStorageNode : public CookieTreeNode {
class CookieTreeSessionStoragesNode : public CookieTreeNode {
public:
CookieTreeSessionStoragesNode();
virtual ~CookieTreeSessionStoragesNode();
~CookieTreeSessionStoragesNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddSessionStorageNode(CookieTreeSessionStorageNode* child) {
AddChildSortedByTitle(child);
......@@ -488,11 +488,11 @@ class CookieTreeIndexedDBNode : public CookieTreeNode {
explicit CookieTreeIndexedDBNode(
std::list<content::IndexedDBInfo>::iterator
indexed_db_info);
virtual ~CookieTreeIndexedDBNode();
~CookieTreeIndexedDBNode() override;
// CookieTreeNode methods:
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// indexed_db_info_ is expected to remain valid as long as the
......@@ -506,9 +506,9 @@ class CookieTreeIndexedDBNode : public CookieTreeNode {
class CookieTreeIndexedDBsNode : public CookieTreeNode {
public:
CookieTreeIndexedDBsNode();
virtual ~CookieTreeIndexedDBsNode();
~CookieTreeIndexedDBsNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddIndexedDBNode(CookieTreeIndexedDBNode* child) {
AddChildSortedByTitle(child);
......@@ -525,10 +525,10 @@ class CookieTreeQuotaNode : public CookieTreeNode {
// is valid.
explicit CookieTreeQuotaNode(
std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info);
virtual ~CookieTreeQuotaNode();
~CookieTreeQuotaNode() override;
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// quota_info_ is expected to remain valid as long as the CookieTreeQuotaNode
......@@ -547,11 +547,11 @@ class CookieTreeChannelIDNode : public CookieTreeNode {
// CookieTreeChannelIDNode is valid.
explicit CookieTreeChannelIDNode(
net::ChannelIDStore::ChannelIDList::iterator cert);
virtual ~CookieTreeChannelIDNode();
~CookieTreeChannelIDNode() override;
// CookieTreeNode methods:
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// channel_id_ is expected to remain valid as long as the
......@@ -564,9 +564,9 @@ class CookieTreeChannelIDNode : public CookieTreeNode {
class CookieTreeChannelIDsNode : public CookieTreeNode {
public:
CookieTreeChannelIDsNode();
virtual ~CookieTreeChannelIDsNode();
~CookieTreeChannelIDsNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddChannelIDNode(CookieTreeChannelIDNode* child) {
AddChildSortedByTitle(child);
......@@ -583,11 +583,11 @@ class CookieTreeServiceWorkerNode : public CookieTreeNode {
// CookieTreeServiceWorkerNode is valid.
explicit CookieTreeServiceWorkerNode(
std::list<content::ServiceWorkerUsageInfo>::iterator service_worker_info);
virtual ~CookieTreeServiceWorkerNode();
~CookieTreeServiceWorkerNode() override;
// CookieTreeNode methods:
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
// service_worker_info_ is expected to remain valid as long as the
......@@ -600,9 +600,9 @@ class CookieTreeServiceWorkerNode : public CookieTreeNode {
class CookieTreeServiceWorkersNode : public CookieTreeNode {
public:
CookieTreeServiceWorkersNode();
virtual ~CookieTreeServiceWorkersNode();
~CookieTreeServiceWorkersNode() override;
virtual DetailedInfo GetDetailedInfo() const override;
DetailedInfo GetDetailedInfo() const override;
void AddServiceWorkerNode(CookieTreeServiceWorkerNode* child) {
AddChildSortedByTitle(child);
......@@ -616,11 +616,11 @@ class CookieTreeServiceWorkersNode : public CookieTreeNode {
class CookieTreeFlashLSONode : public CookieTreeNode {
public:
explicit CookieTreeFlashLSONode(const std::string& domain);
virtual ~CookieTreeFlashLSONode();
~CookieTreeFlashLSONode() override;
// CookieTreeNode methods:
virtual void DeleteStoredObjects() override;
virtual DetailedInfo GetDetailedInfo() const override;
void DeleteStoredObjects() override;
DetailedInfo GetDetailedInfo() const override;
private:
std::string domain_;
......@@ -634,7 +634,7 @@ class CookiesTreeModel : public ui::TreeNodeModel<CookieTreeNode> {
CookiesTreeModel(LocalDataContainer* data_container,
ExtensionSpecialStoragePolicy* special_storage_policy,
bool group_by_cookie_source);
virtual ~CookiesTreeModel();
~CookiesTreeModel() override;
// Because non-cookie nodes are fetched in a background thread, they are not
// present at the time the Model is created. The Model then notifies its
......@@ -667,12 +667,12 @@ class CookiesTreeModel : public ui::TreeNodeModel<CookieTreeNode> {
// ui::TreeModel methods:
// Returns the set of icons for the nodes in the tree. You only need override
// this if you don't want to use the default folder icons.
virtual void GetIcons(std::vector<gfx::ImageSkia>* icons) override;
void GetIcons(std::vector<gfx::ImageSkia>* icons) override;
// Returns the index of the icon to use for |node|. Return -1 to use the
// default icon. The index is relative to the list of icons returned from
// GetIcons.
virtual int GetIconIndex(ui::TreeModelNode* node) override;
int GetIconIndex(ui::TreeModelNode* node) override;
// CookiesTreeModel methods:
void DeleteAllStoredObjects();
......
......@@ -14,11 +14,11 @@ class MockBrowsingDataAppCacheHelper
explicit MockBrowsingDataAppCacheHelper(
content::BrowserContext* browser_context);
virtual void StartFetching(const base::Closure& completion_callback) override;
virtual void DeleteAppCacheGroup(const GURL& manifest_url) override;
void StartFetching(const base::Closure& completion_callback) override;
void DeleteAppCacheGroup(const GURL& manifest_url) override;
private:
virtual ~MockBrowsingDataAppCacheHelper();
~MockBrowsingDataAppCacheHelper() override;
DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataAppCacheHelper);
};
......
......@@ -17,8 +17,8 @@ class MockBrowsingDataChannelIDHelper
MockBrowsingDataChannelIDHelper();
// BrowsingDataChannelIDHelper methods.
virtual void StartFetching(const FetchResultCallback& callback) override;
virtual void DeleteChannelID(const std::string& server_id) override;
void StartFetching(const FetchResultCallback& callback) override;
void DeleteChannelID(const std::string& server_id) override;
// Adds a channel_id sample.
void AddChannelIDSample(const std::string& server_id);
......@@ -34,7 +34,7 @@ class MockBrowsingDataChannelIDHelper
bool AllDeleted();
private:
virtual ~MockBrowsingDataChannelIDHelper();
~MockBrowsingDataChannelIDHelper() override;
FetchResultCallback callback_;
......
......@@ -18,9 +18,9 @@ class MockBrowsingDataCookieHelper : public BrowsingDataCookieHelper {
net::URLRequestContextGetter* request_context_getter);
// BrowsingDataCookieHelper methods.
virtual void StartFetching(
const net::CookieMonster::GetCookieListCallback &callback) override;
virtual void DeleteCookie(const net::CanonicalCookie& cookie) override;
void StartFetching(
const net::CookieMonster::GetCookieListCallback& callback) override;
void DeleteCookie(const net::CanonicalCookie& cookie) override;
// Adds some cookie samples.
void AddCookieSamples(const GURL& url, const std::string& cookie_line);
......@@ -36,7 +36,7 @@ class MockBrowsingDataCookieHelper : public BrowsingDataCookieHelper {
bool AllDeleted();
private:
virtual ~MockBrowsingDataCookieHelper();
~MockBrowsingDataCookieHelper() override;
net::CookieMonster::GetCookieListCallback callback_;
......
......@@ -19,12 +19,11 @@ class MockBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper {
public:
explicit MockBrowsingDataDatabaseHelper(Profile* profile);
virtual void StartFetching(
const base::Callback<void(const std::list<DatabaseInfo>&)>& callback)
override;
void StartFetching(const base::Callback<void(const std::list<DatabaseInfo>&)>&
callback) override;
virtual void DeleteDatabase(const std::string& origin,
const std::string& name) override;
void DeleteDatabase(const std::string& origin,
const std::string& name) override;
// Adds some DatabaseInfo samples.
void AddDatabaseSamples();
......@@ -44,7 +43,7 @@ class MockBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper {
std::string last_deleted_db_;
private:
virtual ~MockBrowsingDataDatabaseHelper();
~MockBrowsingDataDatabaseHelper() override;
base::Callback<void(const std::list<DatabaseInfo>&)> callback_;
......
......@@ -21,9 +21,10 @@ class MockBrowsingDataFileSystemHelper : public BrowsingDataFileSystemHelper {
explicit MockBrowsingDataFileSystemHelper(Profile* profile);
// BrowsingDataFileSystemHelper implementation.
virtual void StartFetching(const base::Callback<
void(const std::list<FileSystemInfo>&)>& callback) override;
virtual void DeleteFileSystemOrigin(const GURL& origin) override;
void StartFetching(
const base::Callback<void(const std::list<FileSystemInfo>&)>& callback)
override;
void DeleteFileSystemOrigin(const GURL& origin) override;
// Adds a specific filesystem.
void AddFileSystem(const GURL& origin,
......@@ -47,7 +48,7 @@ class MockBrowsingDataFileSystemHelper : public BrowsingDataFileSystemHelper {
GURL last_deleted_origin_;
private:
virtual ~MockBrowsingDataFileSystemHelper();
~MockBrowsingDataFileSystemHelper() override;
base::Callback<void(const std::list<FileSystemInfo>&)> callback_;
......
......@@ -17,9 +17,8 @@ class MockBrowsingDataFlashLSOHelper : public BrowsingDataFlashLSOHelper {
content::BrowserContext* browser_context);
// BrowsingDataFlashLSOHelper implementation:
virtual void StartFetching(
const GetSitesWithFlashDataCallback& callback) override;
virtual void DeleteFlashLSOsForSite(const std::string& site) override;
void StartFetching(const GetSitesWithFlashDataCallback& callback) override;
void DeleteFlashLSOsForSite(const std::string& site) override;
// Adds a domain sample.
void AddFlashLSODomain(const std::string& domain);
......@@ -31,7 +30,7 @@ class MockBrowsingDataFlashLSOHelper : public BrowsingDataFlashLSOHelper {
bool AllDeleted();
private:
virtual ~MockBrowsingDataFlashLSOHelper();
~MockBrowsingDataFlashLSOHelper() override;
GetSitesWithFlashDataCallback callback_;
......
......@@ -36,13 +36,12 @@ class MockBrowsingDataIndexedDBHelper
bool AllDeleted();
// BrowsingDataIndexedDBHelper.
virtual void StartFetching(
const base::Callback<void(const std::list<content::IndexedDBInfo>&)>&
callback) override;
virtual void DeleteIndexedDB(const GURL& origin) override;
void StartFetching(const base::Callback<
void(const std::list<content::IndexedDBInfo>&)>& callback) override;
void DeleteIndexedDB(const GURL& origin) override;
private:
virtual ~MockBrowsingDataIndexedDBHelper();
~MockBrowsingDataIndexedDBHelper() override;
base::Callback<void(const std::list<content::IndexedDBInfo>&)> callback_;
std::map<GURL, bool> origins_;
......
......@@ -21,10 +21,10 @@ class MockBrowsingDataLocalStorageHelper
explicit MockBrowsingDataLocalStorageHelper(Profile* profile);
// BrowsingDataLocalStorageHelper implementation.
virtual void StartFetching(
void StartFetching(
const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback)
override;
virtual void DeleteOrigin(const GURL& origin) override;
override;
void DeleteOrigin(const GURL& origin) override;
// Adds some LocalStorageInfo samples.
void AddLocalStorageSamples();
......@@ -42,7 +42,7 @@ class MockBrowsingDataLocalStorageHelper
GURL last_deleted_origin_;
private:
virtual ~MockBrowsingDataLocalStorageHelper();
~MockBrowsingDataLocalStorageHelper() override;
base::Callback<void(const std::list<LocalStorageInfo>&)> callback_;
......
......@@ -15,8 +15,8 @@ class MockBrowsingDataQuotaHelper : public BrowsingDataQuotaHelper {
public:
explicit MockBrowsingDataQuotaHelper(Profile* profile);
virtual void StartFetching(const FetchResultCallback& callback) override;
virtual void RevokeHostQuota(const std::string& host) override;
void StartFetching(const FetchResultCallback& callback) override;
void RevokeHostQuota(const std::string& host) override;
void AddHost(const std::string& host,
int64 temporary_usage,
......@@ -26,7 +26,7 @@ class MockBrowsingDataQuotaHelper : public BrowsingDataQuotaHelper {
void Notify();
private:
virtual ~MockBrowsingDataQuotaHelper();
~MockBrowsingDataQuotaHelper() override;
FetchResultCallback callback_;
std::list<QuotaInfo> response_;
......
......@@ -36,12 +36,12 @@ class MockBrowsingDataServiceWorkerHelper
bool AllDeleted();
// BrowsingDataServiceWorkerHelper.
virtual void StartFetching(const base::Callback<void(
void StartFetching(const base::Callback<void(
const std::list<content::ServiceWorkerUsageInfo>&)>& callback) override;
virtual void DeleteServiceWorkers(const GURL& origin) override;
void DeleteServiceWorkers(const GURL& origin) override;
private:
virtual ~MockBrowsingDataServiceWorkerHelper();
~MockBrowsingDataServiceWorkerHelper() override;
base::Callback<void(const std::list<content::ServiceWorkerUsageInfo>&)>
callback_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment