| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SIGNIN_FORCE_SIGNIN_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_FORCE_SIGNIN_MANAGER_H_ |
| 7 |
| 8 #include "components/signin/core/browser/signin_manager.h" |
| 9 |
| 10 namespace base { |
| 11 class FilePath; |
| 12 } // namespace base |
| 13 |
| 14 class Profile; |
| 15 |
| 16 // Signin Manager when force signin is enabled. |
| 17 class ForceSigninManager : public SigninManager { |
| 18 public: |
| 19 ForceSigninManager(Profile* profile, |
| 20 SigninClient* client, |
| 21 ProfileOAuth2TokenService* token_service, |
| 22 AccountTrackerService* account_tracker_service, |
| 23 GaiaCookieManagerService* cookie_manager_service); |
| 24 ~ForceSigninManager() override; |
| 25 |
| 26 // Close all browser windows before signout. If user abort the closing, the |
| 27 // signout will be aborted too. |
| 28 void SignOut(signin_metrics::ProfileSignout signout_source_metric, |
| 29 signin_metrics::SignoutDelete signout_delete_metric) override; |
| 30 |
| 31 // Return true is force signin policy is enabled. |
| 32 static bool IsForceSigninEnabled(); |
| 33 |
| 34 // Next signout won't open UserManager after all browser windows are closed. |
| 35 static void DisableUserManagerDisplayForNextSignOut( |
| 36 SigninManager* signin_manager); |
| 37 |
| 38 protected: |
| 39 // Signout and lock the profile. |
| 40 virtual void DoSignOut(signin_metrics::ProfileSignout signout_source_metric, |
| 41 signin_metrics::SignoutDelete signout_delete_metric, |
| 42 const base::FilePath& profile_path); |
| 43 // Show UserManager. |
| 44 virtual void ShowUserManager(const base::FilePath& profile_path); |
| 45 |
| 46 private: |
| 47 // Callback after all browser windows are closed successfully. |
| 48 void PostCloseBrowsers(signin_metrics::ProfileSignout signout_source_metric, |
| 49 signin_metrics::SignoutDelete signout_delete_metric, |
| 50 const base::FilePath& profile_path); |
| 51 |
| 52 void SetIsUserManagerDisplayed(bool displayed); |
| 53 |
| 54 Profile* profile_; |
| 55 bool is_user_manager_displayed = true; |
| 56 }; |
| 57 |
| 58 #endif // CHROME_BROWSER_SIGNIN_FORCE_SIGNIN_MANAGER_H_ |
| OLD | NEW |