summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/api')
-rw-r--r--chrome/browser/extensions/api/api_resource_manager.h2
-rw-r--r--chrome/browser/extensions/api/autotest_private/autotest_private_api.h2
-rw-r--r--chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.cc11
-rw-r--r--chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.h8
-rw-r--r--chrome/browser/extensions/api/bluetooth/bluetooth_api.h4
-rw-r--r--chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.cc11
-rw-r--r--chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h8
-rw-r--r--chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/bookmarks/bookmarks_api.h2
-rw-r--r--chrome/browser/extensions/api/cookies/cookies_api.h2
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.h4
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api_factory.cc11
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api_factory.h8
-rw-r--r--chrome/browser/extensions/api/dial/dial_api.cc2
-rw-r--r--chrome/browser/extensions/api/dial/dial_api.h10
-rw-r--r--chrome/browser/extensions/api/dial/dial_api_factory.cc10
-rw-r--r--chrome/browser/extensions/api/dial/dial_api_factory.h12
-rw-r--r--chrome/browser/extensions/api/discovery/suggested_links_registry.h2
-rw-r--r--chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc12
-rw-r--r--chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h10
-rw-r--r--chrome/browser/extensions/api/history/history_api.h2
-rw-r--r--chrome/browser/extensions/api/identity/experimental_identity_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/identity/identity_apitest.cc3
-rw-r--r--chrome/browser/extensions/api/idle/idle_api_unittest.cc3
-rw-r--r--chrome/browser/extensions/api/idle/idle_manager.h4
-rw-r--r--chrome/browser/extensions/api/idle/idle_manager_factory.cc11
-rw-r--r--chrome/browser/extensions/api/idle/idle_manager_factory.h8
-rw-r--r--chrome/browser/extensions/api/managed_mode_private/managed_mode_private_api.h2
-rw-r--r--chrome/browser/extensions/api/management/management_api.h2
-rw-r--r--chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h2
-rw-r--r--chrome/browser/extensions/api/preference/preference_api.h2
-rw-r--r--chrome/browser/extensions/api/processes/processes_api.h2
-rw-r--r--chrome/browser/extensions/api/profile_keyed_api_factory.h34
-rw-r--r--chrome/browser/extensions/api/push_messaging/push_messaging_api.h2
-rw-r--r--chrome/browser/extensions/api/storage/settings_test_util.cc2
-rw-r--r--chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h4
-rw-r--r--chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.cc10
-rw-r--r--chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.h7
-rw-r--r--chrome/browser/extensions/api/system_indicator/system_indicator_manager.h4
-rw-r--r--chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.cc10
-rw-r--r--chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h8
-rw-r--r--chrome/browser/extensions/api/system_info/system_info_api.h2
-rw-r--r--chrome/browser/extensions/api/tab_capture/tab_capture_registry.h2
-rw-r--r--chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.cc11
-rw-r--r--chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.h10
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_windows_api.h2
-rw-r--r--chrome/browser/extensions/api/web_navigation/web_navigation_api.h2
47 files changed, 152 insertions, 134 deletions
diff --git a/chrome/browser/extensions/api/api_resource_manager.h b/chrome/browser/extensions/api/api_resource_manager.h
index 14e3e01..bfa923a 100644
--- a/chrome/browser/extensions/api/api_resource_manager.h
+++ b/chrome/browser/extensions/api/api_resource_manager.h
@@ -24,7 +24,7 @@ namespace extensions {
// An ApiResourceManager manages the lifetime of a set of resources that
// ApiFunctions use. Examples are sockets or USB connections.
template <class T>
-class ApiResourceManager : public ProfileKeyedService,
+class ApiResourceManager : public BrowserContextKeyedService,
public base::NonThreadSafe,
public content::NotificationObserver {
public:
diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
index d55955c..bc0c0a2 100644
--- a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
+++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
@@ -55,7 +55,7 @@ class AutotestPrivateLoginStatusFunction: public SyncExtensionFunction {
void SetAutotestPrivateTest();
// The profile-keyed service that manages the autotestPrivate extension API.
-class AutotestPrivateAPI : public ProfileKeyedService {
+class AutotestPrivateAPI : public BrowserContextKeyedService {
public:
AutotestPrivateAPI();
diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.cc b/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.cc
index e2f1883..aef3874 100644
--- a/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.cc
+++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.cc
@@ -15,7 +15,7 @@ namespace extensions {
// static
AutotestPrivateAPI* AutotestPrivateAPIFactory::GetForProfile(Profile* profile) {
return static_cast<AutotestPrivateAPI*>(GetInstance()->
- GetServiceForProfile(profile, true));
+ GetServiceForBrowserContext(profile, true));
}
// static
@@ -24,15 +24,16 @@ AutotestPrivateAPIFactory* AutotestPrivateAPIFactory::GetInstance() {
}
AutotestPrivateAPIFactory::AutotestPrivateAPIFactory()
- : ProfileKeyedServiceFactory("AutotestPrivateAPI",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "AutotestPrivateAPI",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
AutotestPrivateAPIFactory::~AutotestPrivateAPIFactory() {
}
-ProfileKeyedService* AutotestPrivateAPIFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService* AutotestPrivateAPIFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return new AutotestPrivateAPI();
}
@@ -42,7 +43,7 @@ content::BrowserContext* AutotestPrivateAPIFactory::GetBrowserContextToUse(
return chrome::GetBrowserContextRedirectedInIncognito(context);
}
-bool AutotestPrivateAPIFactory::ServiceIsCreatedWithProfile() const {
+bool AutotestPrivateAPIFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}
diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.h b/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.h
index 9c3cf28..a960504 100644
--- a/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.h
+++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api_factory.h
@@ -13,7 +13,7 @@ class Profile;
namespace extensions {
class AutotestPrivateAPI;
-class AutotestPrivateAPIFactory : public ProfileKeyedServiceFactory {
+class AutotestPrivateAPIFactory : public BrowserContextKeyedServiceFactory {
public:
static AutotestPrivateAPI* GetForProfile(Profile* profile);
@@ -25,12 +25,12 @@ class AutotestPrivateAPIFactory : public ProfileKeyedServiceFactory {
AutotestPrivateAPIFactory();
virtual ~AutotestPrivateAPIFactory();
- // ProfileKeyedBaseFactory implementation.
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedBaseFactory implementation.
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
index d80a39f..f97cf95 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.h
@@ -30,7 +30,7 @@ namespace extensions {
class ExtensionBluetoothEventRouter;
// The profile-keyed service that manages the bluetooth extension API.
-class BluetoothAPI : public ProfileKeyedService,
+class BluetoothAPI : public BrowserContextKeyedService,
public EventRouter::Observer {
public:
// Convenience method to get the BluetoothAPI for a profile.
@@ -41,7 +41,7 @@ class BluetoothAPI : public ProfileKeyedService,
ExtensionBluetoothEventRouter* bluetooth_event_router();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// EventRouter::Observer implementation.
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.cc
index 00f0cf6..71a3a4b 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.cc
@@ -15,7 +15,7 @@ namespace extensions {
// static
BluetoothAPI* BluetoothAPIFactory::GetForProfile(Profile* profile) {
return static_cast<BluetoothAPI*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -24,15 +24,16 @@ BluetoothAPIFactory* BluetoothAPIFactory::GetInstance() {
}
BluetoothAPIFactory::BluetoothAPIFactory()
- : ProfileKeyedServiceFactory("BluetoothAPI",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "BluetoothAPI",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
BluetoothAPIFactory::~BluetoothAPIFactory() {
}
-ProfileKeyedService* BluetoothAPIFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService* BluetoothAPIFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return new BluetoothAPI(static_cast<Profile*>(profile));
}
@@ -42,7 +43,7 @@ content::BrowserContext* BluetoothAPIFactory::GetBrowserContextToUse(
return chrome::GetBrowserContextRedirectedInIncognito(context);
}
-bool BluetoothAPIFactory::ServiceIsCreatedWithProfile() const {
+bool BluetoothAPIFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h b/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h
index 6181224..cd5662c 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h
@@ -14,7 +14,7 @@ namespace extensions {
class BluetoothAPI;
-class BluetoothAPIFactory : public ProfileKeyedServiceFactory {
+class BluetoothAPIFactory : public BrowserContextKeyedServiceFactory {
public:
static BluetoothAPI* GetForProfile(Profile* profile);
@@ -26,12 +26,12 @@ class BluetoothAPIFactory : public ProfileKeyedServiceFactory {
BluetoothAPIFactory();
virtual ~BluetoothAPIFactory();
- // ProfileKeyedServiceFactory implementation.
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory implementation.
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc
index 8c2599d..b5a3446 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc
@@ -70,7 +70,7 @@ class FakeExtensionSystem : public extensions::TestExtensionSystem {
DISALLOW_COPY_AND_ASSIGN(FakeExtensionSystem);
};
-ProfileKeyedService* BuildFakeExtensionSystem(
+BrowserContextKeyedService* BuildFakeExtensionSystem(
content::BrowserContext* profile) {
return new FakeExtensionSystem(static_cast<Profile*>(profile));
}
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
index b8bb199..638828a 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
@@ -75,7 +75,7 @@ class BookmarksAPI : public ProfileKeyedAPI,
explicit BookmarksAPI(Profile* profile);
virtual ~BookmarksAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.h b/chrome/browser/extensions/api/cookies/cookies_api.h
index 4fd944c..ef6ae38 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.h
+++ b/chrome/browser/extensions/api/cookies/cookies_api.h
@@ -199,7 +199,7 @@ class CookiesAPI : public ProfileKeyedAPI,
explicit CookiesAPI(Profile* profile);
virtual ~CookiesAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h
index dd1687a..2f2d41a 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -55,7 +55,7 @@ typedef std::vector<linked_ptr<developer::ItemInspectView> >
namespace extensions {
// The profile-keyed service that manages the DeveloperPrivate API.
-class DeveloperPrivateAPI : public ProfileKeyedService,
+class DeveloperPrivateAPI : public BrowserContextKeyedService,
public content::NotificationObserver {
public:
// Convenience method to get the DeveloperPrivateAPI for a profile.
@@ -70,7 +70,7 @@ class DeveloperPrivateAPI : public ProfileKeyedService,
return last_unpacked_directory_;
}
- // ProfileKeyedService implementation
+ // BrowserContextKeyedService implementation
virtual void Shutdown() OVERRIDE;
// content::NotificationObserver implementation.
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api_factory.cc b/chrome/browser/extensions/api/developer_private/developer_private_api_factory.cc
index fd12543..f365430 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api_factory.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api_factory.cc
@@ -16,7 +16,7 @@ namespace extensions {
DeveloperPrivateAPI* DeveloperPrivateAPIFactory::GetForProfile(
Profile* profile) {
return static_cast<DeveloperPrivateAPI*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -25,15 +25,16 @@ DeveloperPrivateAPIFactory* DeveloperPrivateAPIFactory::GetInstance() {
}
DeveloperPrivateAPIFactory::DeveloperPrivateAPIFactory()
- : ProfileKeyedServiceFactory("DeveloperPrivateAPI",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "DeveloperPrivateAPI",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
DeveloperPrivateAPIFactory::~DeveloperPrivateAPIFactory() {
}
-ProfileKeyedService* DeveloperPrivateAPIFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService* DeveloperPrivateAPIFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return new DeveloperPrivateAPI(static_cast<Profile*>(profile));
}
@@ -43,7 +44,7 @@ content::BrowserContext* DeveloperPrivateAPIFactory::GetBrowserContextToUse(
return chrome::GetBrowserContextRedirectedInIncognito(context);
}
-bool DeveloperPrivateAPIFactory::ServiceIsCreatedWithProfile() const {
+bool DeveloperPrivateAPIFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api_factory.h b/chrome/browser/extensions/api/developer_private/developer_private_api_factory.h
index dfe4044..9d7d157 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api_factory.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api_factory.h
@@ -16,7 +16,7 @@ class DeveloperPrivateAPI;
// This is a singleton class which holds profileKeyed references to
// DeveloperPrivateAPI class.
-class DeveloperPrivateAPIFactory : public ProfileKeyedServiceFactory {
+class DeveloperPrivateAPIFactory : public BrowserContextKeyedServiceFactory {
public:
static DeveloperPrivateAPI* GetForProfile(Profile* profile);
@@ -28,12 +28,12 @@ class DeveloperPrivateAPIFactory : public ProfileKeyedServiceFactory {
DeveloperPrivateAPIFactory();
virtual ~DeveloperPrivateAPIFactory();
- // ProfileKeyedServiceFactory implementation.
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory implementation.
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc
index 8ec81c3..5bb271c 100644
--- a/chrome/browser/extensions/api/dial/dial_api.cc
+++ b/chrome/browser/extensions/api/dial/dial_api.cc
@@ -35,7 +35,7 @@ const size_t kDialMaxDevices = 256;
namespace extensions {
DialAPI::DialAPI(Profile* profile)
- : RefcountedProfileKeyedService(content::BrowserThread::IO),
+ : RefcountedBrowserContextKeyedService(content::BrowserThread::IO),
profile_(profile) {
ExtensionSystem::Get(profile)->event_router()->RegisterObserver(
this, extensions::event_names::kOnDialDeviceList);
diff --git a/chrome/browser/extensions/api/dial/dial_api.h b/chrome/browser/extensions/api/dial/dial_api.h
index 8a36044..74e284e 100644
--- a/chrome/browser/extensions/api/dial/dial_api.h
+++ b/chrome/browser/extensions/api/dial/dial_api.h
@@ -17,11 +17,11 @@ namespace extensions {
class DialRegistry;
-// Dial API which is a ref-counted ProfileKeyedService that manages the DIAL
-// registry. It takes care of creating the registry on the IO thread and
-// is an observer of the registry. It makes sure devices events are sent out
+// Dial API which is a ref-counted BrowserContextKeyedService that manages
+// the DIAL registry. It takes care of creating the registry on the IO thread
+// and is an observer of the registry. It makes sure devices events are sent out
// to extension listeners on the right thread.
-class DialAPI : public RefcountedProfileKeyedService,
+class DialAPI : public RefcountedBrowserContextKeyedService,
public EventRouter::Observer,
public DialRegistry::Observer {
public:
@@ -39,7 +39,7 @@ class DialAPI : public RefcountedProfileKeyedService,
private:
virtual ~DialAPI();
- // RefcountedProfileKeyedService:
+ // RefcountedBrowserContextKeyedService:
virtual void ShutdownOnUIThread() OVERRIDE;
// EventRouter::Observer:
diff --git a/chrome/browser/extensions/api/dial/dial_api_factory.cc b/chrome/browser/extensions/api/dial/dial_api_factory.cc
index 33dc740..8b11002 100644
--- a/chrome/browser/extensions/api/dial/dial_api_factory.cc
+++ b/chrome/browser/extensions/api/dial/dial_api_factory.cc
@@ -13,7 +13,7 @@ namespace extensions {
// static
scoped_refptr<DialAPI> DialAPIFactory::GetForProfile(Profile* profile) {
return static_cast<DialAPI*>(
- GetInstance()->GetServiceForProfile(profile, true).get());
+ GetInstance()->GetServiceForBrowserContext(profile, true).get());
}
// static
@@ -21,21 +21,21 @@ DialAPIFactory* DialAPIFactory::GetInstance() {
return Singleton<DialAPIFactory>::get();
}
-DialAPIFactory::DialAPIFactory() : RefcountedProfileKeyedServiceFactory(
- "DialAPI", ProfileDependencyManager::GetInstance()) {
+DialAPIFactory::DialAPIFactory() : RefcountedBrowserContextKeyedServiceFactory(
+ "DialAPI", BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
DialAPIFactory::~DialAPIFactory() {
}
-scoped_refptr<RefcountedProfileKeyedService>
+scoped_refptr<RefcountedBrowserContextKeyedService>
DialAPIFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return scoped_refptr<DialAPI>(new DialAPI(static_cast<Profile*>(profile)));
}
-bool DialAPIFactory::ServiceIsCreatedWithProfile() const {
+bool DialAPIFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}
diff --git a/chrome/browser/extensions/api/dial/dial_api_factory.h b/chrome/browser/extensions/api/dial/dial_api_factory.h
index ecce597..39a25cd 100644
--- a/chrome/browser/extensions/api/dial/dial_api_factory.h
+++ b/chrome/browser/extensions/api/dial/dial_api_factory.h
@@ -8,11 +8,13 @@
#include "base/memory/singleton.h"
#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service_factory.h"
+class Profile;
+
namespace extensions {
class DialAPI;
-class DialAPIFactory : public RefcountedProfileKeyedServiceFactory {
+class DialAPIFactory : public RefcountedBrowserContextKeyedServiceFactory {
public:
static scoped_refptr<DialAPI> GetForProfile(Profile* profile);
@@ -24,10 +26,10 @@ class DialAPIFactory : public RefcountedProfileKeyedServiceFactory {
DialAPIFactory();
virtual ~DialAPIFactory();
- // ProfileKeyedServiceFactory:
- virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
- content::BrowserContext* profile) const OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ // BrowserContextKeyedServiceFactory:
+ virtual scoped_refptr<RefcountedBrowserContextKeyedService>
+ BuildServiceInstanceFor(content::BrowserContext* profile) const OVERRIDE;
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(DialAPIFactory);
diff --git a/chrome/browser/extensions/api/discovery/suggested_links_registry.h b/chrome/browser/extensions/api/discovery/suggested_links_registry.h
index 89b119d..a0ebb17 100644
--- a/chrome/browser/extensions/api/discovery/suggested_links_registry.h
+++ b/chrome/browser/extensions/api/discovery/suggested_links_registry.h
@@ -15,7 +15,7 @@ namespace extensions {
// This class keeps track of links suggested by an extension using the discovery
// API.
-class SuggestedLinksRegistry : public ProfileKeyedService {
+class SuggestedLinksRegistry : public BrowserContextKeyedService {
public:
// A list of ExtensionSuggestedLink's.
typedef std::vector<linked_ptr<extensions::SuggestedLink> > SuggestedLinkList;
diff --git a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc
index 33ae3da..f392999 100644
--- a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc
+++ b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc
@@ -16,7 +16,7 @@ namespace extensions {
SuggestedLinksRegistry* SuggestedLinksRegistryFactory::GetForProfile(
Profile* profile) {
return static_cast<SuggestedLinksRegistry*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -24,20 +24,22 @@ SuggestedLinksRegistryFactory* SuggestedLinksRegistryFactory::GetInstance() {
return Singleton<SuggestedLinksRegistryFactory>::get();
}
-bool SuggestedLinksRegistryFactory::ServiceIsCreatedWithProfile() const {
+bool SuggestedLinksRegistryFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}
SuggestedLinksRegistryFactory::SuggestedLinksRegistryFactory()
- : ProfileKeyedServiceFactory("SuggestedLinksRegistry",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "SuggestedLinksRegistry",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
SuggestedLinksRegistryFactory::~SuggestedLinksRegistryFactory() {
}
-ProfileKeyedService* SuggestedLinksRegistryFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService*
+SuggestedLinksRegistryFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return new SuggestedLinksRegistry();
}
diff --git a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h
index 3ec5413..1637b60 100644
--- a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h
+++ b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h
@@ -15,14 +15,14 @@ namespace extensions {
class SuggestedLinksRegistry;
// Singleton that associate SuggestedLinksRegistry objects with Profiles.
-class SuggestedLinksRegistryFactory : public ProfileKeyedServiceFactory {
+class SuggestedLinksRegistryFactory : public BrowserContextKeyedServiceFactory {
public:
static SuggestedLinksRegistry* GetForProfile(Profile* profile);
static SuggestedLinksRegistryFactory* GetInstance();
- // Overridden from ProfileKeyedBaseFactory:
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ // Overridden from BrowserContextKeyedBaseFactory:
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
private:
friend struct DefaultSingletonTraits<SuggestedLinksRegistryFactory>;
@@ -30,8 +30,8 @@ class SuggestedLinksRegistryFactory : public ProfileKeyedServiceFactory {
SuggestedLinksRegistryFactory();
virtual ~SuggestedLinksRegistryFactory();
- // ProfileKeyedServiceFactory:
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory:
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE;
diff --git a/chrome/browser/extensions/api/history/history_api.h b/chrome/browser/extensions/api/history/history_api.h
index a93654d..3d2dd04 100644
--- a/chrome/browser/extensions/api/history/history_api.h
+++ b/chrome/browser/extensions/api/history/history_api.h
@@ -60,7 +60,7 @@ class HistoryAPI : public ProfileKeyedAPI,
explicit HistoryAPI(Profile* profile);
virtual ~HistoryAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc b/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc
index 33b60c4..eb9553a 100644
--- a/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc
+++ b/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc
@@ -177,7 +177,7 @@ class TestOAuth2MintTokenFlow : public OAuth2MintTokenFlow {
OAuth2MintTokenFlow::Delegate* delegate_;
};
-ProfileKeyedService* IdentityAPITestFactory(Profile* profile) {
+BrowserContextKeyedService* IdentityAPITestFactory(Profile* profile) {
return new IdentityAPI(profile);
}
diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc
index 3dc060c..b18c138 100644
--- a/chrome/browser/extensions/api/identity/identity_apitest.cc
+++ b/chrome/browser/extensions/api/identity/identity_apitest.cc
@@ -184,7 +184,8 @@ class TestOAuth2MintTokenFlow : public OAuth2MintTokenFlow {
OAuth2MintTokenFlow::Delegate* delegate_;
};
-ProfileKeyedService* IdentityAPITestFactory(content::BrowserContext* profile) {
+BrowserContextKeyedService* IdentityAPITestFactory(
+ content::BrowserContext* profile) {
return new IdentityAPI(static_cast<Profile*>(profile));
}
diff --git a/chrome/browser/extensions/api/idle/idle_api_unittest.cc b/chrome/browser/extensions/api/idle/idle_api_unittest.cc
index 22f0fb1..e55ef07 100644
--- a/chrome/browser/extensions/api/idle/idle_api_unittest.cc
+++ b/chrome/browser/extensions/api/idle/idle_api_unittest.cc
@@ -118,7 +118,8 @@ ScopedListen::~ScopedListen() {
idle_manager_->OnListenerRemoved(details);
}
-ProfileKeyedService* IdleManagerTestFactory(content::BrowserContext* profile) {
+BrowserContextKeyedService* IdleManagerTestFactory(
+ content::BrowserContext* profile) {
return new IdleManager(static_cast<Profile*>(profile));
}
diff --git a/chrome/browser/extensions/api/idle/idle_manager.h b/chrome/browser/extensions/api/idle/idle_manager.h
index dbfcee4..96d8723 100644
--- a/chrome/browser/extensions/api/idle/idle_manager.h
+++ b/chrome/browser/extensions/api/idle/idle_manager.h
@@ -39,7 +39,7 @@ struct IdleMonitor {
class IdleManager : public content::NotificationObserver,
public EventRouter::Observer,
- public ProfileKeyedService {
+ public BrowserContextKeyedService {
public:
class IdleTimeProvider {
public:
@@ -72,7 +72,7 @@ class IdleManager : public content::NotificationObserver,
void Init();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// content::NotificationDelegate implementation.
diff --git a/chrome/browser/extensions/api/idle/idle_manager_factory.cc b/chrome/browser/extensions/api/idle/idle_manager_factory.cc
index 96e2c35..1bd7c51 100644
--- a/chrome/browser/extensions/api/idle/idle_manager_factory.cc
+++ b/chrome/browser/extensions/api/idle/idle_manager_factory.cc
@@ -16,7 +16,7 @@ namespace extensions {
IdleManager* IdleManagerFactory::GetForProfile(
Profile* profile) {
return static_cast<IdleManager*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -25,15 +25,16 @@ IdleManagerFactory* IdleManagerFactory::GetInstance() {
}
IdleManagerFactory::IdleManagerFactory()
- : ProfileKeyedServiceFactory("IdleManager",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "IdleManager",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
IdleManagerFactory::~IdleManagerFactory() {
}
-ProfileKeyedService* IdleManagerFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService* IdleManagerFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
IdleManager* idle_manager = new IdleManager(static_cast<Profile*>(profile));
idle_manager->Init();
@@ -45,7 +46,7 @@ content::BrowserContext* IdleManagerFactory::GetBrowserContextToUse(
return chrome::GetBrowserContextRedirectedInIncognito(context);
}
-bool IdleManagerFactory::ServiceIsCreatedWithProfile() const {
+bool IdleManagerFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}
diff --git a/chrome/browser/extensions/api/idle/idle_manager_factory.h b/chrome/browser/extensions/api/idle/idle_manager_factory.h
index c9946be..2ff9605 100644
--- a/chrome/browser/extensions/api/idle/idle_manager_factory.h
+++ b/chrome/browser/extensions/api/idle/idle_manager_factory.h
@@ -13,7 +13,7 @@ class Profile;
namespace extensions {
class IdleManager;
-class IdleManagerFactory : public ProfileKeyedServiceFactory {
+class IdleManagerFactory : public BrowserContextKeyedServiceFactory {
public:
static IdleManager* GetForProfile(Profile* profile);
@@ -25,12 +25,12 @@ class IdleManagerFactory : public ProfileKeyedServiceFactory {
IdleManagerFactory();
virtual ~IdleManagerFactory();
- // ProfileKeyedBaseFactory implementation.
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedBaseFactory implementation.
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
diff --git a/chrome/browser/extensions/api/managed_mode_private/managed_mode_private_api.h b/chrome/browser/extensions/api/managed_mode_private/managed_mode_private_api.h
index 7b4cfae..2344dc9 100644
--- a/chrome/browser/extensions/api/managed_mode_private/managed_mode_private_api.h
+++ b/chrome/browser/extensions/api/managed_mode_private/managed_mode_private_api.h
@@ -90,7 +90,7 @@ class ManagedModeAPI : public ProfileKeyedAPI,
explicit ManagedModeAPI(Profile* profile);
virtual ~ManagedModeAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPIFactory implementation.
diff --git a/chrome/browser/extensions/api/management/management_api.h b/chrome/browser/extensions/api/management/management_api.h
index 815ff6a..f9566ea 100644
--- a/chrome/browser/extensions/api/management/management_api.h
+++ b/chrome/browser/extensions/api/management/management_api.h
@@ -196,7 +196,7 @@ class ManagementAPI : public ProfileKeyedAPI,
explicit ManagementAPI(Profile* profile);
virtual ~ManagementAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
index af0e1ea..5bd4ed8 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
@@ -31,7 +31,7 @@ class MediaGalleriesPrivateAPI : public ProfileKeyedAPI,
explicit MediaGalleriesPrivateAPI(Profile* profile);
virtual ~MediaGalleriesPrivateAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/preference/preference_api.h b/chrome/browser/extensions/api/preference/preference_api.h
index c2a85de..0a3c7c1 100644
--- a/chrome/browser/extensions/api/preference/preference_api.h
+++ b/chrome/browser/extensions/api/preference/preference_api.h
@@ -45,7 +45,7 @@ class PreferenceAPI : public ProfileKeyedAPI,
explicit PreferenceAPI(Profile* profile);
virtual ~PreferenceAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/processes/processes_api.h b/chrome/browser/extensions/api/processes/processes_api.h
index 224b9cc..312dd96 100644
--- a/chrome/browser/extensions/api/processes/processes_api.h
+++ b/chrome/browser/extensions/api/processes/processes_api.h
@@ -98,7 +98,7 @@ class ProcessesAPI : public ProfileKeyedAPI,
explicit ProcessesAPI(Profile* profile);
virtual ~ProcessesAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/profile_keyed_api_factory.h b/chrome/browser/extensions/api/profile_keyed_api_factory.h
index d6267de2..384eb3ed 100644
--- a/chrome/browser/extensions/api/profile_keyed_api_factory.h
+++ b/chrome/browser/extensions/api/profile_keyed_api_factory.h
@@ -19,12 +19,12 @@ class ProfileKeyedAPIFactory;
// Instantiations of ProfileKeyedAPIFactory should use this base class
// and also define a static const char* service_name() function (used in the
-// ProfileKeyedBaseFactory constructor). These fields should be accessible
-// to the ProfileKeyedAPIFactory for the service.
-class ProfileKeyedAPI : public ProfileKeyedService {
+// BrowserContextKeyedBaseFactory constructor). These fields should
+// be accessible to the ProfileKeyedAPIFactory for the service.
+class ProfileKeyedAPI : public BrowserContextKeyedService {
protected:
// Defaults for flags that control ProfileKeyedAPIFactory behavior.
- // See ProfileKeyedBaseFactory for usage.
+ // See BrowserContextKeyedBaseFactory for usage.
static const bool kServiceRedirectedInIncognito = false;
static const bool kServiceIsNULLWhileTesting = false;
static const bool kServiceHasOwnInstanceInIncognito = false;
@@ -52,15 +52,16 @@ class ProfileKeyedAPI : public ProfileKeyedService {
// }
};
-// A template for factories for ProfileKeyedServices that manage extension APIs.
-// T is a ProfileKeyedService that uses this factory template instead of
-// its own separate factory definition to manage its per-profile instances.
+// A template for factories for BrowserContextKeyedServices that manage
+// extension APIs. T is a BrowserContextKeyedService that uses this factory
+// template instead of its own separate factory definition to manage its
+// per-profile instances.
template <typename T>
-class ProfileKeyedAPIFactory : public ProfileKeyedServiceFactory {
+class ProfileKeyedAPIFactory : public BrowserContextKeyedServiceFactory {
public:
static T* GetForProfile(Profile* profile) {
return static_cast<T*>(
- T::GetFactoryInstance()->GetServiceForProfile(profile, true));
+ T::GetFactoryInstance()->GetServiceForBrowserContext(profile, true));
}
// Declare dependencies on other factories.
@@ -78,8 +79,9 @@ class ProfileKeyedAPIFactory : public ProfileKeyedServiceFactory {
}
ProfileKeyedAPIFactory()
- : ProfileKeyedServiceFactory(T::service_name(),
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ T::service_name(),
+ BrowserContextDependencyManager::GetInstance()) {
DeclareFactoryDependencies();
}
@@ -87,13 +89,13 @@ class ProfileKeyedAPIFactory : public ProfileKeyedServiceFactory {
}
private:
- // ProfileKeyedServiceFactory implementation.
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory implementation.
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE {
return new T(static_cast<Profile*>(profile));
}
- // ProfileKeyedBaseFactory implementation.
+ // BrowserContextKeyedBaseFactory implementation.
// These can be effectively overridden with template specializations.
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE {
@@ -103,10 +105,10 @@ class ProfileKeyedAPIFactory : public ProfileKeyedServiceFactory {
if (T::kServiceHasOwnInstanceInIncognito)
return chrome::GetBrowserContextOwnInstanceInIncognito(context);
- return ProfileKeyedServiceFactory::GetBrowserContextToUse(context);
+ return BrowserContextKeyedServiceFactory::GetBrowserContextToUse(context);
}
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE {
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE {
return true;
}
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
index 3c9c803..76c0005 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
@@ -106,7 +106,7 @@ class PushMessagingAPI : public ProfileKeyedAPI,
// Convenience method to get the PushMessagingAPI for a profile.
static PushMessagingAPI* Get(Profile* profile);
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/storage/settings_test_util.cc b/chrome/browser/extensions/api/storage/settings_test_util.cc
index d3c4b7d..f6e714a 100644
--- a/chrome/browser/extensions/api/storage/settings_test_util.cc
+++ b/chrome/browser/extensions/api/storage/settings_test_util.cc
@@ -124,7 +124,7 @@ ExtensionService* MockExtensionSystem::extension_service() {
return static_cast<ExtensionService*>(as_interface);
}
-ProfileKeyedService* BuildMockExtensionSystem(
+BrowserContextKeyedService* BuildMockExtensionSystem(
content::BrowserContext* profile) {
return new MockExtensionSystem(static_cast<Profile*>(profile));
}
diff --git a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h
index aeb09d1..25aadf8 100644
--- a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h
+++ b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h
@@ -23,7 +23,7 @@ namespace extensions {
// Observes changes in SyncFileSystem and relays events to JS Extension API.
class ExtensionSyncEventObserver
: public sync_file_system::SyncEventObserver,
- public ProfileKeyedService {
+ public BrowserContextKeyedService {
public:
explicit ExtensionSyncEventObserver(Profile* profile);
virtual ~ExtensionSyncEventObserver();
@@ -32,7 +32,7 @@ class ExtensionSyncEventObserver
sync_file_system::SyncFileSystemService* sync_service,
const std::string& service_name);
- // ProfileKeyedService override.
+ // BrowserContextKeyedService override.
virtual void Shutdown() OVERRIDE;
// sync_file_system::SyncEventObserver interface implementation.
diff --git a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.cc b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.cc
index 9b9030e..08219fb 100644
--- a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.cc
+++ b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.cc
@@ -16,7 +16,7 @@ namespace extensions {
ExtensionSyncEventObserver*
ExtensionSyncEventObserverFactory::GetForProfile(Profile* profile) {
return static_cast<ExtensionSyncEventObserver*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -26,15 +26,17 @@ ExtensionSyncEventObserverFactory::GetInstance() {
}
ExtensionSyncEventObserverFactory::ExtensionSyncEventObserverFactory()
- : ProfileKeyedServiceFactory("ExtensionSyncEventObserver",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "ExtensionSyncEventObserver",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(sync_file_system::SyncFileSystemServiceFactory::GetInstance());
DependsOn(ExtensionSystemFactory::GetInstance());
}
ExtensionSyncEventObserverFactory::~ExtensionSyncEventObserverFactory() {}
-ProfileKeyedService* ExtensionSyncEventObserverFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService*
+ExtensionSyncEventObserverFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return new ExtensionSyncEventObserver(static_cast<Profile*>(profile));
}
diff --git a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.h b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.h
index eb9a407..65c14fc 100644
--- a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.h
+++ b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer_factory.h
@@ -14,7 +14,8 @@ namespace extensions {
class ExtensionSyncEventObserver;
-class ExtensionSyncEventObserverFactory : public ProfileKeyedServiceFactory {
+class ExtensionSyncEventObserverFactory
+ : public BrowserContextKeyedServiceFactory {
public:
static ExtensionSyncEventObserver* GetForProfile(Profile* profile);
@@ -26,8 +27,8 @@ class ExtensionSyncEventObserverFactory : public ProfileKeyedServiceFactory {
ExtensionSyncEventObserverFactory();
virtual ~ExtensionSyncEventObserverFactory();
- // ProfileKeyedServiceFactory implementation.
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory implementation.
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
};
diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h
index 47da265..a2e403f 100644
--- a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h
+++ b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h
@@ -30,12 +30,12 @@ class ExtensionIndicatorIcon;
// that are currently visible in the UI. Use SystemIndicatorManagerFactory to
// create a SystemIndicatorManager object.
class SystemIndicatorManager : public content::NotificationObserver,
- public ProfileKeyedService {
+ public BrowserContextKeyedService {
public:
SystemIndicatorManager(Profile* profile, StatusTray* status_tray);
virtual ~SystemIndicatorManager();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// content::NotificationDelegate implementation.
diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.cc b/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.cc
index cf3fcc5..76e74ef 100644
--- a/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.cc
+++ b/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.cc
@@ -16,7 +16,7 @@ namespace extensions {
SystemIndicatorManager* SystemIndicatorManagerFactory::GetForProfile(
Profile* profile) {
return static_cast<SystemIndicatorManager*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -25,14 +25,16 @@ SystemIndicatorManagerFactory* SystemIndicatorManagerFactory::GetInstance() {
}
SystemIndicatorManagerFactory::SystemIndicatorManagerFactory()
- : ProfileKeyedServiceFactory("SystemIndicatorManager",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "SystemIndicatorManager",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
SystemIndicatorManagerFactory::~SystemIndicatorManagerFactory() {}
-ProfileKeyedService* SystemIndicatorManagerFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService*
+SystemIndicatorManagerFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
StatusTray* status_tray = g_browser_process->status_tray();
diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h b/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h
index 01e417d..ad6f3d9 100644
--- a/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h
+++ b/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h
@@ -13,8 +13,8 @@ class Profile;
namespace extensions {
class SystemIndicatorManager;
-// ProfileKeyedServiceFactory for each SystemIndicatorManager.
-class SystemIndicatorManagerFactory : public ProfileKeyedServiceFactory {
+// BrowserContextKeyedServiceFactory for each SystemIndicatorManager.
+class SystemIndicatorManagerFactory : public BrowserContextKeyedServiceFactory {
public:
static SystemIndicatorManager* GetForProfile(Profile* profile);
@@ -26,8 +26,8 @@ class SystemIndicatorManagerFactory : public ProfileKeyedServiceFactory {
SystemIndicatorManagerFactory();
virtual ~SystemIndicatorManagerFactory();
- // ProfileKeyedBaseFactory implementation.
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedBaseFactory implementation.
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
};
diff --git a/chrome/browser/extensions/api/system_info/system_info_api.h b/chrome/browser/extensions/api/system_info/system_info_api.h
index eb96a4a..3fbb7fa 100644
--- a/chrome/browser/extensions/api/system_info/system_info_api.h
+++ b/chrome/browser/extensions/api/system_info/system_info_api.h
@@ -21,7 +21,7 @@ class SystemInfoAPI : public ProfileKeyedAPI,
explicit SystemInfoAPI(Profile* profile);
virtual ~SystemInfoAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// EventRouter::Observer implementation.
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h
index e245aa1..6472f1a 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h
@@ -24,7 +24,7 @@ class FullscreenObserver;
namespace tab_capture = extensions::api::tab_capture;
-class TabCaptureRegistry : public ProfileKeyedService,
+class TabCaptureRegistry : public BrowserContextKeyedService,
public content::NotificationObserver,
public MediaCaptureDevicesDispatcher::Observer {
public:
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.cc
index 6e46fee..e48fcf9 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.cc
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.cc
@@ -16,7 +16,7 @@ namespace extensions {
// static
TabCaptureRegistry* TabCaptureRegistryFactory::GetForProfile(Profile* profile) {
return static_cast<TabCaptureRegistry*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -24,20 +24,21 @@ TabCaptureRegistryFactory* TabCaptureRegistryFactory::GetInstance() {
return Singleton<TabCaptureRegistryFactory>::get();
}
-bool TabCaptureRegistryFactory::ServiceIsCreatedWithProfile() const {
+bool TabCaptureRegistryFactory::ServiceIsCreatedWithBrowserContext() const {
return false;
}
TabCaptureRegistryFactory::TabCaptureRegistryFactory()
- : ProfileKeyedServiceFactory("TabCaptureRegistry",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "TabCaptureRegistry",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionSystemFactory::GetInstance());
}
TabCaptureRegistryFactory::~TabCaptureRegistryFactory() {
}
-ProfileKeyedService* TabCaptureRegistryFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService* TabCaptureRegistryFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return new TabCaptureRegistry(static_cast<Profile*>(profile));
}
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.h b/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.h
index 8411720..afd75d5 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.h
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.h
@@ -14,14 +14,14 @@ namespace extensions {
class TabCaptureRegistry;
-class TabCaptureRegistryFactory : public ProfileKeyedServiceFactory {
+class TabCaptureRegistryFactory : public BrowserContextKeyedServiceFactory {
public:
static TabCaptureRegistry* GetForProfile(Profile* profile);
static TabCaptureRegistryFactory* GetInstance();
- // ProfileKeyedBaseFactory:
- virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ // BrowserContextKeyedBaseFactory:
+ virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
private:
friend struct DefaultSingletonTraits<TabCaptureRegistryFactory>;
@@ -29,8 +29,8 @@ class TabCaptureRegistryFactory : public ProfileKeyedServiceFactory {
TabCaptureRegistryFactory();
virtual ~TabCaptureRegistryFactory();
- // ProfileKeyedServiceFactory:
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory:
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE;
diff --git a/chrome/browser/extensions/api/tabs/tabs_windows_api.h b/chrome/browser/extensions/api/tabs/tabs_windows_api.h
index d4372ef..ba79469 100644
--- a/chrome/browser/extensions/api/tabs/tabs_windows_api.h
+++ b/chrome/browser/extensions/api/tabs/tabs_windows_api.h
@@ -24,7 +24,7 @@ class TabsWindowsAPI : public ProfileKeyedAPI,
WindowsEventRouter* windows_event_router();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
index 8277a02..bae2e27 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
@@ -224,7 +224,7 @@ class WebNavigationAPI : public ProfileKeyedAPI,
explicit WebNavigationAPI(Profile* profile);
virtual ~WebNavigationAPI();
- // ProfileKeyedService implementation.
+ // BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
// ProfileKeyedAPI implementation.