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

Unified Diff: chrome/browser/extensions/api/notifications/notifications_api.cc

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (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/extensions/api/notifications/notifications_api.cc
diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc
index 1a2391d99631cd53840aeb0d1f5c3f858b9119ec..5350ba45b49434a7ffaa8d37fd5c7c175efec2b4 100644
--- a/chrome/browser/extensions/api/notifications/notifications_api.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
@@ -85,11 +85,11 @@ class NotificationsApiDelegate : public NotificationDelegate {
DCHECK(api_function_.get());
}
- virtual void Display() override { }
+ void Display() override {}
- virtual void Error() override {}
+ void Error() override {}
- virtual void Close(bool by_user) override {
+ void Close(bool by_user) override {
EventRouter::UserGestureState gesture =
by_user ? EventRouter::USER_GESTURE_ENABLED
: EventRouter::USER_GESTURE_NOT_ENABLED;
@@ -98,19 +98,19 @@ class NotificationsApiDelegate : public NotificationDelegate {
SendEvent(notifications::OnClosed::kEventName, gesture, args.Pass());
}
- virtual void Click() override {
+ void Click() override {
scoped_ptr<base::ListValue> args(CreateBaseEventArgs());
SendEvent(notifications::OnClicked::kEventName,
EventRouter::USER_GESTURE_ENABLED,
args.Pass());
}
- virtual bool HasClickedListener() override {
+ bool HasClickedListener() override {
return EventRouter::Get(profile_)->HasEventListener(
notifications::OnClicked::kEventName);
}
- virtual void ButtonClick(int index) override {
+ void ButtonClick(int index) override {
scoped_ptr<base::ListValue> args(CreateBaseEventArgs());
args->Append(new base::FundamentalValue(index));
SendEvent(notifications::OnButtonClicked::kEventName,
@@ -118,12 +118,10 @@ class NotificationsApiDelegate : public NotificationDelegate {
args.Pass());
}
- virtual std::string id() const override {
- return scoped_id_;
- }
+ std::string id() const override { return scoped_id_; }
private:
- virtual ~NotificationsApiDelegate() {}
+ ~NotificationsApiDelegate() override {}
void SendEvent(const std::string& name,
EventRouter::UserGestureState user_gesture,

Powered by Google App Engine
This is Rietveld 408576698