| Index: chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h
|
| diff --git a/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h b/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h
|
| index 3e377d109120dac21467ac64cfb991ca5d8bca4a..44d47f5333eb55f12dfbdab93bed405e5144300d 100644
|
| --- a/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h
|
| +++ b/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/timer/timer.h"
|
| #include "ui/views/controls/button/button.h"
|
| #include "ui/views/window/dialog_delegate.h"
|
| @@ -32,7 +33,7 @@ class ForcedReauthenticationDialog : public views::DialogDelegateView {
|
| static ForcedReauthenticationDialog* ShowDialog(
|
| Profile* profile,
|
| SigninManager* signin_manager,
|
| - const base::TimeDelta& countdown_duration);
|
| + base::TimeDelta countdown_duration);
|
|
|
| // override views::DialogDelegateView
|
| bool Accept() override;
|
| @@ -45,11 +46,18 @@ class ForcedReauthenticationDialog : public views::DialogDelegateView {
|
| // override views::View
|
| void AddedToWidget() override;
|
|
|
| + // Close the dialog
|
| + void CloseDialog();
|
| +
|
| + base::WeakPtr<ForcedReauthenticationDialog> AsWeakPtr() {
|
| + return weak_factory_.GetWeakPtr();
|
| + }
|
| +
|
| private:
|
| // Show the dialog for |browser|. The dialog will delete itself after closing.
|
| ForcedReauthenticationDialog(Browser* browser,
|
| SigninManager* signin_manager,
|
| - const base::TimeDelta& countdown_duration);
|
| + base::TimeDelta countdown_duration);
|
|
|
| void OnCountDown();
|
| base::TimeDelta GetTimeRemaining() const;
|
| @@ -63,6 +71,8 @@ class ForcedReauthenticationDialog : public views::DialogDelegateView {
|
| // remaining time.
|
| base::RepeatingTimer refresh_timer_;
|
|
|
| + base::WeakPtrFactory<ForcedReauthenticationDialog> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ForcedReauthenticationDialog);
|
| };
|
|
|
|
|