Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / search / hotword_service_factory.h
blob227a23b1e038472be7213449b0bc4e5deec93026
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_
8 #include "base/memory/singleton.h"
9 #include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h"
11 class BrowserContextKeyedService;
12 class HotwordService;
13 class Profile;
15 // Singleton that owns all HotwordServices and associates them with Profiles.
16 class HotwordServiceFactory : public BrowserContextKeyedServiceFactory {
17 public:
18 // Returns the HotwordService for |profile|.
19 static HotwordService* GetForProfile(Profile* profile);
21 static HotwordServiceFactory* GetInstance();
23 private:
24 friend struct DefaultSingletonTraits<HotwordServiceFactory>;
26 HotwordServiceFactory();
27 virtual ~HotwordServiceFactory();
29 // Overrides from BrowserContextKeyedServiceFactory:
30 virtual void RegisterProfilePrefs(
31 user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
32 virtual content::BrowserContext* GetBrowserContextToUse(
33 content::BrowserContext* context) const OVERRIDE;
34 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
35 content::BrowserContext* profile) const OVERRIDE;
37 DISALLOW_COPY_AND_ASSIGN(HotwordServiceFactory);
40 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_