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

Side by Side Diff: chrome/browser/extensions/extension_system_factory.cc

Issue 13865012: Change GetProfileToUse method from Profile to content::BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/extensions/extension_system_factory.h" 5 #include "chrome/browser/extensions/extension_system_factory.h"
6 6
7 #include "chrome/browser/extensions/extension_prefs.h" 7 #include "chrome/browser/extensions/extension_prefs.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_dependency_manager.h" 12 #include "chrome/browser/profiles/profile_dependency_manager.h"
12 #include "chrome/browser/themes/theme_service_factory.h" 13 #include "chrome/browser/themes/theme_service_factory.h"
13 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 14 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
14 15
15 namespace extensions { 16 namespace extensions {
16 17
17 // ExtensionSystemSharedFactory 18 // ExtensionSystemSharedFactory
18 19
19 // static 20 // static
(...skipping 19 matching lines...) Expand all
39 } 40 }
40 41
41 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { 42 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() {
42 } 43 }
43 44
44 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( 45 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor(
45 content::BrowserContext* profile) const { 46 content::BrowserContext* profile) const {
46 return new ExtensionSystemImpl::Shared(static_cast<Profile*>(profile)); 47 return new ExtensionSystemImpl::Shared(static_cast<Profile*>(profile));
47 } 48 }
48 49
49 bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() const { 50 content::BrowserContext* ExtensionSystemSharedFactory::GetBrowserContextToUse(
50 return true; 51 content::BrowserContext* context) const {
52 return chrome::GetBrowserContextRedirectedInIncognito(context);
51 } 53 }
52 54
53 // ExtensionSystemFactory 55 // ExtensionSystemFactory
54 56
55 // static 57 // static
56 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) { 58 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) {
57 return static_cast<ExtensionSystem*>( 59 return static_cast<ExtensionSystem*>(
58 GetInstance()->GetServiceForProfile(profile, true)); 60 GetInstance()->GetServiceForProfile(profile, true));
59 } 61 }
60 62
(...skipping 10 matching lines...) Expand all
71 } 73 }
72 74
73 ExtensionSystemFactory::~ExtensionSystemFactory() { 75 ExtensionSystemFactory::~ExtensionSystemFactory() {
74 } 76 }
75 77
76 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor( 78 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor(
77 content::BrowserContext* profile) const { 79 content::BrowserContext* profile) const {
78 return new ExtensionSystemImpl(static_cast<Profile*>(profile)); 80 return new ExtensionSystemImpl(static_cast<Profile*>(profile));
79 } 81 }
80 82
81 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const { 83 content::BrowserContext* ExtensionSystemSharedFactory::GetBrowserContextToUse(
Jói 2013/05/02 17:10:52 ExtensionSystemSharedFactory -> ExtensionSystemFac
Paweł Hajdan Jr. 2013/05/03 17:34:41 Done.
82 return true; 84 content::BrowserContext* context) const {
85 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
83 } 86 }
84 87
85 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const { 88 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const {
86 return true; 89 return true;
87 } 90 }
88 91
89 } // namespace extensions 92 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698