OLD | NEW |
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 Loading... |
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) |
OLD | NEW |