Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / extensions / extension_garbage_collector_factory.h
blob000398f3b3eda62d21a2dc6fac4b7550d5888fc1
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_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_
8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
10 namespace base {
11 template <typename T>
12 struct DefaultSingletonTraits;
15 class Profile;
17 namespace extensions {
19 class ExtensionGarbageCollector;
21 class ExtensionGarbageCollectorFactory
22 : public BrowserContextKeyedServiceFactory {
23 public:
24 static ExtensionGarbageCollector* GetForBrowserContext(
25 content::BrowserContext* context);
27 static ExtensionGarbageCollectorFactory* GetInstance();
29 static scoped_ptr<KeyedService> BuildInstanceFor(
30 content::BrowserContext* context);
32 private:
33 friend struct base::DefaultSingletonTraits<ExtensionGarbageCollectorFactory>;
35 ExtensionGarbageCollectorFactory();
36 ~ExtensionGarbageCollectorFactory() override;
38 // BrowserContextKeyedServiceFactory overrides:
39 KeyedService* BuildServiceInstanceFor(
40 content::BrowserContext* context) const override;
42 bool ServiceIsCreatedWithBrowserContext() const override;
43 bool ServiceIsNULLWhileTesting() const override;
45 DISALLOW_COPY_AND_ASSIGN(ExtensionGarbageCollectorFactory);
48 } // namespace extensions
50 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_