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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 if (prohibit_signout_) { | 196 if (prohibit_signout_) { |
197 DVLOG(1) << "Ignoring attempt to sign out while signout is prohibited"; | 197 DVLOG(1) << "Ignoring attempt to sign out while signout is prohibited"; |
198 return; | 198 return; |
199 } | 199 } |
200 | 200 |
201 ClearTransientSigninData(); | 201 ClearTransientSigninData(); |
202 | 202 |
203 const std::string username = GetAuthenticatedUsername(); | 203 const std::string username = GetAuthenticatedUsername(); |
204 clear_authenticated_username(); | 204 clear_authenticated_username(); |
205 client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); | 205 client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); |
| 206 client_->ClearSigninScopedDeviceId(); |
206 | 207 |
207 // Erase (now) stale information from AboutSigninInternals. | 208 // Erase (now) stale information from AboutSigninInternals. |
208 NotifyDiagnosticsObservers(USERNAME, ""); | 209 NotifyDiagnosticsObservers(USERNAME, ""); |
209 | 210 |
210 // Revoke all tokens before sending signed_out notification, because there | 211 // Revoke all tokens before sending signed_out notification, because there |
211 // may be components that don't listen for token service events when the | 212 // may be components that don't listen for token service events when the |
212 // profile is not connected to an account. | 213 // profile is not connected to an account. |
213 LOG(WARNING) << "Revoking refresh token on server. Reason: sign out, " | 214 LOG(WARNING) << "Revoking refresh token on server. Reason: sign out, " |
214 << "IsSigninAllowed: " << IsSigninAllowed(); | 215 << "IsSigninAllowed: " << IsSigninAllowed(); |
215 token_service_->RevokeAllCredentials(); | 216 token_service_->RevokeAllCredentials(); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 365 |
365 password_.clear(); // Don't need it anymore. | 366 password_.clear(); // Don't need it anymore. |
366 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. | 367 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. |
367 } | 368 } |
368 | 369 |
369 void SigninManager::ProhibitSignout(bool prohibit_signout) { | 370 void SigninManager::ProhibitSignout(bool prohibit_signout) { |
370 prohibit_signout_ = prohibit_signout; | 371 prohibit_signout_ = prohibit_signout; |
371 } | 372 } |
372 | 373 |
373 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } | 374 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } |
OLD | NEW |