}
// message_center::FakeMessageCenter Overrides
- virtual message_center::Notification* FindVisibleNotificationById(
- const std::string& id) OVERRIDE {
+ message_center::Notification* FindVisibleNotificationById(
+ const std::string& id) override {
if (last_notification.get() && last_notification->id() == id)
return last_notification.get();
return NULL;
}
- virtual void AddNotification(
- scoped_ptr<message_center::Notification> notification) OVERRIDE {
+ void AddNotification(
+ scoped_ptr<message_center::Notification> notification) override {
EXPECT_FALSE(last_notification.get());
last_notification.swap(notification);
add_notification_calls_++;
notifications_with_shown_as_popup_++;
}
- virtual void RemoveNotification(const std::string& id,
- bool by_user) OVERRIDE {
+ void RemoveNotification(const std::string& id, bool by_user) override {
EXPECT_TRUE(last_notification.get());
last_notification.reset();
remove_notification_calls_++;
}
// ExtensionWelcomeNotification::Delegate
- virtual message_center::MessageCenter* GetMessageCenter() OVERRIDE {
+ message_center::MessageCenter* GetMessageCenter() override {
return message_center_.get();
}
- virtual base::Time GetCurrentTime() OVERRIDE {
- return start_time_ + elapsed_time_;
- }
+ base::Time GetCurrentTime() override { return start_time_ + elapsed_time_; }
- virtual void PostTask(
- const tracked_objects::Location& from_here,
- const base::Closure& task) OVERRIDE {
+ void PostTask(const tracked_objects::Location& from_here,
+ const base::Closure& task) override {
EXPECT_TRUE(pending_task_.is_null());
pending_task_ = task;
}
ExtensionWelcomeNotification::RegisterProfilePrefs(pref_registry.get());
}
- virtual void SetUp() {
+ void SetUp() override {
task_runner_ = new base::TestSimpleTaskRunner();
thread_task_runner_handle_.reset(
new base::ThreadTaskRunnerHandle(task_runner_));
ExtensionWelcomeNotification::Create(profile_.get(), delegate_));
}
- virtual void TearDown() {
+ void TearDown() override {
delegate_ = NULL;
welcome_notification_.reset();
profile_.reset();
explicit TestNotificationDelegate(const std::string& id) : id_(id) {}
// Overridden from NotificationDelegate:
- virtual void Display() OVERRIDE {}
- virtual void Error() OVERRIDE {}
- virtual void Close(bool by_user) OVERRIDE {}
- virtual void Click() OVERRIDE {}
- virtual void ButtonClick(int index) OVERRIDE {}
-
- virtual std::string id() const OVERRIDE { return id_; }
-
- virtual content::WebContents* GetWebContents() const OVERRIDE {
- return NULL;
- }
+ std::string id() const override { return id_; }
private:
- virtual ~TestNotificationDelegate() {}
+ ~TestNotificationDelegate() override {}
const std::string id_;