OLD | NEW |
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 #include "components/signin/core/browser/signin_manager.h" | 5 #include "components/signin/core/browser/signin_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 return; | 190 return; |
191 } | 191 } |
192 | 192 |
193 if (prohibit_signout_) { | 193 if (prohibit_signout_) { |
194 DVLOG(1) << "Ignoring attempt to sign out while signout is prohibited"; | 194 DVLOG(1) << "Ignoring attempt to sign out while signout is prohibited"; |
195 return; | 195 return; |
196 } | 196 } |
197 | 197 |
198 ClearTransientSigninData(); | 198 ClearTransientSigninData(); |
199 | 199 |
200 const std::string& username = GetAuthenticatedUsername(); | 200 const std::string username = GetAuthenticatedUsername(); |
201 clear_authenticated_username(); | 201 clear_authenticated_username(); |
202 client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); | 202 client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); |
203 | 203 |
204 // Erase (now) stale information from AboutSigninInternals. | 204 // Erase (now) stale information from AboutSigninInternals. |
205 NotifyDiagnosticsObservers(USERNAME, ""); | 205 NotifyDiagnosticsObservers(USERNAME, ""); |
206 | 206 |
207 // Revoke all tokens before sending signed_out notification, because there | 207 // Revoke all tokens before sending signed_out notification, because there |
208 // may be components that don't listen for token service events when the | 208 // may be components that don't listen for token service events when the |
209 // profile is not connected to an account. | 209 // profile is not connected to an account. |
210 LOG(WARNING) << "Revoking refresh token on server. Reason: sign out, " | 210 LOG(WARNING) << "Revoking refresh token on server. Reason: sign out, " |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 361 |
362 password_.clear(); // Don't need it anymore. | 362 password_.clear(); // Don't need it anymore. |
363 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. | 363 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. |
364 } | 364 } |
365 | 365 |
366 void SigninManager::ProhibitSignout(bool prohibit_signout) { | 366 void SigninManager::ProhibitSignout(bool prohibit_signout) { |
367 prohibit_signout_ = prohibit_signout; | 367 prohibit_signout_ = prohibit_signout; |
368 } | 368 } |
369 | 369 |
370 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } | 370 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } |
OLD | NEW |