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

Unified Diff: chrome/browser/notifications/message_center_notifications_browsertest.cc

Issue 667283002: Standardize usage of virtual/override/final in chrome/browser/notifications (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
Index: chrome/browser/notifications/message_center_notifications_browsertest.cc
diff --git a/chrome/browser/notifications/message_center_notifications_browsertest.cc b/chrome/browser/notifications/message_center_notifications_browsertest.cc
index 87c00c4d5293df5f1c281fec7420853129af6d84..e11f90693970a0c14e7b26e71321eeee91dd38ee 100644
--- a/chrome/browser/notifications/message_center_notifications_browsertest.cc
+++ b/chrome/browser/notifications/message_center_notifications_browsertest.cc
@@ -29,16 +29,16 @@ class TestAddObserver : public message_center::MessageCenterObserver {
message_center_->AddObserver(this);
}
- virtual ~TestAddObserver() { message_center_->RemoveObserver(this); }
+ ~TestAddObserver() override { message_center_->RemoveObserver(this); }
- virtual void OnNotificationAdded(const std::string& id) override {
+ void OnNotificationAdded(const std::string& id) override {
std::string log = logs_[id];
if (log != "")
log += "_";
logs_[id] = log + "add-" + id;
}
- virtual void OnNotificationUpdated(const std::string& id) override {
+ void OnNotificationUpdated(const std::string& id) override {
std::string log = logs_[id];
if (log != "")
log += "_";
@@ -72,23 +72,23 @@ class MessageCenterNotificationsTest : public InProcessBrowserTest {
public:
explicit TestDelegate(const std::string& id) : id_(id) {}
- virtual void Display() override { log_ += "Display_"; }
- virtual void Error() override { log_ += "Error_"; }
- virtual void Close(bool by_user) override {
+ void Display() override { log_ += "Display_"; }
+ void Error() override { log_ += "Error_"; }
+ void Close(bool by_user) override {
log_ += "Close_";
log_ += ( by_user ? "by_user_" : "programmatically_");
}
- virtual void Click() override { log_ += "Click_"; }
- virtual void ButtonClick(int button_index) override {
+ void Click() override { log_ += "Click_"; }
+ void ButtonClick(int button_index) override {
log_ += "ButtonClick_";
log_ += base::IntToString(button_index) + "_";
}
- virtual std::string id() const override { return id_; }
+ std::string id() const override { return id_; }
const std::string& log() { return log_; }
private:
- virtual ~TestDelegate() {}
+ ~TestDelegate() override {}
std::string id_;
std::string log_;

Powered by Google App Engine
This is Rietveld 408576698