Chromium Code Reviews| 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..217049721c284d25680a4dbaf3fd151e35ed09f4 100644 |
| --- a/chrome/browser/signin/force_signin_verifier.h |
| +++ b/chrome/browser/signin/force_signin_verifier.h |
| @@ -15,6 +15,11 @@ |
| #include "net/base/backoff_entry.h" |
| #include "net/base/network_change_notifier.h" |
| +namespace views { |
| +class Widget; |
| +class WidgetDeletionObserver; |
| +} // namespace views |
| + |
| class Profile; |
| class SigninManager; |
| @@ -28,14 +33,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; |
| @@ -60,13 +65,23 @@ 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: |
| + // Close all browser windows. |
| + void CloseWindows(); |
|
Roger Tawa OOO till Jul 10th
2017/06/20 14:17:52
Nit: rename function to CloseAllBrowserWindows() a
zmin
2017/06/20 17:40:32
Done.
|
| + |
| std::unique_ptr<OAuth2TokenService::Request> access_token_request_; |
| +#if !defined(OS_MACOSX) |
| + Profile* profile_; |
| +#endif |
| // Indicates whether the verification is finished successfully or with a |
| // persistent error. |
| bool has_token_verified_; |
| @@ -78,6 +93,12 @@ class ForceSigninVerifier |
| base::Time token_request_time_; |
| + // Window closing timer. |
| + base::OneShotTimer window_close_timer_; |
| + // The widget of dialog. |
|
Roger Tawa OOO till Jul 10th
2017/06/20 14:17:52
Comments here are not very descriptive. I'd remov
zmin
2017/06/20 17:40:32
Done.
|
| + views::Widget* reauth_dialog_; |
| + std::unique_ptr<views::WidgetDeletionObserver> dialog_observer_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ForceSigninVerifier); |
| }; |