summaryrefslogtreecommitdiffstats
path: root/ash/shell_unittest.cc
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-27 16:57:05 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-27 23:58:04 +0000
commit1f4538e02ae35659abf7f9468639a1045924af50 (patch)
tree1e076638bbebe64689099c5ea5bd82bfa9c6b9aa /ash/shell_unittest.cc
parente19d49ab07f57c16eb6685e7394ac4902e53382c (diff)
downloadchromium_src-1f4538e02ae35659abf7f9468639a1045924af50.zip
chromium_src-1f4538e02ae35659abf7f9468639a1045924af50.tar.gz
chromium_src-1f4538e02ae35659abf7f9468639a1045924af50.tar.bz2
Standardize usage of virtual/override/final specifiers.
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=derat@chromium.org Review URL: https://codereview.chromium.org/680153002 Cr-Commit-Position: refs/heads/master@{#301490}
Diffstat (limited to 'ash/shell_unittest.cc')
-rw-r--r--ash/shell_unittest.cc40
1 files changed, 13 insertions, 27 deletions
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index 160d295..ab09f9a 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -92,21 +92,15 @@ void ExpectAllContainers() {
class ModalWindow : public views::WidgetDelegateView {
public:
ModalWindow() {}
- virtual ~ModalWindow() {}
+ ~ModalWindow() override {}
// Overridden from views::WidgetDelegate:
- virtual views::View* GetContentsView() override {
- return this;
- }
- virtual bool CanResize() const override {
- return true;
- }
- virtual base::string16 GetWindowTitle() const override {
+ views::View* GetContentsView() override { return this; }
+ bool CanResize() const override { return true; }
+ base::string16 GetWindowTitle() const override {
return base::ASCIIToUTF16("Modal Window");
}
- virtual ui::ModalType GetModalType() const override {
- return ui::MODAL_TYPE_SYSTEM;
- }
+ ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_SYSTEM; }
private:
DISALLOW_COPY_AND_ASSIGN(ModalWindow);
@@ -115,24 +109,18 @@ class ModalWindow : public views::WidgetDelegateView {
class SimpleMenuDelegate : public ui::SimpleMenuModel::Delegate {
public:
SimpleMenuDelegate() {}
- virtual ~SimpleMenuDelegate() {}
+ ~SimpleMenuDelegate() override {}
- virtual bool IsCommandIdChecked(int command_id) const override {
- return false;
- }
+ bool IsCommandIdChecked(int command_id) const override { return false; }
- virtual bool IsCommandIdEnabled(int command_id) const override {
- return true;
- }
+ bool IsCommandIdEnabled(int command_id) const override { return true; }
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- ui::Accelerator* accelerator) override {
+ bool GetAcceleratorForCommandId(int command_id,
+ ui::Accelerator* accelerator) override {
return false;
}
- virtual void ExecuteCommand(int command_id, int event_flags) override {
- }
+ void ExecuteCommand(int command_id, int event_flags) override {}
private:
DISALLOW_COPY_AND_ASSIGN(SimpleMenuDelegate);
@@ -279,9 +267,7 @@ class TestModalDialogDelegate : public views::DialogDelegateView {
TestModalDialogDelegate() {}
// Overridden from views::WidgetDelegate:
- virtual ui::ModalType GetModalType() const override {
- return ui::MODAL_TYPE_SYSTEM;
- }
+ ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_SYSTEM; }
};
TEST_F(ShellTest, CreateLockScreenModalWindow) {
@@ -525,7 +511,7 @@ TEST_F(ShellTest, EnvPreTargetHandler) {
class ShellTest2 : public test::AshTestBase {
public:
ShellTest2() {}
- virtual ~ShellTest2() {}
+ ~ShellTest2() override {}
protected:
scoped_ptr<aura::Window> window_;