summaryrefslogtreecommitdiffstats
path: root/components/visitedlink
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-21 04:24:56 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-21 11:25:34 +0000
commit00ea022b81af00857b352bae68d4ba2eb3e1493b (patch)
treeb5e3e536a25f154ab5410d611736832c11b2cfad /components/visitedlink
parent0b0885ca539071e7864061fde54c7345a0fd2aae (diff)
downloadchromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.zip
chromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.tar.gz
chromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.tar.bz2
Standardize usage of virtual/override/final in components/
BUG=417463 TBR=blundell@chromium.org Review URL: https://codereview.chromium.org/666133002 Cr-Commit-Position: refs/heads/master@{#300456}
Diffstat (limited to 'components/visitedlink')
-rw-r--r--components/visitedlink/browser/visitedlink_event_listener.h14
-rw-r--r--components/visitedlink/browser/visitedlink_master.cc6
-rw-r--r--components/visitedlink/browser/visitedlink_master.h2
-rw-r--r--components/visitedlink/renderer/visitedlink_slave.h4
-rw-r--r--components/visitedlink/test/visitedlink_perftest.cc6
-rw-r--r--components/visitedlink/test/visitedlink_unittest.cc27
6 files changed, 29 insertions, 30 deletions
diff --git a/components/visitedlink/browser/visitedlink_event_listener.h b/components/visitedlink/browser/visitedlink_event_listener.h
index 436f76d..2b6aa72 100644
--- a/components/visitedlink/browser/visitedlink_event_listener.h
+++ b/components/visitedlink/browser/visitedlink_event_listener.h
@@ -33,19 +33,19 @@ class VisitedLinkEventListener : public VisitedLinkMaster::Listener,
public:
VisitedLinkEventListener(VisitedLinkMaster* master,
content::BrowserContext* browser_context);
- virtual ~VisitedLinkEventListener();
+ ~VisitedLinkEventListener() override;
- virtual void NewTable(base::SharedMemory* table_memory) override;
- virtual void Add(VisitedLinkMaster::Fingerprint fingerprint) override;
- virtual void Reset() override;
+ void NewTable(base::SharedMemory* table_memory) override;
+ void Add(VisitedLinkMaster::Fingerprint fingerprint) override;
+ void Reset() override;
private:
void CommitVisitedLinks();
// 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;
base::OneShotTimer<VisitedLinkEventListener> coalesce_timer_;
VisitedLinkCommon::Fingerprints pending_visited_links_;
diff --git a/components/visitedlink/browser/visitedlink_master.cc b/components/visitedlink/browser/visitedlink_master.cc
index b02b076..dc59cae 100644
--- a/components/visitedlink/browser/visitedlink_master.cc
+++ b/components/visitedlink/browser/visitedlink_master.cc
@@ -149,11 +149,11 @@ class VisitedLinkMaster::TableBuilder
void DisownMaster();
// VisitedLinkDelegate::URLEnumerator
- virtual void OnURL(const GURL& url) override;
- virtual void OnComplete(bool succeed) override;
+ void OnURL(const GURL& url) override;
+ void OnComplete(bool succeed) override;
private:
- virtual ~TableBuilder() {}
+ ~TableBuilder() override {}
// OnComplete mashals to this function on the main thread to do the
// notification.
diff --git a/components/visitedlink/browser/visitedlink_master.h b/components/visitedlink/browser/visitedlink_master.h
index aff4e49..d154c80 100644
--- a/components/visitedlink/browser/visitedlink_master.h
+++ b/components/visitedlink/browser/visitedlink_master.h
@@ -85,7 +85,7 @@ class VisitedLinkMaster : public VisitedLinkCommon {
bool suppress_rebuild,
const base::FilePath& filename,
int32 default_table_size);
- virtual ~VisitedLinkMaster();
+ ~VisitedLinkMaster() override;
// Must be called immediately after object creation. Nothing else will work
// until this is called. Returns true on success, false means that this
diff --git a/components/visitedlink/renderer/visitedlink_slave.h b/components/visitedlink/renderer/visitedlink_slave.h
index 5131e65..730f789 100644
--- a/components/visitedlink/renderer/visitedlink_slave.h
+++ b/components/visitedlink/renderer/visitedlink_slave.h
@@ -18,10 +18,10 @@ class VisitedLinkSlave : public VisitedLinkCommon,
public content::RenderProcessObserver {
public:
VisitedLinkSlave();
- virtual ~VisitedLinkSlave();
+ ~VisitedLinkSlave() override;
// RenderProcessObserver implementation.
- virtual bool OnControlMessageReceived(const IPC::Message& message) override;
+ bool OnControlMessageReceived(const IPC::Message& message) override;
// Message handlers.
void OnUpdateVisitedLinks(base::SharedMemoryHandle table);
diff --git a/components/visitedlink/test/visitedlink_perftest.cc b/components/visitedlink/test/visitedlink_perftest.cc
index d4dd583..f3d3dca 100644
--- a/components/visitedlink/test/visitedlink_perftest.cc
+++ b/components/visitedlink/test/visitedlink_perftest.cc
@@ -39,9 +39,9 @@ GURL TestURL(const char* prefix, int i) {
class DummyVisitedLinkEventListener : public VisitedLinkMaster::Listener {
public:
DummyVisitedLinkEventListener() {}
- virtual void NewTable(base::SharedMemory* table) override {}
- virtual void Add(VisitedLinkCommon::Fingerprint) override {}
- virtual void Reset() override {}
+ void NewTable(base::SharedMemory* table) override {}
+ void Add(VisitedLinkCommon::Fingerprint) override {}
+ void Reset() override {}
};
diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc
index 8822df6..d41759a 100644
--- a/components/visitedlink/test/visitedlink_unittest.cc
+++ b/components/visitedlink/test/visitedlink_unittest.cc
@@ -54,8 +54,7 @@ std::vector<VisitedLinkSlave*> g_slaves;
class TestVisitedLinkDelegate : public VisitedLinkDelegate {
public:
- virtual void RebuildTable(
- const scoped_refptr<URLEnumerator>& enumerator) override;
+ void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override;
void AddURLForRebuild(const GURL& url);
@@ -80,8 +79,8 @@ class TestURLIterator : public VisitedLinkMaster::URLIterator {
public:
explicit TestURLIterator(const URLs& urls);
- virtual const GURL& NextURL() override;
- virtual bool HasNextURL() const override;
+ const GURL& NextURL() override;
+ bool HasNextURL() const override;
private:
URLs::const_iterator iterator_;
@@ -109,7 +108,7 @@ class TrackingVisitedLinkEventListener : public VisitedLinkMaster::Listener {
: reset_count_(0),
add_count_(0) {}
- virtual void NewTable(base::SharedMemory* table) override {
+ void NewTable(base::SharedMemory* table) override {
if (table) {
for (std::vector<VisitedLinkSlave>::size_type i = 0;
i < g_slaves.size(); i++) {
@@ -119,8 +118,8 @@ class TrackingVisitedLinkEventListener : public VisitedLinkMaster::Listener {
}
}
}
- virtual void Add(VisitedLinkCommon::Fingerprint) override { add_count_++; }
- virtual void Reset() override { reset_count_++; }
+ void Add(VisitedLinkCommon::Fingerprint) override { add_count_++; }
+ void Reset() override { reset_count_++; }
void SetUp() {
reset_count_ = 0;
@@ -536,18 +535,18 @@ class VisitRelayingRenderProcessHost : public MockRenderProcessHost {
content::Source<RenderProcessHost>(this),
content::NotificationService::NoDetails());
}
- virtual ~VisitRelayingRenderProcessHost() {
+ ~VisitRelayingRenderProcessHost() override {
content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
content::Source<content::RenderProcessHost>(this),
content::NotificationService::NoDetails());
}
- virtual void WidgetRestored() override { widgets_++; }
- virtual void WidgetHidden() override { widgets_--; }
- virtual int VisibleWidgetCount() const override { return widgets_; }
+ void WidgetRestored() override { widgets_++; }
+ void WidgetHidden() override { widgets_--; }
+ int VisibleWidgetCount() const override { return widgets_; }
- virtual bool Send(IPC::Message* msg) override {
+ bool Send(IPC::Message* msg) override {
VisitCountingContext* counting_context =
static_cast<VisitCountingContext*>(
GetBrowserContext());
@@ -578,7 +577,7 @@ class VisitedLinkRenderProcessHostFactory
public:
VisitedLinkRenderProcessHostFactory()
: content::RenderProcessHostFactory() {}
- virtual content::RenderProcessHost* CreateRenderProcessHost(
+ content::RenderProcessHost* CreateRenderProcessHost(
content::BrowserContext* browser_context,
content::SiteInstance* site_instance) const override {
return new VisitRelayingRenderProcessHost(browser_context);
@@ -595,7 +594,7 @@ class VisitedLinkEventsTest : public content::RenderViewHostTestHarness {
content::RenderViewHostTestHarness::SetUp();
}
- virtual content::BrowserContext* CreateBrowserContext() override {
+ content::BrowserContext* CreateBrowserContext() override {
VisitCountingContext* context = new VisitCountingContext();
master_.reset(new VisitedLinkMaster(context, &delegate_, true));
master_->Init();