Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: chrome/browser/signin/force_signin_manager.h

Issue 2442843002: Override SigninManager::SignOut if force-signin is enabled. (Closed)
Patch Set: tommycli's comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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.
Roger Tawa OOO till Jul 10th 2016/10/26 18:25:31 Can you add a comment explaining why this is neede
Roger Tawa OOO till Jul 10th 2016/10/26 18:25:31 If I understood correctly, this is called in only
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698