Add ability to gather metrics to BubbleManager.
[chromium-blink-merge.git] / chrome / browser / ui / bookmarks / enhanced_bookmark_key_service_factory.h
blob1c9dcaad3a31cc3efcc4f21893adc960dcfaacf9
1 // Copyright 2015 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_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 namespace content {
12 class BrowserContext;
13 } // namespace content
15 namespace base {
16 template <typename T> struct DefaultSingletonTraits;
19 class EnhancedBookmarkKeyService;
21 // Singleton that owns all EnhancedBookmarkKeyServices and associates them with
22 // BrowserContexts.
23 class EnhancedBookmarkKeyServiceFactory
24 : public BrowserContextKeyedServiceFactory {
25 public:
26 static EnhancedBookmarkKeyServiceFactory* GetInstance();
28 private:
29 friend struct base::DefaultSingletonTraits<EnhancedBookmarkKeyServiceFactory>;
31 EnhancedBookmarkKeyServiceFactory();
32 ~EnhancedBookmarkKeyServiceFactory() override;
34 // BrowserContextKeyedServiceFactory:
35 KeyedService* BuildServiceInstanceFor(
36 content::BrowserContext* context) const override;
37 content::BrowserContext* GetBrowserContextToUse(
38 content::BrowserContext* context) const override;
39 bool ServiceIsCreatedWithBrowserContext() const override;
40 bool ServiceIsNULLWhileTesting() const override;
42 DISALLOW_COPY_AND_ASSIGN(EnhancedBookmarkKeyServiceFactory);
45 #endif // CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_