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

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

Issue 89253002: Remove ExtensionPrefFactory's dependency on Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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 2013 The Chromium Authors. All rights reserved. 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 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_toolbar_model_factory.h" 5 #include "chrome/browser/extensions/extension_toolbar_model_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_prefs_factory.h" 8 #include "chrome/browser/extensions/extension_prefs_factory.h"
9 #include "chrome/browser/extensions/extension_toolbar_model.h" 9 #include "chrome/browser/extensions/extension_toolbar_model.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 17 matching lines...) Expand all
28 "ExtensionToolbarModel", 28 "ExtensionToolbarModel",
29 BrowserContextDependencyManager::GetInstance()) { 29 BrowserContextDependencyManager::GetInstance()) {
30 DependsOn(extensions::ExtensionPrefsFactory::GetInstance()); 30 DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
31 } 31 }
32 32
33 ExtensionToolbarModelFactory::~ExtensionToolbarModelFactory() {} 33 ExtensionToolbarModelFactory::~ExtensionToolbarModelFactory() {}
34 34
35 BrowserContextKeyedService* 35 BrowserContextKeyedService*
36 ExtensionToolbarModelFactory::BuildServiceInstanceFor( 36 ExtensionToolbarModelFactory::BuildServiceInstanceFor(
37 content::BrowserContext* context) const { 37 content::BrowserContext* context) const {
38 Profile* profile = Profile::FromBrowserContext(context);
39 return new ExtensionToolbarModel( 38 return new ExtensionToolbarModel(
40 profile, 39 Profile::FromBrowserContext(context),
41 extensions::ExtensionPrefsFactory::GetForProfile(profile)); 40 extensions::ExtensionPrefsFactory::GetForBrowserContext(context));
42 } 41 }
43 42
44 content::BrowserContext* ExtensionToolbarModelFactory::GetBrowserContextToUse( 43 content::BrowserContext* ExtensionToolbarModelFactory::GetBrowserContextToUse(
45 content::BrowserContext* context) const { 44 content::BrowserContext* context) const {
46 return chrome::GetBrowserContextRedirectedInIncognito(context); 45 return chrome::GetBrowserContextRedirectedInIncognito(context);
47 } 46 }
48 47
49 bool ExtensionToolbarModelFactory::ServiceIsCreatedWithBrowserContext() const { 48 bool ExtensionToolbarModelFactory::ServiceIsCreatedWithBrowserContext() const {
50 return true; 49 return true;
51 } 50 }
52 51
53 bool ExtensionToolbarModelFactory::ServiceIsNULLWhileTesting() const { 52 bool ExtensionToolbarModelFactory::ServiceIsNULLWhileTesting() const {
54 return true; 53 return true;
55 } 54 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.h ('k') | extensions/browser/extensions_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698