| Index: chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc
|
| diff --git a/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc b/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc
|
| index d02b9265849fc78e230351abdbc301786206f4d5..e9a7259b4c5b96a7f3736705d6be0018da46f0af 100644
|
| --- a/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc
|
| +++ b/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/ui/views/profiles/forced_reauthentication_dialog.h"
|
|
|
| +#include <map>
|
| #include <memory>
|
| #include <string>
|
| #include <utility>
|
| @@ -13,6 +14,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/browser_dialogs.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
|
| @@ -85,7 +87,7 @@ class PromptLabel : public views::StyledLabel {
|
| ForcedReauthenticationDialog::ForcedReauthenticationDialog(
|
| Browser* browser,
|
| SigninManager* signin_manager,
|
| - const base::TimeDelta& countdown_duration)
|
| + base::TimeDelta countdown_duration)
|
| : browser_(browser),
|
| signin_manager_(signin_manager),
|
| desired_close_time_(base::TimeTicks::Now() + countdown_duration) {
|
| @@ -102,7 +104,7 @@ ForcedReauthenticationDialog::~ForcedReauthenticationDialog() {}
|
| ForcedReauthenticationDialog* ForcedReauthenticationDialog::ShowDialog(
|
| Profile* profile,
|
| SigninManager* signin_manager,
|
| - const base::TimeDelta& countdown_duration) {
|
| + base::TimeDelta countdown_duration) {
|
| Browser* browser = FindBrowserWithProfile(profile);
|
| if (browser == nullptr) { // If there is no browser, we can just sign
|
| // out profile directly.
|
| @@ -248,3 +250,15 @@ base::TimeDelta ForcedReauthenticationDialog::GetTimeRemaining() const {
|
| return base::TimeDelta();
|
| return desired_close_time_ - now;
|
| }
|
| +
|
| +namespace chrome {
|
| +views::Widget* ShowForcedReauthenticationDialog(
|
| + Profile* profile,
|
| + SigninManager* signin_manager,
|
| + base::TimeDelta countdown_duration) {
|
| + return ForcedReauthenticationDialog::ShowDialog(profile, signin_manager,
|
| + countdown_duration)
|
| + ->GetWidget();
|
| +}
|
| +
|
| +} // namespace chrome
|
|
|