Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: ui/base/cocoa/menu_controller_unittest.mm

Issue 667923002: Standardize usage of virtual/override/final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/accelerators/platform_accelerator_cocoa.h ('k') | ui/base/default_theme_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/menu_controller_unittest.mm
diff --git a/ui/base/cocoa/menu_controller_unittest.mm b/ui/base/cocoa/menu_controller_unittest.mm
index 161bf28bbed7f898edebfdf5147634ee6c19521c..36b0e1308d76c9acfd3d864ffdd42952e8205c40 100644
--- a/ui/base/cocoa/menu_controller_unittest.mm
+++ b/ui/base/cocoa/menu_controller_unittest.mm
@@ -39,21 +39,20 @@ class Delegate : public SimpleMenuModel::Delegate {
did_close_(false) {
}
- virtual bool IsCommandIdChecked(int command_id) const override {
- return false;
- }
- virtual bool IsCommandIdEnabled(int command_id) const override {
+ bool IsCommandIdChecked(int command_id) const override { return false; }
+ bool IsCommandIdEnabled(int command_id) const override {
++enable_count_;
return true;
}
- virtual bool GetAcceleratorForCommandId(
- int command_id,
- Accelerator* accelerator) override { return false; }
- virtual void ExecuteCommand(int command_id, int event_flags) override {
+ bool GetAcceleratorForCommandId(int command_id,
+ Accelerator* accelerator) override {
+ return false;
+ }
+ void ExecuteCommand(int command_id, int event_flags) override {
++execute_count_;
}
- virtual void MenuWillShow(SimpleMenuModel* /*source*/) override {
+ void MenuWillShow(SimpleMenuModel* /*source*/) override {
EXPECT_FALSE(did_show_);
EXPECT_FALSE(did_close_);
did_show_ = true;
@@ -66,7 +65,7 @@ class Delegate : public SimpleMenuModel::Delegate {
inModes:modes];
}
- virtual void MenuClosed(SimpleMenuModel* /*source*/) override {
+ void MenuClosed(SimpleMenuModel* /*source*/) override {
EXPECT_TRUE(did_show_);
EXPECT_FALSE(did_close_);
did_close_ = true;
@@ -86,15 +85,11 @@ class Delegate : public SimpleMenuModel::Delegate {
class DynamicDelegate : public Delegate {
public:
DynamicDelegate() {}
- virtual bool IsItemForCommandIdDynamic(int command_id) const override {
- return true;
- }
- virtual base::string16 GetLabelForCommandId(int command_id) const override {
+ bool IsItemForCommandIdDynamic(int command_id) const override { return true; }
+ base::string16 GetLabelForCommandId(int command_id) const override {
return label_;
}
- virtual bool GetIconForCommandId(
- int command_id,
- gfx::Image* icon) const override {
+ bool GetIconForCommandId(int command_id, gfx::Image* icon) const override {
if (icon_.IsEmpty()) {
return false;
} else {
@@ -120,8 +115,8 @@ class FontListMenuModel : public SimpleMenuModel {
font_list_(font_list),
index_(index) {
}
- virtual ~FontListMenuModel() {}
- virtual const gfx::FontList* GetLabelFontListAt(int index) const override {
+ ~FontListMenuModel() override {}
+ const gfx::FontList* GetLabelFontListAt(int index) const override {
return (index == index_) ? font_list_ : NULL;
}
« no previous file with comments | « ui/base/accelerators/platform_accelerator_cocoa.h ('k') | ui/base/default_theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698