| 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 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ | 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void AddObserver(Observer* observer); | 66 void AddObserver(Observer* observer); |
| 67 void RemoveObserver(Observer* observer); | 67 void RemoveObserver(Observer* observer); |
| 68 | 68 |
| 69 // Notifies observers of |manager|'s creation. Should be called only by test | 69 // Notifies observers of |manager|'s creation. Should be called only by test |
| 70 // SigninManager subclasses whose construction does not occur in | 70 // SigninManager subclasses whose construction does not occur in |
| 71 // |BuildServiceInstanceFor()|. | 71 // |BuildServiceInstanceFor()|. |
| 72 void NotifyObserversOfSigninManagerCreationForTesting( | 72 void NotifyObserversOfSigninManagerCreationForTesting( |
| 73 SigninManagerBase* manager); | 73 SigninManagerBase* manager); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 friend struct DefaultSingletonTraits<SigninManagerFactory>; | 76 friend struct base::DefaultSingletonTraits<SigninManagerFactory>; |
| 77 | 77 |
| 78 SigninManagerFactory(); | 78 SigninManagerFactory(); |
| 79 ~SigninManagerFactory() override; | 79 ~SigninManagerFactory() override; |
| 80 | 80 |
| 81 // List of observers. Checks that list is empty on destruction. | 81 // List of observers. Checks that list is empty on destruction. |
| 82 mutable base::ObserverList<Observer, true> observer_list_; | 82 mutable base::ObserverList<Observer, true> observer_list_; |
| 83 | 83 |
| 84 // BrowserContextKeyedServiceFactory: | 84 // BrowserContextKeyedServiceFactory: |
| 85 KeyedService* BuildServiceInstanceFor( | 85 KeyedService* BuildServiceInstanceFor( |
| 86 content::BrowserContext* profile) const override; | 86 content::BrowserContext* profile) const override; |
| 87 void BrowserContextShutdown(content::BrowserContext* context) override; | 87 void BrowserContextShutdown(content::BrowserContext* context) override; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ | 90 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ |
| OLD | NEW |