Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / apps / shortcut_manager_factory.h
blob1cb6e06f534dd7b5f6908c4d32d671f7771e677a
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_APPS_SHORTCUT_MANAGER_FACTORY_H_
6 #define CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_
8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
10 namespace base {
11 template<typename Type> struct DefaultSingletonTraits;
14 class Profile;
16 class AppShortcutManager;
18 // Singleton that owns all AppShortcutManagers and associates them with
19 // Profiles. Listens for the Profile's destruction notification and cleans up
20 // the associated AppShortcutManager.
21 // AppShortcutManagers should not exist in incognito profiles.
22 class AppShortcutManagerFactory : public BrowserContextKeyedServiceFactory {
23 public:
24 static AppShortcutManager* GetForProfile(Profile* profile);
26 static AppShortcutManagerFactory* GetInstance();
28 private:
29 friend struct base::DefaultSingletonTraits<AppShortcutManagerFactory>;
31 AppShortcutManagerFactory();
32 ~AppShortcutManagerFactory() override;
34 // BrowserContextKeyedServiceFactory:
35 KeyedService* BuildServiceInstanceFor(
36 content::BrowserContext* profile) const override;
37 bool ServiceIsCreatedWithBrowserContext() const override;
38 bool ServiceIsNULLWhileTesting() const override;
41 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_