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/signin_manager_fake.h" | 5 #include "chrome/browser/signin/signin_manager_fake.h" |
6 | 6 |
7 #include "chrome/common/chrome_notification_types.h" | 7 #include "chrome/common/chrome_notification_types.h" |
8 #include "content/public/browser/notification_service.h" | 8 #include "content/public/browser/notification_service.h" |
9 | 9 |
10 FakeSigninManager::FakeSigninManager(Profile* profile) { | 10 FakeSigninManager::FakeSigninManager(Profile* profile) { |
(...skipping 15 matching lines...) Expand all Loading... |
26 const std::string& password) { | 26 const std::string& password) { |
27 SetAuthenticatedUsername(username); | 27 SetAuthenticatedUsername(username); |
28 } | 28 } |
29 | 29 |
30 void FakeSigninManager::StartSignInWithOAuth(const std::string& username, | 30 void FakeSigninManager::StartSignInWithOAuth(const std::string& username, |
31 const std::string& password) { | 31 const std::string& password) { |
32 SetAuthenticatedUsername(username); | 32 SetAuthenticatedUsername(username); |
33 } | 33 } |
34 | 34 |
35 void FakeSigninManager::SignOut() { | 35 void FakeSigninManager::SignOut() { |
| 36 content::NotificationService::current()->Notify( |
| 37 chrome::NOTIFICATION_GOOGLE_WILL_SIGN_OUT, |
| 38 content::Source<Profile>(profile_), |
| 39 content::NotificationService::NoDetails()); |
36 authenticated_username_.clear(); | 40 authenticated_username_.clear(); |
37 content::NotificationService::current()->Notify( | 41 content::NotificationService::current()->Notify( |
38 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, | 42 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, |
39 content::Source<Profile>(profile_), | 43 content::Source<Profile>(profile_), |
40 content::NotificationService::NoDetails()); | 44 content::NotificationService::NoDetails()); |
41 } | 45 } |
42 | 46 |
43 // static | 47 // static |
44 ProfileKeyedService* FakeSigninManager::Build(Profile* profile) { | 48 ProfileKeyedService* FakeSigninManager::Build(Profile* profile) { |
45 return new FakeSigninManager(profile); | 49 return new FakeSigninManager(profile); |
46 } | 50 } |
OLD | NEW |