From 2f5be41e6ddc25cab9804910999255b539ecff1e Mon Sep 17 00:00:00 2001 From: dcheng Date: Tue, 21 Oct 2014 18:46:08 -0700 Subject: Standardize usage of virtual/override/final in apps/ 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=scheib@chromium.org Review URL: https://codereview.chromium.org/666213002 Cr-Commit-Position: refs/heads/master@{#300609} --- apps/app_restore_service.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'apps/app_restore_service.h') diff --git a/apps/app_restore_service.h b/apps/app_restore_service.h index 5738b05..fec9ed7 100644 --- a/apps/app_restore_service.h +++ b/apps/app_restore_service.h @@ -42,16 +42,14 @@ class AppRestoreService : public KeyedService, private: // AppLifetimeMonitor::Observer. - virtual void OnAppStart(Profile* profile, const std::string& app_id) override; - virtual void OnAppActivated(Profile* profile, - const std::string& app_id) override; - virtual void OnAppDeactivated(Profile* profile, - const std::string& app_id) override; - virtual void OnAppStop(Profile* profile, const std::string& app_id) override; - virtual void OnChromeTerminating() override; + void OnAppStart(Profile* profile, const std::string& app_id) override; + void OnAppActivated(Profile* profile, const std::string& app_id) override; + void OnAppDeactivated(Profile* profile, const std::string& app_id) override; + void OnAppStop(Profile* profile, const std::string& app_id) override; + void OnChromeTerminating() override; // KeyedService. - virtual void Shutdown() override; + void Shutdown() override; void RecordAppStart(const std::string& extension_id); void RecordAppStop(const std::string& extension_id); -- cgit v1.1