Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: chrome/browser/extensions/extension_garbage_collector_factory.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
10 10
11 namespace base { 11 namespace base {
12 template <typename T> 12 template <typename T>
13 struct DefaultSingletonTraits; 13 struct DefaultSingletonTraits;
14 } 14 }
15 15
16 class Profile; 16 class Profile;
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 class ExtensionGarbageCollector; 20 class ExtensionGarbageCollector;
21 21
22 class ExtensionGarbageCollectorFactory 22 class ExtensionGarbageCollectorFactory
23 : public BrowserContextKeyedServiceFactory { 23 : public BrowserContextKeyedServiceFactory {
24 public: 24 public:
25 static ExtensionGarbageCollector* GetForBrowserContext( 25 static ExtensionGarbageCollector* GetForBrowserContext(
26 content::BrowserContext* context); 26 content::BrowserContext* context);
27 27
28 static ExtensionGarbageCollectorFactory* GetInstance(); 28 static ExtensionGarbageCollectorFactory* GetInstance();
29 29
30 static scoped_ptr<KeyedService> BuildInstanceFor( 30 static std::unique_ptr<KeyedService> BuildInstanceFor(
31 content::BrowserContext* context); 31 content::BrowserContext* context);
32 32
33 private: 33 private:
34 friend struct base::DefaultSingletonTraits<ExtensionGarbageCollectorFactory>; 34 friend struct base::DefaultSingletonTraits<ExtensionGarbageCollectorFactory>;
35 35
36 ExtensionGarbageCollectorFactory(); 36 ExtensionGarbageCollectorFactory();
37 ~ExtensionGarbageCollectorFactory() override; 37 ~ExtensionGarbageCollectorFactory() override;
38 38
39 // BrowserContextKeyedServiceFactory overrides: 39 // BrowserContextKeyedServiceFactory overrides:
40 KeyedService* BuildServiceInstanceFor( 40 KeyedService* BuildServiceInstanceFor(
41 content::BrowserContext* context) const override; 41 content::BrowserContext* context) const override;
42 42
43 bool ServiceIsCreatedWithBrowserContext() const override; 43 bool ServiceIsCreatedWithBrowserContext() const override;
44 bool ServiceIsNULLWhileTesting() const override; 44 bool ServiceIsNULLWhileTesting() const override;
45 45
46 DISALLOW_COPY_AND_ASSIGN(ExtensionGarbageCollectorFactory); 46 DISALLOW_COPY_AND_ASSIGN(ExtensionGarbageCollectorFactory);
47 }; 47 };
48 48
49 } // namespace extensions 49 } // namespace extensions
50 50
51 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_ 51 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698