Skip to content

Commit

Permalink
udev_watcher: improving Observer class definition
Browse files Browse the repository at this point in the history
OnDeviceAdded() and OnDeviceRemoved() abstract.
destructor being protected.

Change-Id: Ibc348d6565b6d2627ae53a34f05a63c08f68a8e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546308
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#646458}
  • Loading branch information
arskama authored and Commit Bot committed Apr 1, 2019
1 parent 297646a commit 8818e12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions device/udev_linux/udev_watcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ class UdevWatcher {
public:
class Observer {
public:
virtual void OnDeviceAdded(ScopedUdevDevicePtr device) = 0;
virtual void OnDeviceRemoved(ScopedUdevDevicePtr device) = 0;

protected:
virtual ~Observer();
virtual void OnDeviceAdded(ScopedUdevDevicePtr device);
virtual void OnDeviceRemoved(ScopedUdevDevicePtr device);
};

// subsystem and devtype parameter for
Expand Down

0 comments on commit 8818e12

Please sign in to comment.