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

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

Issue 196243009: Just some cleanup before I start on the profile name fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/gaia_info_update_service_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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_; }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/gaia_info_update_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698