| Index: chrome/browser/ui/views/profiles/force_signout_dialog.h | 
| diff --git a/chrome/browser/ui/views/profiles/force_signout_dialog.h b/chrome/browser/ui/views/profiles/force_signout_dialog.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..a863a756786cb30ebf81b23ae2863c0f8ec87d4f | 
| --- /dev/null | 
| +++ b/chrome/browser/ui/views/profiles/force_signout_dialog.h | 
| @@ -0,0 +1,58 @@ | 
| +// Copyright 2017 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_H_ | 
| +#define CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_H_ | 
| + | 
| +#include <string> | 
| + | 
| +#include "base/callback.h" | 
| +#include "base/macros.h" | 
| + | 
| +class ForceSignoutDialogView; | 
| +class Profile; | 
| +class SigninManager; | 
| + | 
| +// A modal dialog that displays a warning message of the auth failure | 
| +// before signing the user out and closing browser windows. | 
| +class ForceSignoutDialog { | 
| + public: | 
| +  // Show the warning dialog on the browser window that is belonged to the | 
| +  // |profile|. Sign out the profile directly if there is no opened browser | 
| +  // window or tabs. | 
| +  // Sign out the profile if user confirmed the window or sign out the profile | 
| +  // with a delay if signout_timer is set. | 
| +  static void ShowDialog(Profile* profile, | 
| +                         SigninManager* signin_manager, | 
| +                         const base::Closure& signout_timer); | 
| + | 
| +  // Activate the modal dialog. | 
| +  static void ActivateModalDialog(); | 
| + | 
| +  // Return true if modal dialog is visible. | 
| +  static bool IsShowing(); | 
| + | 
| +  // Return true if SignoutTimer is set. | 
| +  bool IsDelayAllowed(); | 
| +  void OnAccept(); | 
| +  void OnCancel(); | 
| +  std::string GetEmail(); | 
| +  void OnViewClosing(); | 
| + | 
| +  ForceSignoutDialog(SigninManager* signin_manager, | 
| +                     const base::Closure& signout_timer); | 
| +  ~ForceSignoutDialog(); | 
| + | 
| +  static ForceSignoutDialogView* GetDialogViewForTesting(); | 
| + | 
| + private: | 
| +  SigninManager* signin_manager_; | 
| +  const base::Closure signout_timer_; | 
| + | 
| +  static ForceSignoutDialogView* dialog_view_; | 
| + | 
| +  DISALLOW_COPY_AND_ASSIGN(ForceSignoutDialog); | 
| +}; | 
| + | 
| +#endif  // CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_H_ | 
|  |