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

Side by Side Diff: extensions/browser/extension_prefs_factory.cc

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « extensions/browser/extension_prefs_factory.h ('k') | extensions/browser/extension_protocols.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "extensions/browser/extension_prefs_factory.h" 5 #include "extensions/browser/extension_prefs_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
(...skipping 14 matching lines...) Expand all
25 GetInstance()->GetServiceForBrowserContext(context, true)); 25 GetInstance()->GetServiceForBrowserContext(context, true));
26 } 26 }
27 27
28 // static 28 // static
29 ExtensionPrefsFactory* ExtensionPrefsFactory::GetInstance() { 29 ExtensionPrefsFactory* ExtensionPrefsFactory::GetInstance() {
30 return base::Singleton<ExtensionPrefsFactory>::get(); 30 return base::Singleton<ExtensionPrefsFactory>::get();
31 } 31 }
32 32
33 void ExtensionPrefsFactory::SetInstanceForTesting( 33 void ExtensionPrefsFactory::SetInstanceForTesting(
34 content::BrowserContext* context, 34 content::BrowserContext* context,
35 scoped_ptr<ExtensionPrefs> prefs) { 35 std::unique_ptr<ExtensionPrefs> prefs) {
36 Disassociate(context); 36 Disassociate(context);
37 Associate(context, std::move(prefs)); 37 Associate(context, std::move(prefs));
38 } 38 }
39 39
40 ExtensionPrefsFactory::ExtensionPrefsFactory() 40 ExtensionPrefsFactory::ExtensionPrefsFactory()
41 : BrowserContextKeyedServiceFactory( 41 : BrowserContextKeyedServiceFactory(
42 "ExtensionPrefs", 42 "ExtensionPrefs",
43 BrowserContextDependencyManager::GetInstance()) { 43 BrowserContextDependencyManager::GetInstance()) {
44 } 44 }
45 45
(...skipping 13 matching lines...) Expand all
59 context), 59 context),
60 prefs_observers); 60 prefs_observers);
61 } 61 }
62 62
63 content::BrowserContext* ExtensionPrefsFactory::GetBrowserContextToUse( 63 content::BrowserContext* ExtensionPrefsFactory::GetBrowserContextToUse(
64 content::BrowserContext* context) const { 64 content::BrowserContext* context) const {
65 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); 65 return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
66 } 66 }
67 67
68 } // namespace extensions 68 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_prefs_factory.h ('k') | extensions/browser/extension_protocols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698