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

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

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review Created 7 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 | 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_action_manager.h" 5 #include "chrome/browser/extensions/extension_action_manager.h"
6 6
7 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage r.h" 7 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage r.h"
8 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage r_factory.h" 8 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage r_factory.h"
9 #include "chrome/browser/extensions/extension_action.h" 9 #include "chrome/browser/extensions/extension_action.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 26 matching lines...) Expand all
37 37
38 private: 38 private:
39 friend struct DefaultSingletonTraits<ExtensionActionManagerFactory>; 39 friend struct DefaultSingletonTraits<ExtensionActionManagerFactory>;
40 40
41 ExtensionActionManagerFactory() 41 ExtensionActionManagerFactory()
42 : ProfileKeyedServiceFactory("ExtensionActionManager", 42 : ProfileKeyedServiceFactory("ExtensionActionManager",
43 ProfileDependencyManager::GetInstance()) { 43 ProfileDependencyManager::GetInstance()) {
44 } 44 }
45 45
46 virtual ProfileKeyedService* BuildServiceInstanceFor( 46 virtual ProfileKeyedService* BuildServiceInstanceFor(
47 Profile* profile) const OVERRIDE { 47 content::BrowserContext* profile) const OVERRIDE {
48 return new ExtensionActionManager(profile); 48 return new ExtensionActionManager(static_cast<Profile*>(profile));
49 } 49 }
50 50
51 virtual bool ServiceRedirectedInIncognito() const OVERRIDE { 51 virtual bool ServiceRedirectedInIncognito() const OVERRIDE {
52 return true; 52 return true;
53 } 53 }
54 }; 54 };
55 55
56 ExtensionActionManagerFactory* 56 ExtensionActionManagerFactory*
57 ExtensionActionManagerFactory::GetInstance() { 57 ExtensionActionManagerFactory::GetInstance() {
58 return Singleton<ExtensionActionManagerFactory>::get(); 58 return Singleton<ExtensionActionManagerFactory>::get();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 ExtensionAction* ExtensionActionManager::GetScriptBadge( 161 ExtensionAction* ExtensionActionManager::GetScriptBadge(
162 const extensions::Extension& extension) const { 162 const extensions::Extension& extension) const {
163 return GetOrCreateOrNull(&script_badges_, extension.id(), 163 return GetOrCreateOrNull(&script_badges_, extension.id(),
164 ActionInfo::TYPE_SCRIPT_BADGE, 164 ActionInfo::TYPE_SCRIPT_BADGE,
165 ActionInfo::GetScriptBadgeInfo(&extension)); 165 ActionInfo::GetScriptBadgeInfo(&extension));
166 } 166 }
167 167
168 } // namespace extensions 168 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698