class TestUndoOperation : public UndoOperation {
public:
explicit TestUndoOperation(TestUndoService* undo_service);
- virtual ~TestUndoOperation();
+ ~TestUndoOperation() override;
// UndoOperation:
- virtual void Undo() OVERRIDE;
- virtual int GetUndoLabelId() const OVERRIDE;
- virtual int GetRedoLabelId() const OVERRIDE;
+ void Undo() override;
+ int GetUndoLabelId() const override;
+ int GetRedoLabelId() const override;
private:
TestUndoService* undo_service_;
}
void TestUndoService::TriggerOperation() {
- scoped_ptr<TestUndoOperation> op(new TestUndoOperation(this));
- undo_manager_.AddUndoOperation(op.PassAs<UndoOperation>());
+ undo_manager_.AddUndoOperation(make_scoped_ptr(new TestUndoOperation(this)));
}
void TestUndoService::RecordUndoCall() {
// Returns the number of state change callbacks
int state_change_count() { return state_change_count_; }
- virtual void OnUndoManagerStateChange() OVERRIDE { ++state_change_count_; }
+ void OnUndoManagerStateChange() override { ++state_change_count_; }
private:
int state_change_count_;