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

Unified Diff: chrome/browser/signin/signin_manager.cc

Issue 12310009: Merge 182705 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/signin/signin_manager.h ('k') | chrome/browser/signin/signin_manager_fake.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager.cc
===================================================================
--- chrome/browser/signin/signin_manager.cc (revision 183433)
+++ chrome/browser/signin/signin_manager.cc (working copy)
@@ -196,6 +196,7 @@
SigninManager::SigninManager()
: profile_(NULL),
+ prohibit_signout_(false),
had_two_factor_error_(false),
type_(SIGNIN_TYPE_NONE),
weak_pointer_factory_(this) {
@@ -544,6 +545,10 @@
void SigninManager::SignOut() {
DCHECK(IsInitialized());
+ if (prohibit_signout_) {
+ DVLOG(1) << "Ignoring attempt to sign out while signout is prohibited";
+ return;
+ }
if (authenticated_username_.empty() && !client_login_.get()) {
// Clean up our transient data and exit if we aren't signed in (or in the
// process of signing in). This avoids a perf regression from clearing out
@@ -894,6 +899,14 @@
}
}
+void SigninManager::ProhibitSignout() {
+ prohibit_signout_ = true;
+}
+
+bool SigninManager::IsSignoutProhibited() const {
+ return prohibit_signout_;
+}
+
void SigninManager::OnGoogleServicesUsernamePatternChanged() {
if (!authenticated_username_.empty() &&
!IsAllowedUsername(authenticated_username_)) {
« no previous file with comments | « chrome/browser/signin/signin_manager.h ('k') | chrome/browser/signin/signin_manager_fake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698