| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_FACTORY_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_FACTORY_H_ | 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 10 | 10 |
| 11 namespace local_discovery { | 11 namespace cloud_print { |
| 12 | 12 |
| 13 class PrivetNotificationServiceFactory | 13 class PrivetNotificationServiceFactory |
| 14 : public BrowserContextKeyedServiceFactory { | 14 : public BrowserContextKeyedServiceFactory { |
| 15 public: | 15 public: |
| 16 // Returns singleton instance of PrivetNotificationServiceFactory. | 16 // Returns singleton instance of PrivetNotificationServiceFactory. |
| 17 static PrivetNotificationServiceFactory* GetInstance(); | 17 static PrivetNotificationServiceFactory* GetInstance(); |
| 18 | 18 |
| 19 private: | 19 private: |
| 20 friend struct base::DefaultSingletonTraits<PrivetNotificationServiceFactory>; | 20 friend struct base::DefaultSingletonTraits<PrivetNotificationServiceFactory>; |
| 21 | 21 |
| 22 PrivetNotificationServiceFactory(); | 22 PrivetNotificationServiceFactory(); |
| 23 ~PrivetNotificationServiceFactory() override; | 23 ~PrivetNotificationServiceFactory() override; |
| 24 | 24 |
| 25 // BrowserContextKeyedServiceFactory: | 25 // BrowserContextKeyedServiceFactory: |
| 26 KeyedService* BuildServiceInstanceFor( | 26 KeyedService* BuildServiceInstanceFor( |
| 27 content::BrowserContext* profile) const override; | 27 content::BrowserContext* profile) const override; |
| 28 bool ServiceIsCreatedWithBrowserContext() const override; | 28 bool ServiceIsCreatedWithBrowserContext() const override; |
| 29 bool ServiceIsNULLWhileTesting() const override; | 29 bool ServiceIsNULLWhileTesting() const override; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace local_discovery | 32 } // namespace cloud_print |
| 33 | 33 |
| 34 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_FACTORY_H_ | 34 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_FACTORY_H_ |
| OLD | NEW |