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

Side by Side Diff: chrome/browser/signin/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: Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/signin/signin_manager.h" 5 #include "chrome/browser/signin/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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return; 245 return;
246 } 246 }
247 247
248 if (prohibit_signout_) { 248 if (prohibit_signout_) {
249 DVLOG(1) << "Ignoring attempt to sign out while signout is prohibited"; 249 DVLOG(1) << "Ignoring attempt to sign out while signout is prohibited";
250 return; 250 return;
251 } 251 }
252 252
253 ClearTransientSigninData(); 253 ClearTransientSigninData();
254 254
255 const std::string& username = GetAuthenticatedUsername(); 255 const std::string username = GetAuthenticatedUsername();
256 clear_authenticated_username(); 256 clear_authenticated_username();
257 profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); 257 profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername);
258 258
259 // Erase (now) stale information from AboutSigninInternals. 259 // Erase (now) stale information from AboutSigninInternals.
260 NotifyDiagnosticsObservers(USERNAME, ""); 260 NotifyDiagnosticsObservers(USERNAME, "");
261 261
262 // Revoke all tokens before sending signed_out notification, because there 262 // Revoke all tokens before sending signed_out notification, because there
263 // may be components that don't listen for token service events when the 263 // may be components that don't listen for token service events when the
264 // profile is not connected to an account. 264 // profile is not connected to an account.
265 ProfileOAuth2TokenService* token_service = 265 ProfileOAuth2TokenService* token_service =
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 signin_host_id_ = ChildProcessHost::kInvalidUniqueID; 464 signin_host_id_ = ChildProcessHost::kInvalidUniqueID;
465 } 465 }
466 466
467 void SigninManager::ProhibitSignout(bool prohibit_signout) { 467 void SigninManager::ProhibitSignout(bool prohibit_signout) {
468 prohibit_signout_ = prohibit_signout; 468 prohibit_signout_ = prohibit_signout;
469 } 469 }
470 470
471 bool SigninManager::IsSignoutProhibited() const { 471 bool SigninManager::IsSignoutProhibited() const {
472 return prohibit_signout_; 472 return prohibit_signout_;
473 } 473 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698