OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_SMS_SERVICE_FACTORY_H_ |
| 6 #define CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_SMS_SERVICE_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/singleton.h" |
| 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 12 |
| 13 class SMSService; |
| 14 |
| 15 class SMSServiceFactory : public BrowserContextKeyedServiceFactory { |
| 16 public: |
| 17 // Get the singleton instance of the factory. |
| 18 static SMSServiceFactory* GetInstance(); |
| 19 |
| 20 // Get the SMSService for |profile|, creating one if needed. |
| 21 static SMSService* GetForProfile(Profile* profile); |
| 22 |
| 23 protected: |
| 24 // Overridden from BrowserContextKeyedServiceFactory. |
| 25 KeyedService* BuildServiceInstanceFor( |
| 26 content::BrowserContext* context) const override; |
| 27 |
| 28 private: |
| 29 friend struct base::DefaultSingletonTraits<SMSServiceFactory>; |
| 30 |
| 31 SMSServiceFactory(); |
| 32 ~SMSServiceFactory() override; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(SMSServiceFactory); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_SMS_SERVICE_FACTORY_H_ |
OLD | NEW |