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

Side by Side Diff: components/signin/core/browser/signin_manager.h

Issue 2442843002: Override SigninManager::SignOut if force-signin is enabled. (Closed)
Patch Set: 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The signin manager encapsulates some functionality tracking 5 // The signin manager encapsulates some functionality tracking
6 // which user is signed in. See SigninManagerBase for full description of 6 // which user is signed in. See SigninManagerBase for full description of
7 // responsibilities. The class defined in this file provides functionality 7 // responsibilities. The class defined in this file provides functionality
8 // required by all platforms except Chrome OS. 8 // required by all platforms except Chrome OS.
9 // 9 //
10 // When a user is signed in, a ClientLogin request is run on their behalf. 10 // When a user is signed in, a ClientLogin request is run on their behalf.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void ProhibitSignout(bool prohibit_signout); 140 void ProhibitSignout(bool prohibit_signout);
141 141
142 // If true, signout is prohibited for this profile (calls to SignOut() are 142 // If true, signout is prohibited for this profile (calls to SignOut() are
143 // ignored). 143 // ignored).
144 bool IsSignoutProhibited() const; 144 bool IsSignoutProhibited() const;
145 145
146 protected: 146 protected:
147 // Flag saying whether signing out is allowed. 147 // Flag saying whether signing out is allowed.
148 bool prohibit_signout_; 148 bool prohibit_signout_;
149 149
150 // The sign out process which is started by SigninClient::PreSignOut()
151 virtual void DoSignOut(signin_metrics::ProfileSignout signout_source_metric,
152 signin_metrics::SignoutDelete signout_delete_metric);
153
150 private: 154 private:
151 enum SigninType { SIGNIN_TYPE_NONE, SIGNIN_TYPE_WITH_REFRESH_TOKEN }; 155 enum SigninType { SIGNIN_TYPE_NONE, SIGNIN_TYPE_WITH_REFRESH_TOKEN };
152 156
153 std::string SigninTypeToString(SigninType type); 157 std::string SigninTypeToString(SigninType type);
154 friend class FakeSigninManager; 158 friend class FakeSigninManager;
155 FRIEND_TEST_ALL_PREFIXES(SigninManagerTest, ClearTransientSigninData); 159 FRIEND_TEST_ALL_PREFIXES(SigninManagerTest, ClearTransientSigninData);
156 FRIEND_TEST_ALL_PREFIXES(SigninManagerTest, ProvideSecondFactorSuccess); 160 FRIEND_TEST_ALL_PREFIXES(SigninManagerTest, ProvideSecondFactorSuccess);
157 FRIEND_TEST_ALL_PREFIXES(SigninManagerTest, ProvideSecondFactorFailure); 161 FRIEND_TEST_ALL_PREFIXES(SigninManagerTest, ProvideSecondFactorFailure);
158 162
159 // If user was signed in, load tokens from DB if available. 163 // If user was signed in, load tokens from DB if available.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 bool user_info_fetched_by_account_tracker_; 241 bool user_info_fetched_by_account_tracker_;
238 242
239 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; 243 base::WeakPtrFactory<SigninManager> weak_pointer_factory_;
240 244
241 DISALLOW_COPY_AND_ASSIGN(SigninManager); 245 DISALLOW_COPY_AND_ASSIGN(SigninManager);
242 }; 246 };
243 247
244 #endif // !defined(OS_CHROMEOS) 248 #endif // !defined(OS_CHROMEOS)
245 249
246 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_H_ 250 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_H_
OLDNEW
« no previous file with comments | « components/signin/core/browser/signin_client.cc ('k') | components/signin/core/browser/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698