OLD | NEW |
(Empty) | |
| 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 |
| 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 namespace DesktopIOSPromotion { |
| 14 |
| 15 class SMSService; |
| 16 |
| 17 class SMSServiceFactory : public BrowserContextKeyedServiceFactory { |
| 18 public: |
| 19 // Get the singleton instance of the factory. |
| 20 static SMSServiceFactory* GetInstance(); |
| 21 |
| 22 // Get the SMSService for |profile|, creating one if needed. |
| 23 static SMSService* GetForProfile(Profile* profile); |
| 24 |
| 25 protected: |
| 26 // Overridden from BrowserContextKeyedServiceFactory. |
| 27 KeyedService* BuildServiceInstanceFor( |
| 28 content::BrowserContext* context) const override; |
| 29 |
| 30 private: |
| 31 friend struct base::DefaultSingletonTraits<SMSServiceFactory>; |
| 32 |
| 33 SMSServiceFactory(); |
| 34 ~SMSServiceFactory() override; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(SMSServiceFactory); |
| 37 }; |
| 38 |
| 39 } // namespace DesktopIOSPromotion |
| 40 |
| 41 #endif // CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_SMS_SERVICE_FACTORY_H_ |
OLD | NEW |