Add virtual destructor in SharingDialog

To avoid potential memory leak in the future, we make the destructor
overridable.

Bug: 1029505
Change-Id: I75ac34ceface5a09404bb720528faab5e63b0f14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1945819
Reviewed-by: Richard Knoll <[email protected]>
Commit-Queue: Himanshu Jaju <[email protected]>
Cr-Commit-Position: refs/heads/master@{#720911}
diff --git a/chrome/browser/sharing/sharing_dialog.h b/chrome/browser/sharing/sharing_dialog.h
index 0f4216b..460afdb0 100644
--- a/chrome/browser/sharing/sharing_dialog.h
+++ b/chrome/browser/sharing/sharing_dialog.h
@@ -9,6 +9,8 @@
 // This object is responsible for its own lifetime.
 class SharingDialog {
  public:
+  virtual ~SharingDialog() = default;
+
   // Called to close the dialog and prevent future callbacks into the
   // controller.
   virtual void Hide() = 0;