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/chrome_signin_client_factory.h" | 10 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
11 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 11 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
12 #include "chrome/browser/signin/signin_manager_factory.h" | 12 #include "chrome/browser/signin/signin_manager_factory.h" |
13 #include "chrome/browser/ui/global_error/global_error_service.h" | 13 #include "chrome/browser/ui/global_error/global_error_service.h" |
14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
15 #include "chrome/common/pref_names.h" | |
16 | 15 |
17 FakeSigninManagerBase::FakeSigninManagerBase(Profile* profile) | 16 FakeSigninManagerBase::FakeSigninManagerBase(Profile* profile) |
18 : SigninManagerBase( | 17 : SigninManagerBase( |
19 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile)) {} | 18 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile)) {} |
20 | 19 |
21 FakeSigninManagerBase::~FakeSigninManagerBase() { | 20 FakeSigninManagerBase::~FakeSigninManagerBase() { |
22 } | 21 } |
23 | 22 |
24 // static | 23 // static |
25 KeyedService* FakeSigninManagerBase::Build(content::BrowserContext* context) { | 24 KeyedService* FakeSigninManagerBase::Build(content::BrowserContext* context) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 set_password(std::string()); | 86 set_password(std::string()); |
88 const std::string account_id = GetAuthenticatedAccountId(); | 87 const std::string account_id = GetAuthenticatedAccountId(); |
89 const std::string username = authenticated_username_; | 88 const std::string username = authenticated_username_; |
90 authenticated_username_.clear(); | 89 authenticated_username_.clear(); |
91 | 90 |
92 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_, | 91 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_, |
93 GoogleSignedOut(account_id, username)); | 92 GoogleSignedOut(account_id, username)); |
94 } | 93 } |
95 | 94 |
96 #endif // !defined (OS_CHROMEOS) | 95 #endif // !defined (OS_CHROMEOS) |
OLD | NEW |