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

Side by Side Diff: chrome/browser/signin/fake_signin_manager.cc

Issue 980583003: Fix FakeSigninManager::SignOut (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 (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/fake_signin_manager.h" 5 #include "chrome/browser/signin/fake_signin_manager.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/account_tracker_service_factory.h" 10 #include "chrome/browser/signin/account_tracker_service_factory.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 GoogleSigninFailed(error)); 82 GoogleSigninFailed(error));
83 } 83 }
84 84
85 void FakeSigninManager::SignOut( 85 void FakeSigninManager::SignOut(
86 signin_metrics::ProfileSignout signout_source_metric) { 86 signin_metrics::ProfileSignout signout_source_metric) {
87 if (IsSignoutProhibited()) 87 if (IsSignoutProhibited())
88 return; 88 return;
89 set_auth_in_progress(std::string()); 89 set_auth_in_progress(std::string());
90 set_password(std::string()); 90 set_password(std::string());
91 const std::string account_id = GetAuthenticatedAccountId(); 91 const std::string account_id = GetAuthenticatedAccountId();
92 const std::string username = authenticated_username_; 92 const std::string username = GetAuthenticatedUsername();
93 authenticated_username_.clear(); 93 ClearAuthenticatedUsername();
94 94
95 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_, 95 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_,
96 GoogleSignedOut(account_id, username)); 96 GoogleSignedOut(account_id, username));
97 } 97 }
98 98
99 #endif // !defined (OS_CHROMEOS) 99 #endif // !defined (OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698