app_shell: Add version number in user agent
[chromium-blink-merge.git] / chrome / browser / ui / tabs / pinned_tab_service_factory.h
blob5fa0585c048120d2b425056cd9bcaa826fd69611
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.
5 #ifndef CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_FACTORY_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 class PinnedTabService;
13 class Profile;
15 // Singleton that owns all PinnedTabServices and associates them with Profiles.
16 // Listens for the Profile's destruction notification and cleans up the
17 // associated PinnedTabService.
18 class PinnedTabServiceFactory : public BrowserContextKeyedServiceFactory {
19 public:
20 // Returns the PinnedTabService that tracks pinning changes for |profile|.
21 static PinnedTabService* GetForProfile(Profile* profile);
23 static PinnedTabServiceFactory* GetInstance();
25 private:
26 friend struct DefaultSingletonTraits<PinnedTabServiceFactory>;
28 PinnedTabServiceFactory();
29 virtual ~PinnedTabServiceFactory();
31 // BrowserContextKeyedServiceFactory:
32 virtual KeyedService* BuildServiceInstanceFor(
33 content::BrowserContext* profile) const OVERRIDE;
34 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
35 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
38 #endif // CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_FACTORY_H_