| Index: chrome/browser/signin/force_signin_verifier.h
|
| diff --git a/chrome/browser/signin/force_signin_verifier.h b/chrome/browser/signin/force_signin_verifier.h
|
| index 03548c03eba884fdc7343e9671601586617852a0..5106beef625ce7f41ed14b794d24458754cc582e 100644
|
| --- a/chrome/browser/signin/force_signin_verifier.h
|
| +++ b/chrome/browser/signin/force_signin_verifier.h
|
| @@ -15,6 +15,7 @@
|
| #include "net/base/backoff_entry.h"
|
| #include "net/base/network_change_notifier.h"
|
|
|
| +class ForcedReauthenticationDialog;
|
| class Profile;
|
| class SigninManager;
|
|
|
| @@ -28,14 +29,14 @@ class ForceSigninVerifier
|
| explicit ForceSigninVerifier(Profile* profile);
|
| ~ForceSigninVerifier() override;
|
|
|
| - // OAuth2TokenService::Consumer implementation
|
| + // override OAuth2TokenService::Consumer
|
| void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
|
| const std::string& access_token,
|
| const base::Time& expiration_time) override;
|
| void OnGetTokenFailure(const OAuth2TokenService::Request* request,
|
| const GoogleServiceAuthError& error) override;
|
|
|
| - // net::NetworkChangeNotifier::NetworkChangeObserver
|
| + // override net::NetworkChangeNotifier::NetworkChangeObserver
|
| void OnNetworkChanged(
|
| net::NetworkChangeNotifier::ConnectionType type) override;
|
|
|
| @@ -45,6 +46,9 @@ class ForceSigninVerifier
|
| // Return the value of |has_token_verified_|.
|
| bool HasTokenBeenVerified();
|
|
|
| + // Abort signout countdown.
|
| + void AbortSignoutCountdownIfExisted();
|
| +
|
| protected:
|
| // Send the token verification request. The request will be sent only if
|
| // - The token has never been verified before.
|
| @@ -60,13 +64,25 @@ class ForceSigninVerifier
|
| // browser window.
|
| virtual void ShowDialog();
|
|
|
| + // Start the window closing countdown, return the duration.
|
| + base::TimeDelta StartCountdown();
|
| +
|
| OAuth2TokenService::Request* GetRequestForTesting();
|
| net::BackoffEntry* GetBackoffEntryForTesting();
|
| base::OneShotTimer* GetOneShotTimerForTesting();
|
| + base::OneShotTimer* GetWindowCloseTimerForTesting();
|
|
|
| private:
|
| + void CloseAllBrowserWindows();
|
| +
|
| std::unique_ptr<OAuth2TokenService::Request> access_token_request_;
|
|
|
| +#if !defined(OS_MACOSX)
|
| + Profile* profile_;
|
| +
|
| + std::unique_ptr<ForcedReauthenticationDialog> dialog_;
|
| +#endif
|
| +
|
| // Indicates whether the verification is finished successfully or with a
|
| // persistent error.
|
| bool has_token_verified_;
|
| @@ -78,6 +94,9 @@ class ForceSigninVerifier
|
|
|
| base::Time token_request_time_;
|
|
|
| + // The countdown of window closing.
|
| + base::OneShotTimer window_close_timer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ForceSigninVerifier);
|
| };
|
|
|
|
|