Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / search / suggestions / suggestions_service_factory.h
blob63a6dc32e0bcb4c37e789286dce35075eaf6738f
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_SEARCH_SUGGESTIONS_SUGGESTIONS_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_SEARCH_SUGGESTIONS_SUGGESTIONS_SERVICE_FACTORY_H_
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 class Profile;
13 namespace suggestions {
15 class SuggestionsService;
17 // Singleton that owns all SuggestionsServices and associates them with
18 // Profiles.
19 class SuggestionsServiceFactory : public BrowserContextKeyedServiceFactory {
20 public:
21 // Returns the SuggestionsService for |profile|.
22 static suggestions::SuggestionsService* GetForProfile(Profile* profile);
24 static SuggestionsServiceFactory* GetInstance();
26 private:
27 friend struct DefaultSingletonTraits<SuggestionsServiceFactory>;
29 SuggestionsServiceFactory();
30 ~SuggestionsServiceFactory() override;
32 // Overrides from BrowserContextKeyedServiceFactory:
33 KeyedService* BuildServiceInstanceFor(
34 content::BrowserContext* profile) const override;
35 void RegisterProfilePrefs(
36 user_prefs::PrefRegistrySyncable* registry) override;
38 DISALLOW_COPY_AND_ASSIGN(SuggestionsServiceFactory);
41 } // namespace suggestions
43 #endif // CHROME_BROWSER_SEARCH_SUGGESTIONS_SUGGESTIONS_SERVICE_FACTORY_H_