summaryrefslogtreecommitdiffstats
path: root/components/google
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/google
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/google')
-rw-r--r--components/google/core/browser/google_url_tracker.h8
-rw-r--r--components/google/core/browser/google_url_tracker_infobar_delegate.h17
-rw-r--r--components/google/core/browser/google_url_tracker_map_entry.h6
-rw-r--r--components/google/core/browser/google_url_tracker_unittest.cc32
4 files changed, 30 insertions, 33 deletions
diff --git a/components/google/core/browser/google_url_tracker.h b/components/google/core/browser/google_url_tracker.h
index 0c6a80f..aaa2c4b 100644
--- a/components/google/core/browser/google_url_tracker.h
+++ b/components/google/core/browser/google_url_tracker.h
@@ -63,7 +63,7 @@ class GoogleURLTracker
// Only the GoogleURLTrackerFactory and tests should call this.
GoogleURLTracker(scoped_ptr<GoogleURLTrackerClient> client, Mode mode);
- virtual ~GoogleURLTracker();
+ ~GoogleURLTracker() override;
// Returns the current Google homepage URL.
const GURL& google_url() const { return google_url_; }
@@ -128,14 +128,14 @@ class GoogleURLTracker
static const char kSearchDomainCheckURL[];
// net::URLFetcherDelegate:
- virtual void OnURLFetchComplete(const net::URLFetcher* source) override;
+ void OnURLFetchComplete(const net::URLFetcher* source) override;
// NetworkChangeNotifier::IPAddressObserver:
- virtual void OnNetworkChanged(
+ void OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType type) override;
// KeyedService:
- virtual void Shutdown() override;
+ void Shutdown() override;
// Registers consumer interest in getting an updated URL from the server.
// Observe chrome::NOTIFICATION_GOOGLE_URL_UPDATED to be notified when the URL
diff --git a/components/google/core/browser/google_url_tracker_infobar_delegate.h b/components/google/core/browser/google_url_tracker_infobar_delegate.h
index 601b4b3..dac9874 100644
--- a/components/google/core/browser/google_url_tracker_infobar_delegate.h
+++ b/components/google/core/browser/google_url_tracker_infobar_delegate.h
@@ -27,8 +27,8 @@ class GoogleURLTrackerInfoBarDelegate : public ConfirmInfoBarDelegate {
const GURL& search_url);
// ConfirmInfoBarDelegate:
- virtual bool Accept() override;
- virtual bool Cancel() override;
+ bool Accept() override;
+ bool Cancel() override;
GoogleURLTrackerNavigationHelper* navigation_helper() {
return navigation_helper_weak_ptr_;
@@ -54,16 +54,15 @@ class GoogleURLTrackerInfoBarDelegate : public ConfirmInfoBarDelegate {
GoogleURLTrackerInfoBarDelegate(
GoogleURLTracker* google_url_tracker,
const GURL& search_url);
- virtual ~GoogleURLTrackerInfoBarDelegate();
+ ~GoogleURLTrackerInfoBarDelegate() override;
private:
// ConfirmInfoBarDelegate:
- virtual base::string16 GetMessageText() const override;
- virtual base::string16 GetButtonLabel(InfoBarButton button) const override;
- virtual base::string16 GetLinkText() const override;
- virtual bool LinkClicked(WindowOpenDisposition disposition) override;
- virtual bool ShouldExpireInternal(
- const NavigationDetails& details) const override;
+ base::string16 GetMessageText() const override;
+ base::string16 GetButtonLabel(InfoBarButton button) const override;
+ base::string16 GetLinkText() const override;
+ bool LinkClicked(WindowOpenDisposition disposition) override;
+ bool ShouldExpireInternal(const NavigationDetails& details) const override;
GoogleURLTracker* google_url_tracker_;
scoped_ptr<GoogleURLTrackerNavigationHelper> navigation_helper_;
diff --git a/components/google/core/browser/google_url_tracker_map_entry.h b/components/google/core/browser/google_url_tracker_map_entry.h
index bfa3ddc..79c52b7 100644
--- a/components/google/core/browser/google_url_tracker_map_entry.h
+++ b/components/google/core/browser/google_url_tracker_map_entry.h
@@ -47,10 +47,8 @@ class GoogleURLTrackerMapEntry : public infobars::InfoBarManager::Observer {
friend class GoogleURLTrackerTest;
// infobars::InfoBarManager::Observer:
- virtual void OnInfoBarRemoved(infobars::InfoBar* infobar,
- bool animate) override;
- virtual void OnManagerShuttingDown(
- infobars::InfoBarManager* manager) override;
+ void OnInfoBarRemoved(infobars::InfoBar* infobar, bool animate) override;
+ void OnManagerShuttingDown(infobars::InfoBarManager* manager) override;
GoogleURLTracker* const google_url_tracker_;
infobars::InfoBarManager* const infobar_manager_;
diff --git a/components/google/core/browser/google_url_tracker_unittest.cc b/components/google/core/browser/google_url_tracker_unittest.cc
index a95d392..0303d93 100644
--- a/components/google/core/browser/google_url_tracker_unittest.cc
+++ b/components/google/core/browser/google_url_tracker_unittest.cc
@@ -72,13 +72,13 @@ void TestCallbackListener::RegisterCallback(
class TestGoogleURLTrackerClient : public GoogleURLTrackerClient {
public:
explicit TestGoogleURLTrackerClient(PrefService* prefs_);
- virtual ~TestGoogleURLTrackerClient();
+ ~TestGoogleURLTrackerClient() override;
- virtual void SetListeningForNavigationStart(bool listen) override;
- virtual bool IsListeningForNavigationStart() override;
- virtual bool IsBackgroundNetworkingEnabled() override;
- virtual PrefService* GetPrefs() override;
- virtual net::URLRequestContextGetter* GetRequestContext() override;
+ void SetListeningForNavigationStart(bool listen) override;
+ bool IsListeningForNavigationStart() override;
+ bool IsBackgroundNetworkingEnabled() override;
+ PrefService* GetPrefs() override;
+ net::URLRequestContextGetter* GetRequestContext() override;
private:
PrefService* prefs_;
@@ -125,15 +125,15 @@ class TestGoogleURLTrackerNavigationHelper
: public GoogleURLTrackerNavigationHelper {
public:
explicit TestGoogleURLTrackerNavigationHelper(GoogleURLTracker* tracker);
- virtual ~TestGoogleURLTrackerNavigationHelper();
+ ~TestGoogleURLTrackerNavigationHelper() override;
- virtual void SetListeningForNavigationCommit(bool listen) override;
- virtual bool IsListeningForNavigationCommit() override;
- virtual void SetListeningForTabDestruction(bool listen) override;
- virtual bool IsListeningForTabDestruction() override;
- virtual void OpenURL(GURL url,
- WindowOpenDisposition disposition,
- bool user_clicked_on_link) override;
+ void SetListeningForNavigationCommit(bool listen) override;
+ bool IsListeningForNavigationCommit() override;
+ void SetListeningForTabDestruction(bool listen) override;
+ bool IsListeningForTabDestruction() override;
+ void OpenURL(GURL url,
+ WindowOpenDisposition disposition,
+ bool user_clicked_on_link) override;
private:
bool listening_for_nav_commit_;
@@ -181,8 +181,8 @@ void TestGoogleURLTrackerNavigationHelper::OpenURL(
class TestInfoBarManager : public infobars::InfoBarManager {
public:
explicit TestInfoBarManager(int unique_id);
- virtual ~TestInfoBarManager();
- virtual int GetActiveEntryID() override;
+ ~TestInfoBarManager() override;
+ int GetActiveEntryID() override;
private:
int unique_id_;