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_SEARCH_GOOGLE_SEARCH_PROVIDER_SERVICE_FACTORY_H_ |
| 6 #define CHROME_BROWSER_SEARCH_GOOGLE_SEARCH_PROVIDER_SERVICE_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/singleton.h" |
| 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 11 |
| 12 class GoogleSearchProviderService; |
| 13 class Profile; |
| 14 |
| 15 class GoogleSearchProviderServiceFactory |
| 16 : public BrowserContextKeyedServiceFactory { |
| 17 public: |
| 18 // Returns the GoogleSearchProviderService for |profile|. |
| 19 static GoogleSearchProviderService* GetForProfile(Profile* profile); |
| 20 |
| 21 static GoogleSearchProviderServiceFactory* GetInstance(); |
| 22 |
| 23 private: |
| 24 friend struct base::DefaultSingletonTraits< |
| 25 GoogleSearchProviderServiceFactory>; |
| 26 |
| 27 GoogleSearchProviderServiceFactory(); |
| 28 ~GoogleSearchProviderServiceFactory() override; |
| 29 |
| 30 // Overridden from BrowserContextKeyedServiceFactory: |
| 31 KeyedService* BuildServiceInstanceFor( |
| 32 content::BrowserContext* profile) const override; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(GoogleSearchProviderServiceFactory); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_SEARCH_GOOGLE_SEARCH_PROVIDER_SERVICE_FACTORY_H_ |
OLD | NEW |