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

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

Issue 12258036: Properly handle disabling sync via the google dashboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Skip signout on cros. 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_fake.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager_fake.cc
diff --git a/chrome/browser/signin/signin_manager_fake.cc b/chrome/browser/signin/signin_manager_fake.cc
index 6b377c15431a515d4e4df4be372cb9d5faeebb2c..b3c0ab13534cbbc25f8c3e59a53ea56d0ff21e2f 100644
--- a/chrome/browser/signin/signin_manager_fake.cc
+++ b/chrome/browser/signin/signin_manager_fake.cc
@@ -46,6 +46,8 @@ void FakeSigninManager::StartSignInWithOAuth(const std::string& username,
}
void FakeSigninManager::SignOut() {
+ if (IsSignoutProhibited())
+ return;
authenticated_username_.clear();
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
@@ -53,6 +55,12 @@ void FakeSigninManager::SignOut() {
content::NotificationService::NoDetails());
}
+void FakeSigninManager::ForceSignOut() {
+ // Allow signing out now.
+ prohibit_signout_ = false;
+ SignOut();
+}
+
bool FakeSigninManager::AuthInProgress() const {
return auth_in_progress_;
}
« no previous file with comments | « chrome/browser/signin/signin_manager_fake.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698