diff options
Diffstat (limited to 'chrome/browser')
129 files changed, 260 insertions, 281 deletions
diff --git a/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc b/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc index 4fa775e..307d0c6 100644 --- a/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc +++ b/chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc @@ -22,7 +22,7 @@ namespace { // same registrationId. class FakeGCMProfileService : public gcm::GCMProfileService { public: - static BrowserContextKeyedService* Build(content::BrowserContext* context) { + static KeyedService* Build(content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); return new FakeGCMProfileService(profile); } diff --git a/chrome/browser/password_manager/mock_password_store_service.cc b/chrome/browser/password_manager/mock_password_store_service.cc index 3487aaf..64d8da5 100644 --- a/chrome/browser/password_manager/mock_password_store_service.cc +++ b/chrome/browser/password_manager/mock_password_store_service.cc @@ -7,7 +7,7 @@ #include "components/password_manager/core/browser/mock_password_store.h" // static -BrowserContextKeyedService* MockPasswordStoreService::Build( +KeyedService* MockPasswordStoreService::Build( content::BrowserContext* /*profile*/) { scoped_refptr<PasswordStore> store(new MockPasswordStore); if (!store || !store->Init(syncer::SyncableService::StartSyncFlare())) diff --git a/chrome/browser/password_manager/mock_password_store_service.h b/chrome/browser/password_manager/mock_password_store_service.h index 3e4d37c..1552b42a 100644 --- a/chrome/browser/password_manager/mock_password_store_service.h +++ b/chrome/browser/password_manager/mock_password_store_service.h @@ -15,7 +15,7 @@ class BrowserContext; class MockPasswordStoreService : public PasswordStoreService { public: - static BrowserContextKeyedService* Build(content::BrowserContext* profile); + static KeyedService* Build(content::BrowserContext* profile); private: explicit MockPasswordStoreService( diff --git a/chrome/browser/password_manager/null_password_store_service.cc b/chrome/browser/password_manager/null_password_store_service.cc index 6b6c282..219a8bd 100644 --- a/chrome/browser/password_manager/null_password_store_service.cc +++ b/chrome/browser/password_manager/null_password_store_service.cc @@ -7,7 +7,7 @@ #include "components/password_manager/core/browser/password_store.h" // static -BrowserContextKeyedService* NullPasswordStoreService::Build( +KeyedService* NullPasswordStoreService::Build( content::BrowserContext* /*profile*/) { return new NullPasswordStoreService(); } diff --git a/chrome/browser/password_manager/null_password_store_service.h b/chrome/browser/password_manager/null_password_store_service.h index f46e406..cbb1803 100644 --- a/chrome/browser/password_manager/null_password_store_service.h +++ b/chrome/browser/password_manager/null_password_store_service.h @@ -15,7 +15,7 @@ class BrowserContext; class NullPasswordStoreService : public PasswordStoreService { public: - static BrowserContextKeyedService* Build(content::BrowserContext* profile); + static KeyedService* Build(content::BrowserContext* profile); private: NullPasswordStoreService(); diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc index 12d157f..f57b300 100644 --- a/chrome/browser/password_manager/password_store_factory.cc +++ b/chrome/browser/password_manager/password_store_factory.cc @@ -13,8 +13,8 @@ #include "chrome/browser/webdata/web_data_service_factory.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" #include "components/encryptor/encryptor_switches.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/password_manager/core/browser/login_database.h" #include "components/password_manager/core/browser/password_store.h" #include "components/password_manager/core/browser/password_store_default.h" @@ -116,7 +116,7 @@ LocalProfileId PasswordStoreFactory::GetLocalProfileId( } #endif -BrowserContextKeyedService* PasswordStoreFactory::BuildServiceInstanceFor( +KeyedService* PasswordStoreFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); diff --git a/chrome/browser/password_manager/password_store_factory.h b/chrome/browser/password_manager/password_store_factory.h index ba5d2897..ae26a0e 100644 --- a/chrome/browser/password_manager/password_store_factory.h +++ b/chrome/browser/password_manager/password_store_factory.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/memory/singleton.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class PasswordStore; class Profile; @@ -22,7 +22,7 @@ typedef int LocalProfileId; #endif // A wrapper of PasswordStore so we can use it as a profiled keyed service. -class PasswordStoreService : public BrowserContextKeyedService { +class PasswordStoreService : public KeyedService { public: // |password_store| needs to be not-NULL, and the constructor expects that // Init() was already called successfully on it. @@ -31,7 +31,7 @@ class PasswordStoreService : public BrowserContextKeyedService { scoped_refptr<PasswordStore> GetPasswordStore(); - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; private: @@ -59,7 +59,7 @@ class PasswordStoreFactory : public BrowserContextKeyedServiceFactory { #endif // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; virtual void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) OVERRIDE; diff --git a/chrome/browser/password_manager/test_password_store_service.cc b/chrome/browser/password_manager/test_password_store_service.cc index 64787a9..29829cf 100644 --- a/chrome/browser/password_manager/test_password_store_service.cc +++ b/chrome/browser/password_manager/test_password_store_service.cc @@ -7,7 +7,7 @@ #include "components/password_manager/core/browser/test_password_store.h" // static -BrowserContextKeyedService* TestPasswordStoreService::Build( +KeyedService* TestPasswordStoreService::Build( content::BrowserContext* /*profile*/) { scoped_refptr<PasswordStore> store(new TestPasswordStore); if (!store || !store->Init(syncer::SyncableService::StartSyncFlare())) diff --git a/chrome/browser/password_manager/test_password_store_service.h b/chrome/browser/password_manager/test_password_store_service.h index d4549bf..fae7f3a 100644 --- a/chrome/browser/password_manager/test_password_store_service.h +++ b/chrome/browser/password_manager/test_password_store_service.h @@ -15,7 +15,7 @@ class BrowserContext; class TestPasswordStoreService : public PasswordStoreService { public: - static BrowserContextKeyedService* Build(content::BrowserContext* profile); + static KeyedService* Build(content::BrowserContext* profile); private: explicit TestPasswordStoreService( diff --git a/chrome/browser/plugins/plugin_prefs.cc b/chrome/browser/plugins/plugin_prefs.cc index b93aca5..d8cc025 100644 --- a/chrome/browser/plugins/plugin_prefs.cc +++ b/chrome/browser/plugins/plugin_prefs.cc @@ -27,7 +27,7 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/plugin_service.h" diff --git a/chrome/browser/plugins/plugin_prefs.h b/chrome/browser/plugins/plugin_prefs.h index d3b3451..3e56f7e 100644 --- a/chrome/browser/plugins/plugin_prefs.h +++ b/chrome/browser/plugins/plugin_prefs.h @@ -15,7 +15,7 @@ #include "base/prefs/pref_service.h" #include "base/synchronization/lock.h" #include "chrome/browser/plugins/plugin_finder.h" -#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service.h" +#include "components/keyed_service/content/refcounted_browser_context_keyed_service.h" class Profile; diff --git a/chrome/browser/plugins/plugin_prefs_factory.cc b/chrome/browser/plugins/plugin_prefs_factory.cc index f6b409f..26aec17 100644 --- a/chrome/browser/plugins/plugin_prefs_factory.cc +++ b/chrome/browser/plugins/plugin_prefs_factory.cc @@ -11,8 +11,8 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/user_prefs/pref_registry_syncable.h" // static diff --git a/chrome/browser/plugins/plugin_prefs_factory.h b/chrome/browser/plugins/plugin_prefs_factory.h index 2076ced..697ed47 100644 --- a/chrome/browser/plugins/plugin_prefs_factory.h +++ b/chrome/browser/plugins/plugin_prefs_factory.h @@ -7,7 +7,7 @@ #include "base/compiler_specific.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h" class PluginPrefs; class Profile; diff --git a/chrome/browser/policy/cloud/policy_header_service_factory.cc b/chrome/browser/policy/cloud/policy_header_service_factory.cc index c7ce7fa..04bc9f5 100644 --- a/chrome/browser/policy/cloud/policy_header_service_factory.cc +++ b/chrome/browser/policy/cloud/policy_header_service_factory.cc @@ -7,7 +7,7 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/policy/core/browser/browser_policy_connector.h" #include "components/policy/core/common/cloud/cloud_policy_store.h" #include "components/policy/core/common/cloud/device_management_service.h" @@ -27,7 +27,7 @@ namespace policy { namespace { -class PolicyHeaderServiceWrapper : public BrowserContextKeyedService { +class PolicyHeaderServiceWrapper : public KeyedService { public: explicit PolicyHeaderServiceWrapper(scoped_ptr<PolicyHeaderService> service) : policy_header_service_(service.Pass()) {} @@ -74,8 +74,7 @@ PolicyHeaderService* PolicyHeaderServiceFactory::GetForBrowserContext( return NULL; } -BrowserContextKeyedService* -PolicyHeaderServiceFactory::BuildServiceInstanceFor( +KeyedService* PolicyHeaderServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { #if defined(OS_CHROMEOS) BrowserPolicyConnectorChromeOS* connector = diff --git a/chrome/browser/policy/cloud/policy_header_service_factory.h b/chrome/browser/policy/cloud/policy_header_service_factory.h index 79865a6..2a319ec 100644 --- a/chrome/browser/policy/cloud/policy_header_service_factory.h +++ b/chrome/browser/policy/cloud/policy_header_service_factory.h @@ -6,15 +6,15 @@ #define CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" namespace policy { class PolicyHeaderService; // Factory for PolicyHeaderService objects. PolicyHeaderService is not actually -// a BrowserContextKeyedService, so this class wraps PolicyHeaderService in -// a BrowserContextKeyedService internally. +// a KeyedService, so this class wraps PolicyHeaderService in +// a KeyedService internally. class PolicyHeaderServiceFactory : public BrowserContextKeyedServiceFactory { public: // Returns the instance of PolicyHeaderService for the passed |context|, or @@ -27,7 +27,7 @@ class PolicyHeaderServiceFactory : public BrowserContextKeyedServiceFactory { protected: // BrowserContextKeyedServiceFactory implementation. - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; private: diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h index 52f01be..a5e7247 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h +++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_INVALIDATOR_H_ #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -17,9 +17,9 @@ namespace policy { class CloudPolicyManager; // Provides invalidations to user policy. Implemented as a -// BrowserContextKeyedService to allow profile-based lifetime management. +// KeyedService to allow profile-based lifetime management. class UserCloudPolicyInvalidator : public CloudPolicyInvalidator, - public BrowserContextKeyedService, + public KeyedService, public content::NotificationObserver { public: // |profile| is profile associated with the invalidator. It is used to get @@ -31,7 +31,7 @@ class UserCloudPolicyInvalidator : public CloudPolicyInvalidator, Profile* profile, CloudPolicyManager* policy_manager); - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; // content::NotificationObserver implementation: diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc index d91d31e..0e1cdb4 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc +++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/invalidation/invalidation_service_factory.h" #include "chrome/browser/policy/cloud/user_cloud_policy_invalidator.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/policy/core/common/policy_switches.h" #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" @@ -40,9 +40,8 @@ UserCloudPolicyInvalidatorFactory::UserCloudPolicyInvalidatorFactory() UserCloudPolicyInvalidatorFactory::~UserCloudPolicyInvalidatorFactory() {} -BrowserContextKeyedService* - UserCloudPolicyInvalidatorFactory::BuildServiceInstanceFor( - content::BrowserContext* context) const { +KeyedService* UserCloudPolicyInvalidatorFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableCloudPolicyPush)) { return NULL; diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h index 354801b..084945e 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h +++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_INVALIDATOR_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" namespace policy { @@ -23,7 +23,7 @@ class UserCloudPolicyInvalidatorFactory virtual ~UserCloudPolicyInvalidatorFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; diff --git a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc index 517e339..3f43c4b 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc +++ b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc @@ -10,8 +10,8 @@ #include "base/sequenced_task_runner.h" #include "chrome/browser/policy/schema_registry_service.h" #include "chrome/browser/policy/schema_registry_service_factory.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/policy/core/common/cloud/cloud_external_data_manager.h" #include "components/policy/core/common/cloud/cloud_policy_constants.h" #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" @@ -33,9 +33,8 @@ const base::FilePath::CharType kComponentsDir[] = } // namespace -// A BrowserContextKeyedService that wraps a UserCloudPolicyManager. -class UserCloudPolicyManagerFactory::ManagerWrapper - : public BrowserContextKeyedService { +// A KeyedService that wraps a UserCloudPolicyManager. +class UserCloudPolicyManagerFactory::ManagerWrapper : public KeyedService { public: explicit ManagerWrapper(UserCloudPolicyManager* manager) : manager_(manager) { diff --git a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h index 40e9dce..762d57a 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h +++ b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_base_factory.h" +#include "components/keyed_service/content/browser_context_keyed_base_factory.h" namespace base { class SequencedTaskRunner; @@ -29,14 +29,14 @@ class UserCloudPolicyManager; // platforms. // // UserCloudPolicyManager is handled different than other -// BrowserContextKeyedServices because it is a dependency of PrefService. +// KeyedServices because it is a dependency of PrefService. // Therefore, lifetime of instances is managed by Profile, Profile startup code // invokes CreateForBrowserContext() explicitly, takes ownership, and the // instance is only deleted after PrefService destruction. // // TODO(mnissler): Remove the special lifetime management in favor of // PrefService directly depending on UserCloudPolicyManager once the former has -// been converted to a BrowserContextKeyedService. +// been converted to a KeyedService. // See also http://crbug.com/131843 and http://crbug.com/131844. class UserCloudPolicyManagerFactory : public BrowserContextKeyedBaseFactory { public: diff --git a/chrome/browser/policy/cloud/user_policy_signin_service.h b/chrome/browser/policy/cloud/user_policy_signin_service.h index 5e8865f..a28d9ae 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service.h @@ -57,7 +57,7 @@ class UserPolicySigninService : public UserPolicySigninServiceBase, // CloudPolicyService::Observer implementation: virtual void OnInitializationCompleted(CloudPolicyService* service) OVERRIDE; - // BrowserContextKeyedService implementation: + // KeyedService implementation: virtual void Shutdown() OVERRIDE; protected: diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_android.h b/chrome/browser/policy/cloud/user_policy_signin_service_android.h index a9ea23b..7242f1b 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_android.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service_android.h @@ -51,7 +51,7 @@ class UserPolicySigninService : public UserPolicySigninServiceBase { void CallPolicyRegistrationCallback(scoped_ptr<CloudPolicyClient> client, PolicyRegistrationCallback callback); - // BrowserContextKeyedService implementation: + // KeyedService implementation: virtual void Shutdown() OVERRIDE; // CloudPolicyService::Observer implementation: diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_base.h b/chrome/browser/policy/cloud/user_policy_signin_service_base.h index 6ca60cf..40971c8 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_base.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service_base.h @@ -13,7 +13,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/policy/core/common/cloud/cloud_policy_client.h" #include "components/policy/core/common/cloud/cloud_policy_service.h" #include "content/public/browser/notification_observer.h" @@ -44,7 +44,7 @@ class UserCloudPolicyManager; // // Finally, if the user signs out, this class is responsible for shutting down // the policy infrastructure to ensure that any cached policy is cleared. -class UserPolicySigninServiceBase : public BrowserContextKeyedService, +class UserPolicySigninServiceBase : public KeyedService, public CloudPolicyClient::Observer, public CloudPolicyService::Observer, public content::NotificationObserver { @@ -94,7 +94,7 @@ class UserPolicySigninServiceBase : public BrowserContextKeyedService, virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; virtual void OnClientError(CloudPolicyClient* client) OVERRIDE; - // BrowserContextKeyedService implementation: + // KeyedService implementation: virtual void Shutdown() OVERRIDE; void SetSystemRequestContext( diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc b/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc index 31e4e33..337ada1 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc @@ -12,7 +12,7 @@ #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/policy/core/browser/browser_policy_connector.h" #include "components/user_prefs/pref_registry_syncable.h" #include "net/url_request/url_request_context_getter.h" @@ -63,8 +63,7 @@ void UserPolicySigninServiceFactory::SetDeviceManagementServiceForTesting( g_device_management_service = device_management_service; } -BrowserContextKeyedService* -UserPolicySigninServiceFactory::BuildServiceInstanceFor( +KeyedService* UserPolicySigninServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); BrowserPolicyConnector* connector = diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_factory.h b/chrome/browser/policy/cloud/user_policy_signin_service_factory.h index 6042ea0..9c7bd59 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_factory.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -39,7 +39,7 @@ class UserPolicySigninServiceFactory protected: // BrowserContextKeyedServiceFactory implementation. - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; // Overridden to cause this object to be created when the profile is created. diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_ios.h b/chrome/browser/policy/cloud/user_policy_signin_service_ios.h index 12383a4..fd674ce 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_ios.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service_ios.h @@ -70,7 +70,7 @@ class UserPolicySigninService : public UserPolicySigninServiceBase { void CallPolicyFetchCallback(PolicyFetchBlockCallback callback, bool succeeded); - // BrowserContextKeyedService implementation: + // KeyedService implementation: virtual void Shutdown() OVERRIDE; // CloudPolicyService::Observer implementation: diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc index bfa8116..2585b59 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc @@ -90,7 +90,7 @@ class SigninManagerFake : public FakeSigninManager { SignOut(); } - static BrowserContextKeyedService* Build(content::BrowserContext* profile) { + static KeyedService* Build(content::BrowserContext* profile) { return new SigninManagerFake(static_cast<Profile*>(profile)); } }; diff --git a/chrome/browser/policy/profile_policy_connector.h b/chrome/browser/policy/profile_policy_connector.h index 5785f71..d31e6fa 100644 --- a/chrome/browser/policy/profile_policy_connector.h +++ b/chrome/browser/policy/profile_policy_connector.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" namespace chromeos { class User; @@ -22,9 +22,9 @@ class ConfigurationPolicyProvider; class PolicyService; class SchemaRegistry; -// A BrowserContextKeyedService that creates and manages the per-Profile policy +// A KeyedService that creates and manages the per-Profile policy // components. -class ProfilePolicyConnector : public BrowserContextKeyedService { +class ProfilePolicyConnector : public KeyedService { public: ProfilePolicyConnector(); virtual ~ProfilePolicyConnector(); @@ -39,7 +39,7 @@ class ProfilePolicyConnector : public BrowserContextKeyedService { void InitForTesting(scoped_ptr<PolicyService> service); - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; // This is never NULL. diff --git a/chrome/browser/policy/profile_policy_connector_factory.cc b/chrome/browser/policy/profile_policy_connector_factory.cc index 5f24495..61c1a0a 100644 --- a/chrome/browser/policy/profile_policy_connector_factory.cc +++ b/chrome/browser/policy/profile_policy_connector_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/policy/profile_policy_connector.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" #if defined(ENABLE_CONFIGURATION_POLICY) diff --git a/chrome/browser/policy/profile_policy_connector_factory.h b/chrome/browser/policy/profile_policy_connector_factory.h index 86c8805..e036889 100644 --- a/chrome/browser/policy/profile_policy_connector_factory.h +++ b/chrome/browser/policy/profile_policy_connector_factory.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "components/browser_context_keyed_service/browser_context_keyed_base_factory.h" +#include "components/keyed_service/content/browser_context_keyed_base_factory.h" template <typename T> struct DefaultSingletonTraits; diff --git a/chrome/browser/policy/schema_registry_service.h b/chrome/browser/policy/schema_registry_service.h index 4dfdfe7..ecf97d7 100644 --- a/chrome/browser/policy/schema_registry_service.h +++ b/chrome/browser/policy/schema_registry_service.h @@ -7,17 +7,16 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/policy/core/common/schema_registry.h" namespace policy { class Schema; -// A SchemaRegistry that is also a BrowserContextKeyedService, and is associated +// A SchemaRegistry that is also a KeyedService, and is associated // with a Profile. -class SchemaRegistryService : public SchemaRegistry, - public BrowserContextKeyedService { +class SchemaRegistryService : public SchemaRegistry, public KeyedService { public: // This SchemaRegistry will initially contain only the |chrome_schema|, if // it's valid. The optional |global_registry| must outlive this, and will @@ -26,7 +25,7 @@ class SchemaRegistryService : public SchemaRegistry, CombinedSchemaRegistry* global_registry); virtual ~SchemaRegistryService(); - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; private: diff --git a/chrome/browser/policy/schema_registry_service_factory.cc b/chrome/browser/policy/schema_registry_service_factory.cc index 77e9763..71758ff 100644 --- a/chrome/browser/policy/schema_registry_service_factory.cc +++ b/chrome/browser/policy/schema_registry_service_factory.cc @@ -6,7 +6,7 @@ #include "base/logging.h" #include "chrome/browser/policy/schema_registry_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/policy/core/common/schema.h" #include "components/policy/core/common/schema_registry.h" #include "content/public/browser/browser_context.h" diff --git a/chrome/browser/policy/schema_registry_service_factory.h b/chrome/browser/policy/schema_registry_service_factory.h index 46c34c7..daaee37 100644 --- a/chrome/browser/policy/schema_registry_service_factory.h +++ b/chrome/browser/policy/schema_registry_service_factory.h @@ -11,7 +11,7 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_base_factory.h" +#include "components/keyed_service/content/browser_context_keyed_base_factory.h" namespace content { class BrowserContext; diff --git a/chrome/browser/predictors/autocomplete_action_predictor.h b/chrome/browser/predictors/autocomplete_action_predictor.h index 33784be..4559244 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor.h +++ b/chrome/browser/predictors/autocomplete_action_predictor.h @@ -14,7 +14,7 @@ #include "base/strings/string16.h" #include "chrome/browser/history/history_types.h" #include "chrome/browser/predictors/autocomplete_action_predictor_table.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -59,7 +59,7 @@ namespace predictors { // PostTaskAndReply without fear of crashes if it is destroyed before the reply // triggers. This is necessary during initialization. class AutocompleteActionPredictor - : public BrowserContextKeyedService, + : public KeyedService, public content::NotificationObserver, public base::SupportsWeakPtr<AutocompleteActionPredictor> { public: diff --git a/chrome/browser/predictors/autocomplete_action_predictor_factory.cc b/chrome/browser/predictors/autocomplete_action_predictor_factory.cc index c08e6f7..ad3abdc 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor_factory.cc +++ b/chrome/browser/predictors/autocomplete_action_predictor_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/predictors/predictor_database_factory.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace predictors { @@ -42,9 +42,8 @@ AutocompleteActionPredictorFactory::GetBrowserContextToUse( return chrome::GetBrowserContextOwnInstanceInIncognito(context); } -BrowserContextKeyedService* - AutocompleteActionPredictorFactory::BuildServiceInstanceFor( - content::BrowserContext* profile) const { +KeyedService* AutocompleteActionPredictorFactory::BuildServiceInstanceFor( + content::BrowserContext* profile) const { return new AutocompleteActionPredictor(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/predictors/autocomplete_action_predictor_factory.h b/chrome/browser/predictors/autocomplete_action_predictor_factory.h index 72da7f6..64ed34d 100644 --- a/chrome/browser/predictors/autocomplete_action_predictor_factory.h +++ b/chrome/browser/predictors/autocomplete_action_predictor_factory.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -34,7 +34,7 @@ class AutocompleteActionPredictorFactory // BrowserContextKeyedServiceFactory: virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictorFactory); diff --git a/chrome/browser/predictors/predictor_database.h b/chrome/browser/predictors/predictor_database.h index 73c159a..624b00b 100644 --- a/chrome/browser/predictors/predictor_database.h +++ b/chrome/browser/predictors/predictor_database.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_PREDICTORS_PREDICTOR_DATABASE_H_ #include "base/memory/ref_counted.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class Profile; @@ -20,7 +20,7 @@ class AutocompleteActionPredictorTable; class LoggedInPredictorTable; class PredictorDatabaseInternal; -class PredictorDatabase : public BrowserContextKeyedService { +class PredictorDatabase : public KeyedService { public: explicit PredictorDatabase(Profile* profile); virtual ~PredictorDatabase(); @@ -32,7 +32,7 @@ class PredictorDatabase : public BrowserContextKeyedService { sql::Connection* GetDatabase(); private: - // BrowserContextKeyedService + // KeyedService virtual void Shutdown() OVERRIDE; scoped_refptr<PredictorDatabaseInternal> db_; diff --git a/chrome/browser/predictors/predictor_database_factory.cc b/chrome/browser/predictors/predictor_database_factory.cc index 38d6ae8..9b69f26 100644 --- a/chrome/browser/predictors/predictor_database_factory.cc +++ b/chrome/browser/predictors/predictor_database_factory.cc @@ -7,7 +7,7 @@ #include "base/bind.h" #include "chrome/browser/predictors/predictor_database.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace predictors { @@ -30,7 +30,7 @@ PredictorDatabaseFactory::PredictorDatabaseFactory() PredictorDatabaseFactory::~PredictorDatabaseFactory() { } -BrowserContextKeyedService* PredictorDatabaseFactory::BuildServiceInstanceFor( +KeyedService* PredictorDatabaseFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new PredictorDatabase(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/predictors/predictor_database_factory.h b/chrome/browser/predictors/predictor_database_factory.h index 8e1e241..9b1e792 100644 --- a/chrome/browser/predictors/predictor_database_factory.h +++ b/chrome/browser/predictors/predictor_database_factory.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -30,7 +30,7 @@ class PredictorDatabaseFactory : public BrowserContextKeyedServiceFactory { virtual ~PredictorDatabaseFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(PredictorDatabaseFactory); diff --git a/chrome/browser/prefs/pref_metrics_service.cc b/chrome/browser/prefs/pref_metrics_service.cc index df7ae10..6d84569 100644 --- a/chrome/browser/prefs/pref_metrics_service.cc +++ b/chrome/browser/prefs/pref_metrics_service.cc @@ -21,7 +21,7 @@ #include "chrome/browser/ui/tabs/pinned_tab_codec.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/rappor/rappor_service.h" #include "crypto/hmac.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" @@ -213,8 +213,7 @@ PrefMetricsService::Factory::Factory() PrefMetricsService::Factory::~Factory() { } -BrowserContextKeyedService* -PrefMetricsService::Factory::BuildServiceInstanceFor( +KeyedService* PrefMetricsService::Factory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new PrefMetricsService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/prefs/pref_metrics_service.h b/chrome/browser/prefs/pref_metrics_service.h index c975a43..5fb9c2e 100644 --- a/chrome/browser/prefs/pref_metrics_service.h +++ b/chrome/browser/prefs/pref_metrics_service.h @@ -14,13 +14,13 @@ #include "base/prefs/pref_change_registrar.h" #include "chrome/browser/prefs/synced_pref_change_registrar.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" +#include "components/keyed_service/core/keyed_service.h" class PrefRegistrySimple; // PrefMetricsService is responsible for recording prefs-related UMA stats. -class PrefMetricsService : public BrowserContextKeyedService { +class PrefMetricsService : public KeyedService { public: explicit PrefMetricsService(Profile* profile); virtual ~PrefMetricsService(); @@ -36,7 +36,7 @@ class PrefMetricsService : public BrowserContextKeyedService { virtual ~Factory(); // BrowserContextKeyedServiceFactory implementation - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; diff --git a/chrome/browser/prerender/prerender_link_manager.h b/chrome/browser/prerender/prerender_link_manager.h index 0aea1bf..56e6ad8 100644 --- a/chrome/browser/prerender/prerender_link_manager.h +++ b/chrome/browser/prerender/prerender_link_manager.h @@ -11,7 +11,7 @@ #include "base/gtest_prod_util.h" #include "base/time/time.h" #include "chrome/browser/prerender/prerender_handle.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "url/gurl.h" class Profile; @@ -35,7 +35,7 @@ class PrerenderManager; // being rendered in this chrome instance. It receives messages from the // renderer indicating addition, cancelation and abandonment of link elements, // and controls the PrerenderManager accordingly. -class PrerenderLinkManager : public BrowserContextKeyedService, +class PrerenderLinkManager : public KeyedService, public PrerenderHandle::Observer { public: explicit PrerenderLinkManager(PrerenderManager* manager); @@ -143,7 +143,7 @@ class PrerenderLinkManager : public BrowserContextKeyedService, // Called when |launcher| is aborted. void CancelPendingPrerendersForLauncher(PrerenderContents* launcher); - // From BrowserContextKeyedService: + // From KeyedService: virtual void Shutdown() OVERRIDE; // From PrerenderHandle::Observer: diff --git a/chrome/browser/prerender/prerender_link_manager_factory.cc b/chrome/browser/prerender/prerender_link_manager_factory.cc index e93eeec..599c103 100644 --- a/chrome/browser/prerender/prerender_link_manager_factory.cc +++ b/chrome/browser/prerender/prerender_link_manager_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/prerender/prerender_manager_factory.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace prerender { @@ -32,8 +32,7 @@ PrerenderLinkManagerFactory::PrerenderLinkManagerFactory() DependsOn(prerender::PrerenderManagerFactory::GetInstance()); } -BrowserContextKeyedService* -PrerenderLinkManagerFactory::BuildServiceInstanceFor( +KeyedService* PrerenderLinkManagerFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { PrerenderManager* prerender_manager = PrerenderManagerFactory::GetForProfile(static_cast<Profile*>(profile)); diff --git a/chrome/browser/prerender/prerender_link_manager_factory.h b/chrome/browser/prerender/prerender_link_manager_factory.h index 3223c22..ce0b69a 100644 --- a/chrome/browser/prerender/prerender_link_manager_factory.h +++ b/chrome/browser/prerender/prerender_link_manager_factory.h @@ -7,7 +7,7 @@ #include "base/compiler_specific.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -26,7 +26,7 @@ class PrerenderLinkManagerFactory : public BrowserContextKeyedServiceFactory { PrerenderLinkManagerFactory(); virtual ~PrerenderLinkManagerFactory() { } - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc index 277a6a2..3218995 100644 --- a/chrome/browser/prerender/prerender_manager.cc +++ b/chrome/browser/prerender/prerender_manager.cc @@ -299,7 +299,7 @@ PrerenderManager::PrerenderManager(Profile* profile, PrerenderManager::~PrerenderManager() { MediaCaptureDevicesDispatcher::GetInstance()->RemoveObserver(this); - // The earlier call to BrowserContextKeyedService::Shutdown() should have + // The earlier call to KeyedService::Shutdown() should have // emptied these vectors already. DCHECK(active_prerenders_.empty()); DCHECK(to_delete_prerenders_.empty()); diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h index f0afe08..7d5c9e5c 100644 --- a/chrome/browser/prerender/prerender_manager.h +++ b/chrome/browser/prerender/prerender_manager.h @@ -28,7 +28,7 @@ #include "chrome/browser/prerender/prerender_histograms.h" #include "chrome/browser/prerender/prerender_origin.h" #include "chrome/browser/prerender/prerender_tracker.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/session_storage_namespace.h" @@ -74,7 +74,7 @@ class PrerenderLocalPredictor; class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, public base::NonThreadSafe, public content::NotificationObserver, - public BrowserContextKeyedService, + public KeyedService, public MediaCaptureDevicesDispatcher::Observer { public: // NOTE: New values need to be appended, since they are used in histograms. @@ -108,7 +108,7 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, virtual ~PrerenderManager(); - // From BrowserContextKeyedService: + // From KeyedService: virtual void Shutdown() OVERRIDE; // Entry points for adding prerenders. diff --git a/chrome/browser/prerender/prerender_manager_factory.cc b/chrome/browser/prerender/prerender_manager_factory.cc index c1cd771..0682cb7 100644 --- a/chrome/browser/prerender/prerender_manager_factory.cc +++ b/chrome/browser/prerender/prerender_manager_factory.cc @@ -16,7 +16,7 @@ #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/profile_sync_service_factory.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "extensions/browser/extension_system_provider.h" #include "extensions/browser/extensions_browser_client.h" @@ -61,7 +61,7 @@ PrerenderManagerFactory::PrerenderManagerFactory() PrerenderManagerFactory::~PrerenderManagerFactory() { } -BrowserContextKeyedService* PrerenderManagerFactory::BuildServiceInstanceFor( +KeyedService* PrerenderManagerFactory::BuildServiceInstanceFor( content::BrowserContext* browser_context) const { Profile* profile = Profile::FromBrowserContext(browser_context); CHECK(g_browser_process->prerender_tracker()); diff --git a/chrome/browser/prerender/prerender_manager_factory.h b/chrome/browser/prerender/prerender_manager_factory.h index 65d4290..b91926e 100644 --- a/chrome/browser/prerender/prerender_manager_factory.h +++ b/chrome/browser/prerender/prerender_manager_factory.h @@ -7,7 +7,7 @@ #include "base/compiler_specific.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -32,7 +32,7 @@ class PrerenderManagerFactory : public BrowserContextKeyedServiceFactory { virtual ~PrerenderManagerFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; diff --git a/chrome/browser/prerender/prerender_unittest.cc b/chrome/browser/prerender/prerender_unittest.cc index 484c09d..1af24ea 100644 --- a/chrome/browser/prerender/prerender_unittest.cc +++ b/chrome/browser/prerender/prerender_unittest.cc @@ -106,7 +106,7 @@ class UnitTestPrerenderManager : public PrerenderManager { virtual ~UnitTestPrerenderManager() { } - // From BrowserContextKeyedService, via PrererenderManager: + // From KeyedService, via PrererenderManager: virtual void Shutdown() OVERRIDE { if (next_prerender_contents()) next_prerender_contents_->Destroy(FINAL_STATUS_MANAGER_SHUTDOWN); diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h index 3426b16..3ccd5c2 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h +++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h @@ -13,7 +13,7 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/prefs/pref_change_registrar.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class Profile; class ServiceProcessControl; @@ -28,7 +28,7 @@ struct CloudPrintProxyInfo; // Layer between the browser user interface and the cloud print proxy code // running in the service process. -class CloudPrintProxyService : public BrowserContextKeyedService { +class CloudPrintProxyService : public KeyedService { public: explicit CloudPrintProxyService(Profile* profile); virtual ~CloudPrintProxyService(); diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc index 0e79f61..cd85a4e 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc @@ -6,7 +6,7 @@ #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static CloudPrintProxyService* CloudPrintProxyServiceFactory::GetForProfile( @@ -28,8 +28,7 @@ CloudPrintProxyServiceFactory::CloudPrintProxyServiceFactory() CloudPrintProxyServiceFactory::~CloudPrintProxyServiceFactory() { } -BrowserContextKeyedService* -CloudPrintProxyServiceFactory::BuildServiceInstanceFor( +KeyedService* CloudPrintProxyServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { CloudPrintProxyService* service = new CloudPrintProxyService(static_cast<Profile*>(profile)); diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h index a3e07b68..10694e2 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h +++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h @@ -7,7 +7,7 @@ #include "base/compiler_specific.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class CloudPrintProxyService; class Profile; @@ -30,7 +30,7 @@ class CloudPrintProxyServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~CloudPrintProxyServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; }; diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc index 5de0e38..f14bf6c 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc @@ -438,7 +438,7 @@ TEST_F(CloudPrintProxyPolicyTest, prefs->GetString(prefs::kCloudPrintEmail)); } -BrowserContextKeyedService* TestCloudPrintProxyServiceFactory( +KeyedService* TestCloudPrintProxyServiceFactory( content::BrowserContext* profile) { TestCloudPrintProxyService* service = new TestCloudPrintProxyService(static_cast<Profile*>(profile)); diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc index 62c6817..2a06cb7 100644 --- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc +++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc @@ -34,7 +34,7 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" #include "chrome/test/base/ui_test_utils.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_service.h" #include "content/public/test/test_browser_thread_bundle.h" #include "ipc/ipc_descriptors.h" @@ -501,7 +501,7 @@ TEST_F(CloudPrintProxyPolicyStartupTest, StartAndShutdown) { content::RunAllPendingInMessageLoop(); } -BrowserContextKeyedService* CloudPrintProxyServiceFactoryForPolicyTest( +KeyedService* CloudPrintProxyServiceFactoryForPolicyTest( content::BrowserContext* profile) { CloudPrintProxyService* service = new CloudPrintProxyService(static_cast<Profile*>(profile)); diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter.h b/chrome/browser/profile_resetter/automatic_profile_resetter.h index 010835e..9db561e 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter.h +++ b/chrome/browser/profile_resetter/automatic_profile_resetter.h @@ -14,7 +14,7 @@ #include "base/strings/string_piece.h" #include "base/task_runner.h" #include "chrome/browser/profile_resetter/automatic_profile_resetter_mementos.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class AutomaticProfileResetterDelegate; class Profile; @@ -34,7 +34,7 @@ class ListValue; // working after a short delay. // All methods in this class shall be called on the UI thread, except when noted // otherwise. -class AutomaticProfileResetter : public BrowserContextKeyedService { +class AutomaticProfileResetter : public KeyedService { public: // Enumeration listing the possible outcomes of triggering the profile reset // prompt. @@ -138,7 +138,7 @@ class AutomaticProfileResetter : public BrowserContextKeyedService { void SetTaskRunnerForWaitingForTesting( const scoped_refptr<base::TaskRunner>& task_runner); - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; private: diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc index b67d258..ee67cf5 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc +++ b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/ui/global_error/global_error_service_factory.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" #include "content/public/browser/browser_context.h" @@ -44,8 +44,7 @@ AutomaticProfileResetterFactory::AutomaticProfileResetterFactory() AutomaticProfileResetterFactory::~AutomaticProfileResetterFactory() {} -BrowserContextKeyedService* -AutomaticProfileResetterFactory::BuildServiceInstanceFor( +KeyedService* AutomaticProfileResetterFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = Profile::FromBrowserContext(context); AutomaticProfileResetter* service = new AutomaticProfileResetter(profile); diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h index 6e155f4..ddd3777 100644 --- a/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h +++ b/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_ #include "base/basictypes.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" template <typename T> struct DefaultSingletonTraits; @@ -40,7 +40,7 @@ class AutomaticProfileResetterFactory virtual ~AutomaticProfileResetterFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; // BrowserContextKeyedBaseFactory: diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc index f9055d6..28f87c5 100644 --- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc +++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc @@ -104,7 +104,7 @@ class ProfileResetterTest : public ExtensionServiceTestBase, TestingProfile* profile() { return profile_.get(); } - static BrowserContextKeyedService* CreateTemplateURLService( + static KeyedService* CreateTemplateURLService( content::BrowserContext* context); private: @@ -141,7 +141,7 @@ void ProfileResetterTest::SetUp() { } // static -BrowserContextKeyedService* ProfileResetterTest::CreateTemplateURLService( +KeyedService* ProfileResetterTest::CreateTemplateURLService( content::BrowserContext* context) { return new TemplateURLService(static_cast<Profile*>(context)); } diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h index e21f3d5..8e9c80e 100644 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h @@ -20,7 +20,7 @@ class ChromeBrowserMainExtraPartsProfiles : public ChromeBrowserMainExtraParts { ChromeBrowserMainExtraPartsProfiles(); virtual ~ChromeBrowserMainExtraPartsProfiles(); - // Instantiates all chrome BrowserContextKeyedService factories, which is + // Instantiates all chrome KeyedService factories, which is // especially important for services that should be created at profile // creation time as compared to lazily on first access. static void EnsureBrowserContextKeyedServiceFactoriesBuilt(); diff --git a/chrome/browser/profiles/gaia_info_update_service.h b/chrome/browser/profiles/gaia_info_update_service.h index 51d54f4..4e9a5a4 100644 --- a/chrome/browser/profiles/gaia_info_update_service.h +++ b/chrome/browser/profiles/gaia_info_update_service.h @@ -12,7 +12,7 @@ #include "base/timer/timer.h" #include "chrome/browser/profiles/profile_downloader.h" #include "chrome/browser/profiles/profile_downloader_delegate.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class Profile; class ProfileDownloader; @@ -20,7 +20,7 @@ class ProfileDownloader; // This service kicks off a download of the user's name and profile picture. // The results are saved in the profile info cache. class GAIAInfoUpdateService : public ProfileDownloaderDelegate, - public BrowserContextKeyedService { + public KeyedService { public: explicit GAIAInfoUpdateService(Profile* profile); virtual ~GAIAInfoUpdateService(); diff --git a/chrome/browser/profiles/gaia_info_update_service_factory.cc b/chrome/browser/profiles/gaia_info_update_service_factory.cc index ce7dc12..ba98034 100644 --- a/chrome/browser/profiles/gaia_info_update_service_factory.cc +++ b/chrome/browser/profiles/gaia_info_update_service_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/profiles/gaia_info_update_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" GAIAInfoUpdateServiceFactory::GAIAInfoUpdateServiceFactory() @@ -30,8 +30,7 @@ GAIAInfoUpdateServiceFactory* GAIAInfoUpdateServiceFactory::GetInstance() { return Singleton<GAIAInfoUpdateServiceFactory>::get(); } -BrowserContextKeyedService* -GAIAInfoUpdateServiceFactory::BuildServiceInstanceFor( +KeyedService* GAIAInfoUpdateServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); if (!GAIAInfoUpdateService::ShouldUseGAIAProfileInfo(profile)) diff --git a/chrome/browser/profiles/gaia_info_update_service_factory.h b/chrome/browser/profiles/gaia_info_update_service_factory.h index f7d6b02..304e9e8 100644 --- a/chrome/browser/profiles/gaia_info_update_service_factory.h +++ b/chrome/browser/profiles/gaia_info_update_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class GAIAInfoUpdateService; class Profile; @@ -35,7 +35,7 @@ class GAIAInfoUpdateServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~GAIAInfoUpdateServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; virtual void RegisterProfilePrefs( diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc index 1c357a6..810de68 100644 --- a/chrome/browser/profiles/off_the_record_profile_impl.cc +++ b/chrome/browser/profiles/off_the_record_profile_impl.cc @@ -41,7 +41,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/render_messages.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/user_prefs.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/host_zoom_map.h" diff --git a/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc b/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc index 31475c2..ac893d3 100644 --- a/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc +++ b/chrome/browser/profiles/off_the_record_profile_impl_unittest.cc @@ -17,7 +17,7 @@ #include "chrome/test/base/testing_pref_service_syncable.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "content/public/browser/host_zoom_map.h" #include "net/dns/mock_host_resolver.h" diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h index 9c6f216..6b0104e 100644 --- a/chrome/browser/profiles/profile.h +++ b/chrome/browser/profiles/profile.h @@ -69,7 +69,7 @@ class PrefRegistrySyncable; } // Instead of adding more members to Profile, consider creating a -// BrowserContextKeyedService. See +// KeyedService. See // http://dev.chromium.org/developers/design-documents/profile-architecture class Profile : public content::BrowserContext { public: diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 54d7669..b428d60 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -77,7 +77,7 @@ #include "chrome/common/net/url_fixer_upper.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/startup_metric_utils/startup_metric_utils.h" #include "components/user_prefs/pref_registry_syncable.h" #include "components/user_prefs/user_prefs.h" @@ -987,9 +987,9 @@ ProfileImpl::CreateRequestContextForStoragePartition( net::SSLConfigService* ProfileImpl::GetSSLConfigService() { // If ssl_config_service_manager_ is null, this typically means that some - // BrowserContextKeyedService is trying to create a RequestContext at startup, + // KeyedService is trying to create a RequestContext at startup, // but SSLConfigServiceManager is not initialized until DoFinalInit() which is - // invoked after all BrowserContextKeyedServices have been initialized (see + // invoked after all KeyedServices have been initialized (see // http://crbug.com/171406). DCHECK(ssl_config_service_manager_) << "SSLConfigServiceManager is not initialized yet"; diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h index 71291b8..3f7670d 100644 --- a/chrome/browser/profiles/profile_impl.h +++ b/chrome/browser/profiles/profile_impl.h @@ -219,9 +219,9 @@ class ProfileImpl : public Profile { // TODO(mnissler, joaodasilva): The |profile_policy_connector_| provides the // PolicyService that the |prefs_| depend on, and must outlive |prefs_|. - // This can be removed once |prefs_| becomes a BrowserContextKeyedService too. - // |profile_policy_connector_| in turn depends on |cloud_policy_manager_|, - // which depends on |schema_registry_service_|. +// This can be removed once |prefs_| becomes a KeyedService too. +// |profile_policy_connector_| in turn depends on |cloud_policy_manager_|, +// which depends on |schema_registry_service_|. #if defined(ENABLE_CONFIGURATION_POLICY) scoped_ptr<policy::SchemaRegistryService> schema_registry_service_; scoped_ptr<policy::CloudPolicyManager> cloud_policy_manager_; @@ -278,7 +278,7 @@ class ProfileImpl : public Profile { // and you can read the raw headers here: // // components/browser_context_keyed_service/browser_context_dependency_manager.{h,cc} - // components/browser_context_keyed_service/browser_context_keyed_service.h + // components/keyed_service/core/keyed_service.h // components/browser_context_keyed_service/browser_context_keyed_service_factory.{h,cc} Profile::Delegate* delegate_; diff --git a/chrome/browser/profiles/startup_task_runner_service.h b/chrome/browser/profiles/startup_task_runner_service.h index 11c5931..6f9ea74 100644 --- a/chrome/browser/profiles/startup_task_runner_service.h +++ b/chrome/browser/profiles/startup_task_runner_service.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "base/threading/non_thread_safe.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class Profile; @@ -18,7 +18,7 @@ class DeferredSequencedTaskRunner; // This service manages the startup task runners. class StartupTaskRunnerService : public base::NonThreadSafe, - public BrowserContextKeyedService { + public KeyedService { public: explicit StartupTaskRunnerService(Profile* profile); virtual ~StartupTaskRunnerService(); diff --git a/chrome/browser/profiles/startup_task_runner_service_factory.cc b/chrome/browser/profiles/startup_task_runner_service_factory.cc index fcf1215..0a84d69 100644 --- a/chrome/browser/profiles/startup_task_runner_service_factory.cc +++ b/chrome/browser/profiles/startup_task_runner_service_factory.cc @@ -6,7 +6,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/startup_task_runner_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" StartupTaskRunnerServiceFactory::StartupTaskRunnerServiceFactory() : BrowserContextKeyedServiceFactory( @@ -29,8 +29,7 @@ StartupTaskRunnerServiceFactory* return Singleton<StartupTaskRunnerServiceFactory>::get(); } -BrowserContextKeyedService* -StartupTaskRunnerServiceFactory::BuildServiceInstanceFor( +KeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new StartupTaskRunnerService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/profiles/startup_task_runner_service_factory.h b/chrome/browser/profiles/startup_task_runner_service_factory.h index d43507e..a9defbe6 100644 --- a/chrome/browser/profiles/startup_task_runner_service_factory.h +++ b/chrome/browser/profiles/startup_task_runner_service_factory.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class StartupTaskRunnerService; class PrefRegistrySyncable; @@ -31,7 +31,7 @@ class StartupTaskRunnerServiceFactory virtual ~StartupTaskRunnerServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerServiceFactory); diff --git a/chrome/browser/search/hotword_service.h b/chrome/browser/search/hotword_service.h index d52bf4f..f17bee9 100644 --- a/chrome/browser/search/hotword_service.h +++ b/chrome/browser/search/hotword_service.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ #include "base/basictypes.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class Profile; @@ -18,7 +18,7 @@ extern const char kHotwordFieldTrialDisabledGroupName[]; // Provides an interface for the Hotword component that does voice triggered // search. -class HotwordService : public BrowserContextKeyedService { +class HotwordService : public KeyedService { public: // Returns true if the hotword supports the current system language. static bool DoesHotwordSupportLanguage(Profile* profile); diff --git a/chrome/browser/search/hotword_service_factory.cc b/chrome/browser/search/hotword_service_factory.cc index a2b68b8..69ea28eb 100644 --- a/chrome/browser/search/hotword_service_factory.cc +++ b/chrome/browser/search/hotword_service_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search/hotword_service.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" #include "content/public/browser/browser_context.h" @@ -69,7 +69,7 @@ void HotwordServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); } -BrowserContextKeyedService* HotwordServiceFactory::BuildServiceInstanceFor( +KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( BrowserContext* context) const { return new HotwordService(Profile::FromBrowserContext(context)); } diff --git a/chrome/browser/search/hotword_service_factory.h b/chrome/browser/search/hotword_service_factory.h index 754b98d..97a1d13 100644 --- a/chrome/browser/search/hotword_service_factory.h +++ b/chrome/browser/search/hotword_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class HotwordService; class Profile; @@ -41,7 +41,7 @@ class HotwordServiceFactory : public BrowserContextKeyedServiceFactory { // Overrides from BrowserContextKeyedServiceFactory: virtual void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) OVERRIDE; - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(HotwordServiceFactory); diff --git a/chrome/browser/search/instant_service.h b/chrome/browser/search/instant_service.h index b5215fb..393d072 100644 --- a/chrome/browser/search/instant_service.h +++ b/chrome/browser/search/instant_service.h @@ -20,7 +20,7 @@ #include "chrome/browser/history/history_types.h" #include "chrome/browser/ui/search/instant_search_prerenderer.h" #include "chrome/common/instant_types.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -41,7 +41,7 @@ class URLRequest; } // Tracks render process host IDs that are associated with Instant. -class InstantService : public BrowserContextKeyedService, +class InstantService : public KeyedService, public content::NotificationObserver { public: explicit InstantService(Profile* profile); @@ -110,7 +110,7 @@ class InstantService : public BrowserContextKeyedService, FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, ProcessIsolation); FRIEND_TEST_ALL_PREFIXES(InstantServiceTest, SendsSearchURLsToRenderer); - // Overridden from BrowserContextKeyedService: + // Overridden from KeyedService: virtual void Shutdown() OVERRIDE; // Overridden from content::NotificationObserver: diff --git a/chrome/browser/search/instant_service_factory.cc b/chrome/browser/search/instant_service_factory.cc index d586aa4..a88402e 100644 --- a/chrome/browser/search/instant_service_factory.cc +++ b/chrome/browser/search/instant_service_factory.cc @@ -10,7 +10,7 @@ #include "chrome/browser/search/search.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/themes/theme_service_factory.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static InstantService* InstantServiceFactory::GetForProfile(Profile* profile) { @@ -44,7 +44,7 @@ content::BrowserContext* InstantServiceFactory::GetBrowserContextToUse( return chrome::GetBrowserContextOwnInstanceInIncognito(context); } -BrowserContextKeyedService* InstantServiceFactory::BuildServiceInstanceFor( +KeyedService* InstantServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return chrome::IsInstantExtendedAPIEnabled() ? new InstantService(static_cast<Profile*>(profile)) : NULL; diff --git a/chrome/browser/search/instant_service_factory.h b/chrome/browser/search/instant_service_factory.h index a5a75c3..57dc698 100644 --- a/chrome/browser/search/instant_service_factory.h +++ b/chrome/browser/search/instant_service_factory.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class InstantService; class Profile; @@ -30,7 +30,7 @@ class InstantServiceFactory : public BrowserContextKeyedServiceFactory { // Overridden from BrowserContextKeyedServiceFactory: virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(InstantServiceFactory); diff --git a/chrome/browser/search/suggestions/suggestions_service.h b/chrome/browser/search/suggestions/suggestions_service.h index b3430f0..972cfce 100644 --- a/chrome/browser/search/suggestions/suggestions_service.h +++ b/chrome/browser/search/suggestions/suggestions_service.h @@ -13,7 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "net/url_request/url_fetcher_delegate.h" #include "url/gurl.h" @@ -27,8 +27,7 @@ extern const char kSuggestionsFieldTrialStateParam[]; extern const char kSuggestionsFieldTrialStateEnabled[]; // An interface to fetch server suggestions asynchronously. -class SuggestionsService : public BrowserContextKeyedService, - public net::URLFetcherDelegate { +class SuggestionsService : public KeyedService, public net::URLFetcherDelegate { public: typedef base::Callback<void(const SuggestionsProfile&)> ResponseCallback; @@ -52,7 +51,7 @@ class SuggestionsService : public BrowserContextKeyedService, // and dispatches them to callbacks stored in queue. virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; // Contains the current suggestions fetch request. Will only have a value diff --git a/chrome/browser/search/suggestions/suggestions_service_factory.cc b/chrome/browser/search/suggestions/suggestions_service_factory.cc index 8c68a41..557291f 100644 --- a/chrome/browser/search/suggestions/suggestions_service_factory.cc +++ b/chrome/browser/search/suggestions/suggestions_service_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search/suggestions/suggestions_service.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" namespace suggestions { @@ -43,7 +43,7 @@ content::BrowserContext* SuggestionsServiceFactory::GetBrowserContextToUse( return chrome::GetBrowserContextRedirectedInIncognito(context); } -BrowserContextKeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor( +KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new SuggestionsService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/search/suggestions/suggestions_service_factory.h b/chrome/browser/search/suggestions/suggestions_service_factory.h index 6bef856..b939c74 100644 --- a/chrome/browser/search/suggestions/suggestions_service_factory.h +++ b/chrome/browser/search/suggestions/suggestions_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SEARCH_SUGGESTIONS_SUGGESTIONS_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -32,7 +32,7 @@ class SuggestionsServiceFactory : public BrowserContextKeyedServiceFactory { // Overrides from BrowserContextKeyedServiceFactory: virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(SuggestionsServiceFactory); diff --git a/chrome/browser/search_engines/template_url_fetcher.h b/chrome/browser/search_engines/template_url_fetcher.h index 230837f..d85ec19 100644 --- a/chrome/browser/search_engines/template_url_fetcher.h +++ b/chrome/browser/search_engines/template_url_fetcher.h @@ -7,7 +7,7 @@ #include "base/memory/scoped_vector.h" #include "base/strings/string16.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "ui/gfx/native_widget_types.h" class GURL; @@ -23,7 +23,7 @@ class WebContents; // documents, creating a TemplateURL from the OSDD, and adding the TemplateURL // to the TemplateURLService. Downloading is done in the background. // -class TemplateURLFetcher : public BrowserContextKeyedService { +class TemplateURLFetcher : public KeyedService { public: enum ProviderType { AUTODETECTED_PROVIDER, diff --git a/chrome/browser/search_engines/template_url_fetcher_factory.cc b/chrome/browser/search_engines/template_url_fetcher_factory.cc index 1e0849e..30a07a4 100644 --- a/chrome/browser/search_engines/template_url_fetcher_factory.cc +++ b/chrome/browser/search_engines/template_url_fetcher_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url_fetcher.h" #include "chrome/browser/search_engines/template_url_service_factory.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static TemplateURLFetcher* TemplateURLFetcherFactory::GetForProfile( @@ -39,7 +39,7 @@ TemplateURLFetcherFactory::TemplateURLFetcherFactory() TemplateURLFetcherFactory::~TemplateURLFetcherFactory() { } -BrowserContextKeyedService* TemplateURLFetcherFactory::BuildServiceInstanceFor( +KeyedService* TemplateURLFetcherFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new TemplateURLFetcher(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/search_engines/template_url_fetcher_factory.h b/chrome/browser/search_engines/template_url_fetcher_factory.h index 7c8174c..1e5c9d8 100644 --- a/chrome/browser/search_engines/template_url_fetcher_factory.h +++ b/chrome/browser/search_engines/template_url_fetcher_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_FETCHER_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; class TemplateURLFetcher; @@ -31,7 +31,7 @@ class TemplateURLFetcherFactory : public BrowserContextKeyedServiceFactory { virtual ~TemplateURLFetcherFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc index bc88cbc..1e107b0 100644 --- a/chrome/browser/search_engines/template_url_service.cc +++ b/chrome/browser/search_engines/template_url_service.cc @@ -901,7 +901,7 @@ void TemplateURLService::Observe(int type, void TemplateURLService::Shutdown() { // This check has to be done at Shutdown() instead of in the dtor to ensure // that no clients of WebDataService are holding ptrs to it after the first - // phase of the BrowserContextKeyedService Shutdown() process. + // phase of the KeyedService Shutdown() process. if (load_handle_) { DCHECK(service_.get()); service_->CancelRequest(load_handle_); diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h index 3a77111..6d919d6 100644 --- a/chrome/browser/search_engines/template_url_service.h +++ b/chrome/browser/search_engines/template_url_service.h @@ -18,7 +18,7 @@ #include "base/prefs/pref_change_registrar.h" #include "chrome/browser/search_engines/template_url_id.h" #include "chrome/browser/webdata/web_data_service.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "sync/api/sync_change.h" @@ -62,7 +62,7 @@ struct URLVisitedDetails; // TemplateURLService handles deletion. class TemplateURLService : public WebDataServiceConsumer, - public BrowserContextKeyedService, + public KeyedService, public content::NotificationObserver, public syncer::SyncableService { public: @@ -306,7 +306,7 @@ class TemplateURLService : public WebDataServiceConsumer, const content::NotificationSource& source, const content::NotificationDetails& details) OVERRIDE; - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; // syncer::SyncableService implementation. diff --git a/chrome/browser/search_engines/template_url_service_factory.cc b/chrome/browser/search_engines/template_url_service_factory.cc index b991d3e..43124af 100644 --- a/chrome/browser/search_engines/template_url_service_factory.cc +++ b/chrome/browser/search_engines/template_url_service_factory.cc @@ -13,7 +13,7 @@ #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/webdata/web_data_service_factory.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" // static @@ -28,7 +28,7 @@ TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() { } // static -BrowserContextKeyedService* TemplateURLServiceFactory::BuildInstanceFor( +KeyedService* TemplateURLServiceFactory::BuildInstanceFor( content::BrowserContext* profile) { return new TemplateURLService(static_cast<Profile*>(profile)); } @@ -44,7 +44,7 @@ TemplateURLServiceFactory::TemplateURLServiceFactory() TemplateURLServiceFactory::~TemplateURLServiceFactory() {} -BrowserContextKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor( +KeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return BuildInstanceFor(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/search_engines/template_url_service_factory.h b/chrome/browser/search_engines/template_url_service_factory.h index 30588271..4561428 100644 --- a/chrome/browser/search_engines/template_url_service_factory.h +++ b/chrome/browser/search_engines/template_url_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; class TemplateURLService; @@ -19,8 +19,7 @@ class TemplateURLServiceFactory : public BrowserContextKeyedServiceFactory { static TemplateURLServiceFactory* GetInstance(); - static BrowserContextKeyedService* BuildInstanceFor( - content::BrowserContext* profile); + static KeyedService* BuildInstanceFor(content::BrowserContext* profile); private: friend struct DefaultSingletonTraits<TemplateURLServiceFactory>; @@ -29,7 +28,7 @@ class TemplateURLServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~TemplateURLServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) OVERRIDE; diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc index 3f61682..b36832a 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.cc +++ b/chrome/browser/search_engines/template_url_service_test_util.cc @@ -27,7 +27,7 @@ // SetKeywordSearchTermsForURL. class TestingTemplateURLService : public TemplateURLService { public: - static BrowserContextKeyedService* Build(content::BrowserContext* profile) { + static KeyedService* Build(content::BrowserContext* profile) { return new TestingTemplateURLService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.cc b/chrome/browser/services/gcm/fake_gcm_profile_service.cc index b789d15..c812cf6 100644 --- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc +++ b/chrome/browser/services/gcm/fake_gcm_profile_service.cc @@ -13,8 +13,7 @@ namespace gcm { // static -BrowserContextKeyedService* FakeGCMProfileService::Build( - content::BrowserContext* context) { +KeyedService* FakeGCMProfileService::Build(content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); return new FakeGCMProfileService(profile); } diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.h b/chrome/browser/services/gcm/fake_gcm_profile_service.h index 324a887..889e2fd 100644 --- a/chrome/browser/services/gcm/fake_gcm_profile_service.h +++ b/chrome/browser/services/gcm/fake_gcm_profile_service.h @@ -17,8 +17,8 @@ namespace gcm { class FakeGCMProfileService : public GCMProfileService { public: // Helper function to be used with - // BrowserContextKeyedService::SetTestingFactory(). - static BrowserContextKeyedService* Build(content::BrowserContext* context); + // KeyedService::SetTestingFactory(). + static KeyedService* Build(content::BrowserContext* context); explicit FakeGCMProfileService(Profile* profile); virtual ~FakeGCMProfileService(); diff --git a/chrome/browser/services/gcm/gcm_profile_service.h b/chrome/browser/services/gcm/gcm_profile_service.h index 9db002b..b6f7598 100644 --- a/chrome/browser/services/gcm/gcm_profile_service.h +++ b/chrome/browser/services/gcm/gcm_profile_service.h @@ -15,7 +15,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/signin/signin_manager_base.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "google_apis/gcm/gcm_client.h" @@ -41,7 +41,7 @@ class GCMEventRouter; class GCMProfileServiceTestConsumer; // Acts as a bridge between GCM API and GCMClient layer. It is profile based. -class GCMProfileService : public BrowserContextKeyedService, +class GCMProfileService : public KeyedService, public content::NotificationObserver, public SigninManagerBase::Observer { public: @@ -88,7 +88,7 @@ class GCMProfileService : public BrowserContextKeyedService, void Stop(); - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; // Registers |sender_id| for an app. A registration ID will be returned by diff --git a/chrome/browser/services/gcm/gcm_profile_service_factory.cc b/chrome/browser/services/gcm/gcm_profile_service_factory.cc index 72f3ffc..2a5b4c5 100644 --- a/chrome/browser/services/gcm/gcm_profile_service_factory.cc +++ b/chrome/browser/services/gcm/gcm_profile_service_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/services/gcm/gcm_client_factory.h" #include "chrome/browser/services/gcm/gcm_profile_service.h" #include "chrome/browser/signin/signin_manager_factory.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace gcm { @@ -38,7 +38,7 @@ GCMProfileServiceFactory::GCMProfileServiceFactory() GCMProfileServiceFactory::~GCMProfileServiceFactory() { } -BrowserContextKeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor( +KeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); GCMProfileService* service = new GCMProfileService(profile); diff --git a/chrome/browser/services/gcm/gcm_profile_service_factory.h b/chrome/browser/services/gcm/gcm_profile_service_factory.h index 228a703..be27b7d 100644 --- a/chrome/browser/services/gcm/gcm_profile_service_factory.h +++ b/chrome/browser/services/gcm/gcm_profile_service_factory.h @@ -7,7 +7,7 @@ #include "base/compiler_specific.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -30,7 +30,7 @@ class GCMProfileServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~GCMProfileServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; diff --git a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc index fc784f0..23b9d85 100644 --- a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc +++ b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc @@ -255,12 +255,12 @@ class FakeGCMClientFactory : public GCMClientFactory { class GCMProfileServiceTestConsumer : public GCMProfileService::TestingDelegate{ public: - static BrowserContextKeyedService* BuildFakeSigninManager( + static KeyedService* BuildFakeSigninManager( content::BrowserContext* context) { return new FakeSigninManager(static_cast<Profile*>(context)); } - static BrowserContextKeyedService* BuildGCMProfileService( + static KeyedService* BuildGCMProfileService( content::BrowserContext* context) { return new GCMProfileService(static_cast<Profile*>(context)); } diff --git a/chrome/browser/sessions/in_memory_tab_restore_service.cc b/chrome/browser/sessions/in_memory_tab_restore_service.cc index 98a0895..4d2856f 100644 --- a/chrome/browser/sessions/in_memory_tab_restore_service.cc +++ b/chrome/browser/sessions/in_memory_tab_restore_service.cc @@ -89,7 +89,7 @@ void InMemoryTabRestoreService::DeleteLastSession() { void InMemoryTabRestoreService::Shutdown() { } -BrowserContextKeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( +KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new InMemoryTabRestoreService(static_cast<Profile*>(profile), NULL); } diff --git a/chrome/browser/sessions/persistent_tab_restore_service.cc b/chrome/browser/sessions/persistent_tab_restore_service.cc index e9feebb..b5d482d 100644 --- a/chrome/browser/sessions/persistent_tab_restore_service.cc +++ b/chrome/browser/sessions/persistent_tab_restore_service.cc @@ -987,7 +987,7 @@ void PersistentTabRestoreService::PruneEntries() { helper_.PruneEntries(); } -BrowserContextKeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( +KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new PersistentTabRestoreService(static_cast<Profile*>(profile), NULL); } diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index d2b0967..c6a7535 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -207,7 +207,7 @@ SessionService::SessionService(const base::FilePath& save_path) SessionService::~SessionService() { // The BrowserList should outlive the SessionService since it's static and - // the SessionService is a BrowserContextKeyedService. + // the SessionService is a KeyedService. BrowserList::RemoveObserver(this); Save(); } diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h index 215083c..9890c89 100644 --- a/chrome/browser/sessions/session_service.h +++ b/chrome/browser/sessions/session_service.h @@ -19,7 +19,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_list_observer.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "ui/base/ui_base_types.h" @@ -55,7 +55,7 @@ class WebContents; // SessionService rebuilds the contents of the file from the open state of the // browser. class SessionService : public BaseSessionService, - public BrowserContextKeyedService, + public KeyedService, public content::NotificationObserver, public chrome::BrowserListObserver { friend class SessionServiceTestHelper; diff --git a/chrome/browser/sessions/session_service_factory.cc b/chrome/browser/sessions/session_service_factory.cc index 6744b78..99a7e8b 100644 --- a/chrome/browser/sessions/session_service_factory.cc +++ b/chrome/browser/sessions/session_service_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_data_deleter.h" #include "chrome/browser/sessions/session_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static SessionService* SessionServiceFactory::GetForProfile(Profile* profile) { @@ -75,7 +75,7 @@ SessionServiceFactory::SessionServiceFactory() SessionServiceFactory::~SessionServiceFactory() { } -BrowserContextKeyedService* SessionServiceFactory::BuildServiceInstanceFor( +KeyedService* SessionServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { SessionService* service = NULL; service = new SessionService(static_cast<Profile*>(profile)); diff --git a/chrome/browser/sessions/session_service_factory.h b/chrome/browser/sessions/session_service_factory.h index 5d2b31a..2cf3ade 100644 --- a/chrome/browser/sessions/session_service_factory.h +++ b/chrome/browser/sessions/session_service_factory.h @@ -8,7 +8,7 @@ #include "base/memory/singleton.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_service.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" // Singleton that owns all SessionServices and associates them with // Profiles. Listens for the Profile's destruction notification and cleans up @@ -62,7 +62,7 @@ class SessionServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~SessionServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h index a80b302..fa2e4ac 100644 --- a/chrome/browser/sessions/tab_restore_service.h +++ b/chrome/browser/sessions/tab_restore_service.h @@ -14,7 +14,7 @@ #include "chrome/browser/sessions/session_id.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/ui/host_desktop.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/sessions/serialized_navigation_entry.h" #include "content/public/browser/session_storage_namespace.h" #include "ui/base/window_open_disposition.h" @@ -38,7 +38,7 @@ class WebContents; // // To listen for changes to the set of entries managed by the TabRestoreService // add an observer. -class TabRestoreService : public BrowserContextKeyedService { +class TabRestoreService : public KeyedService { public: // Interface used to allow the test to provide a custom time. class TimeFactory { diff --git a/chrome/browser/sessions/tab_restore_service_factory.cc b/chrome/browser/sessions/tab_restore_service_factory.cc index 0cf92c7..3c457ed9 100644 --- a/chrome/browser/sessions/tab_restore_service_factory.cc +++ b/chrome/browser/sessions/tab_restore_service_factory.cc @@ -6,7 +6,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/tab_restore_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static TabRestoreService* TabRestoreServiceFactory::GetForProfile(Profile* profile) { diff --git a/chrome/browser/sessions/tab_restore_service_factory.h b/chrome/browser/sessions/tab_restore_service_factory.h index 8908e97..86fb371 100644 --- a/chrome/browser/sessions/tab_restore_service_factory.h +++ b/chrome/browser/sessions/tab_restore_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class TabRestoreService; class Profile; @@ -33,7 +33,7 @@ class TabRestoreServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~TabRestoreServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; }; diff --git a/chrome/browser/speech/tts_extension_loader_chromeos.cc b/chrome/browser/speech/tts_extension_loader_chromeos.cc index 9e325ba..da2f787 100644 --- a/chrome/browser/speech/tts_extension_loader_chromeos.cc +++ b/chrome/browser/speech/tts_extension_loader_chromeos.cc @@ -8,17 +8,17 @@ #include "base/memory/singleton.h" #include "chrome/browser/extensions/component_loader.h" #include "chrome/browser/extensions/extension_service.h" -#include "extensions/browser/extension_system.h" #include "chrome/browser/extensions/extension_system_factory.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" #include "chrome/browser/speech/tts_controller.h" #include "chrome/common/extensions/extension_constants.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" +#include "components/keyed_service/core/keyed_service.h" #include "extensions/browser/event_router.h" +#include "extensions/browser/extension_system.h" #include "grit/browser_resources.h" // Factory to load one instance of TtsExtensionLoaderChromeOs per profile. @@ -52,7 +52,7 @@ class TtsExtensionLoaderChromeOsFactory return chrome::GetBrowserContextRedirectedInIncognito(context); } - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE { return new TtsExtensionLoaderChromeOs(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/speech/tts_extension_loader_chromeos.h b/chrome/browser/speech/tts_extension_loader_chromeos.h index 6485042..62a848c 100644 --- a/chrome/browser/speech/tts_extension_loader_chromeos.h +++ b/chrome/browser/speech/tts_extension_loader_chromeos.h @@ -5,16 +5,15 @@ #ifndef CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ #define CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "extensions/browser/event_router.h" class Profile; // Profile-keyed class that loads a built-in TTS component extension // into a given profile on Chrome OS. -class TtsExtensionLoaderChromeOs - : public BrowserContextKeyedService, - public extensions::EventRouter::Observer { +class TtsExtensionLoaderChromeOs : public KeyedService, + public extensions::EventRouter::Observer { public: static TtsExtensionLoaderChromeOs* GetInstance(Profile* profile); @@ -24,7 +23,7 @@ class TtsExtensionLoaderChromeOs // extension finishes loading. bool LoadTtsExtension(); - // Implementation of BrowserContextKeyedService. + // Implementation of KeyedService. virtual void Shutdown() OVERRIDE; // Implementation of extensions::EventRouter::Observer. diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc index 1011242..8c00892 100644 --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc @@ -57,8 +57,7 @@ syncer::SyncDataList GetAllSyncDataNoLimit( } // namespace -static BrowserContextKeyedService* BuildSpellcheckService( - content::BrowserContext* profile) { +static KeyedService* BuildSpellcheckService(content::BrowserContext* profile) { return new SpellcheckService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc index 29f5035..4116ff6 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.cc +++ b/chrome/browser/spellchecker/spellcheck_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/spellchecker/spellcheck_service.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" #include "components/user_prefs/user_prefs.h" #include "content/public/browser/render_process_host.h" @@ -50,7 +50,7 @@ SpellcheckServiceFactory::SpellcheckServiceFactory() SpellcheckServiceFactory::~SpellcheckServiceFactory() {} -BrowserContextKeyedService* SpellcheckServiceFactory::BuildServiceInstanceFor( +KeyedService* SpellcheckServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { // Many variables are initialized from the |context| in the SpellcheckService. SpellcheckService* spellcheck = new SpellcheckService(context); diff --git a/chrome/browser/spellchecker/spellcheck_factory.h b/chrome/browser/spellchecker/spellcheck_factory.h index a387fe1..d2f4679 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.h +++ b/chrome/browser/spellchecker/spellcheck_factory.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/gtest_prod_util.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class SpellcheckService; @@ -32,7 +32,7 @@ class SpellcheckServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~SpellcheckServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; virtual void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) OVERRIDE; diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h index 2a8b399..8ab8bc7 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h @@ -14,7 +14,7 @@ #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" #include "chrome/common/spellcheck_common.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -33,7 +33,7 @@ class BrowserContext; // Encapsulates the browser side spellcheck service. There is one of these per // profile and each is created by the SpellCheckServiceFactory. The // SpellcheckService maintains any per-profile information about spellcheck. -class SpellcheckService : public BrowserContextKeyedService, +class SpellcheckService : public KeyedService, public content::NotificationObserver, public SpellcheckCustomDictionary::Observer, public SpellcheckHunspellDictionary::Observer { diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc index c481af2..f6cd718 100644 --- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc @@ -17,8 +17,7 @@ using chrome::spellcheck_common::WordList; -static BrowserContextKeyedService* BuildSpellcheckService( - content::BrowserContext* profile) { +static KeyedService* BuildSpellcheckService(content::BrowserContext* profile) { return new SpellcheckService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc index 4f965cf..79c8137b 100644 --- a/chrome/browser/sync/profile_sync_service_factory.cc +++ b/chrome/browser/sync/profile_sync_service_factory.cc @@ -75,7 +75,7 @@ ProfileSyncServiceFactory::ProfileSyncServiceFactory() #endif DependsOn(WebDataServiceFactory::GetInstance()); - // The following have not been converted to BrowserContextKeyedServices yet, + // The following have not been converted to KeyedServices yet, // and for now they are explicitly destroyed after the // BrowserContextDependencyManager is told to DestroyBrowserContextServices, // so they will be around when the ProfileSyncService is destroyed. diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.h b/chrome/browser/sync_file_system/drive_backend/sync_engine.h index 45c7703..25e1ee5 100644 --- a/chrome/browser/sync_file_system/drive_backend/sync_engine.h +++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.h @@ -189,7 +189,7 @@ class SyncEngine : public RemoteFileSyncService, // These external services are not owned by SyncEngine. // The owner of the SyncEngine is responsible for their lifetime. // I.e. the owner should declare the dependency explicitly by calling - // BrowserContextKeyedService::DependsOn(). + // KeyedService::DependsOn(). drive::DriveNotificationManager* notification_manager_; ExtensionServiceInterface* extension_service_; ProfileOAuth2TokenService* auth_token_service_; diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc index ecce07d..3f0ee5e 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service.cc +++ b/chrome/browser/sync_file_system/sync_file_system_service.cc @@ -26,7 +26,7 @@ #include "chrome/browser/sync_file_system/sync_process_runner.h" #include "chrome/browser/sync_file_system/sync_status_code.h" #include "chrome/browser/sync_file_system/syncable_file_system_util.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/sync_file_system/sync_file_system_service.h b/chrome/browser/sync_file_system/sync_file_system_service.h index 4359d25..8831beb 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service.h +++ b/chrome/browser/sync_file_system/sync_file_system_service.h @@ -21,7 +21,7 @@ #include "chrome/browser/sync_file_system/remote_file_sync_service.h" #include "chrome/browser/sync_file_system/sync_callbacks.h" #include "chrome/browser/sync_file_system/sync_service_state.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "url/gurl.h" @@ -42,7 +42,7 @@ class SyncEventObserver; class SyncProcessRunner; class SyncFileSystemService - : public BrowserContextKeyedService, + : public KeyedService, public ProfileSyncServiceObserver, public FileStatusObserver, public content::NotificationObserver, @@ -50,7 +50,7 @@ class SyncFileSystemService public: typedef base::Callback<void(const base::ListValue* files)> DumpFilesCallback; - // BrowserContextKeyedService overrides. + // KeyedService overrides. virtual void Shutdown() OVERRIDE; void InitializeForApp( diff --git a/chrome/browser/sync_file_system/sync_file_system_service_factory.cc b/chrome/browser/sync_file_system/sync_file_system_service_factory.cc index 05a607a..3a22e1c 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service_factory.cc +++ b/chrome/browser/sync_file_system/sync_file_system_service_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/sync_file_system/local/local_file_sync_service.h" #include "chrome/browser/sync_file_system/sync_file_system_service.h" #include "chrome/browser/sync_file_system/syncable_file_system_util.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace sync_file_system { @@ -55,8 +55,7 @@ SyncFileSystemServiceFactory::SyncFileSystemServiceFactory() SyncFileSystemServiceFactory::~SyncFileSystemServiceFactory() {} -BrowserContextKeyedService* -SyncFileSystemServiceFactory::BuildServiceInstanceFor( +KeyedService* SyncFileSystemServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = Profile::FromBrowserContext(context); diff --git a/chrome/browser/sync_file_system/sync_file_system_service_factory.h b/chrome/browser/sync_file_system/sync_file_system_service_factory.h index 61893dd..84fc34f 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service_factory.h +++ b/chrome/browser/sync_file_system/sync_file_system_service_factory.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; @@ -37,7 +37,7 @@ class SyncFileSystemServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~SyncFileSystemServiceFactory(); // BrowserContextKeyedServiceFactory overrides. - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; mutable scoped_ptr<RemoteFileSyncService> mock_remote_file_service_; diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h index b5db207..767c9b5 100644 --- a/chrome/browser/themes/theme_service.h +++ b/chrome/browser/themes/theme_service.h @@ -15,7 +15,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/threading/non_thread_safe.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "ui/base/theme_provider.h" @@ -58,7 +58,7 @@ extern "C" NSString* const kBrowserThemeDidChangeNotification; class ThemeService : public base::NonThreadSafe, public content::NotificationObserver, - public BrowserContextKeyedService, + public KeyedService, public ui::ThemeProvider { public: // Public constants used in ThemeService and its subclasses: diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc index 930dcf6..4bfe354 100644 --- a/chrome/browser/themes/theme_service_factory.cc +++ b/chrome/browser/themes/theme_service_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" #if defined(TOOLKIT_GTK) @@ -51,7 +51,7 @@ ThemeServiceFactory::ThemeServiceFactory() ThemeServiceFactory::~ThemeServiceFactory() {} -BrowserContextKeyedService* ThemeServiceFactory::BuildServiceInstanceFor( +KeyedService* ThemeServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { ThemeService* provider = NULL; #if defined(TOOLKIT_GTK) diff --git a/chrome/browser/themes/theme_service_factory.h b/chrome/browser/themes/theme_service_factory.h index 2c7df11..44db7e3 100644 --- a/chrome/browser/themes/theme_service_factory.h +++ b/chrome/browser/themes/theme_service_factory.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class Profile; class ThemeService; @@ -40,7 +40,7 @@ class ThemeServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~ThemeServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) OVERRIDE; diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index 8f0a2a3..9ab0175 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc @@ -114,8 +114,7 @@ class FakeThemeService : public ThemeService { bool is_dirty_; }; -BrowserContextKeyedService* BuildMockThemeService( - content::BrowserContext* profile) { +KeyedService* BuildMockThemeService(content::BrowserContext* profile) { return new FakeThemeService; } diff --git a/chrome/browser/thumbnails/thumbnail_service.h b/chrome/browser/thumbnails/thumbnail_service.h index 207ae57..2239b2b 100644 --- a/chrome/browser/thumbnails/thumbnail_service.h +++ b/chrome/browser/thumbnails/thumbnail_service.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_ #include "chrome/common/thumbnail_score.h" -#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service.h" +#include "components/keyed_service/content/refcounted_browser_context_keyed_service.h" #include "ui/gfx/image/image.h" class GURL; diff --git a/chrome/browser/thumbnails/thumbnail_service_factory.cc b/chrome/browser/thumbnails/thumbnail_service_factory.cc index 8c7de72..dec7910 100644 --- a/chrome/browser/thumbnails/thumbnail_service_factory.cc +++ b/chrome/browser/thumbnails/thumbnail_service_factory.cc @@ -7,7 +7,7 @@ #include "base/logging.h" #include "chrome/browser/thumbnails/thumbnail_service.h" #include "chrome/browser/thumbnails/thumbnail_service_impl.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" using thumbnails::ThumbnailService; using thumbnails::ThumbnailServiceImpl; diff --git a/chrome/browser/thumbnails/thumbnail_service_factory.h b/chrome/browser/thumbnails/thumbnail_service_factory.h index 6249ef1..76d02f9 100644 --- a/chrome/browser/thumbnails/thumbnail_service_factory.h +++ b/chrome/browser/thumbnails/thumbnail_service_factory.h @@ -7,7 +7,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h" class Profile; diff --git a/chrome/browser/translate/translate_accept_languages_factory.cc b/chrome/browser/translate/translate_accept_languages_factory.cc index ee66865..ff8cbcc 100644 --- a/chrome/browser/translate/translate_accept_languages_factory.cc +++ b/chrome/browser/translate/translate_accept_languages_factory.cc @@ -8,15 +8,15 @@ #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/translate/core/browser/translate_accept_languages.h" namespace { // TranslateAcceptLanguagesService is a thin container for // TranslateAcceptLanguages to enable associating it with a BrowserContext. -class TranslateAcceptLanguagesService : public BrowserContextKeyedService { +class TranslateAcceptLanguagesService : public KeyedService { public: explicit TranslateAcceptLanguagesService(PrefService* prefs); virtual ~TranslateAcceptLanguagesService(); @@ -59,8 +59,7 @@ TranslateAcceptLanguagesFactory::TranslateAcceptLanguagesFactory() TranslateAcceptLanguagesFactory::~TranslateAcceptLanguagesFactory() {} -BrowserContextKeyedService* -TranslateAcceptLanguagesFactory::BuildServiceInstanceFor( +KeyedService* TranslateAcceptLanguagesFactory::BuildServiceInstanceFor( content::BrowserContext* browser_context) const { Profile* profile = Profile::FromBrowserContext(browser_context); return new TranslateAcceptLanguagesService(profile->GetPrefs()); diff --git a/chrome/browser/translate/translate_accept_languages_factory.h b/chrome/browser/translate/translate_accept_languages_factory.h index 4b61e39..f44f47d 100644 --- a/chrome/browser/translate/translate_accept_languages_factory.h +++ b/chrome/browser/translate/translate_accept_languages_factory.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class TranslateAcceptLanguages; @@ -27,7 +27,7 @@ class TranslateAcceptLanguagesFactory virtual ~TranslateAcceptLanguagesFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; diff --git a/chrome/browser/undo/bookmark_undo_service.h b/chrome/browser/undo/bookmark_undo_service.h index 6ea0ed4..beeec00 100644 --- a/chrome/browser/undo/bookmark_undo_service.h +++ b/chrome/browser/undo/bookmark_undo_service.h @@ -11,7 +11,7 @@ #include "chrome/browser/bookmarks/bookmark_node_data.h" #include "chrome/browser/undo/bookmark_renumber_observer.h" #include "chrome/browser/undo/undo_manager.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class Profile; namespace { @@ -23,7 +23,7 @@ class BookmarkUndoOperation; // BookmarkUndoService is owned by the profile, and is responsible for observing // BookmarkModel changes in order to provide an undo for those changes. class BookmarkUndoService : public BaseBookmarkModelObserver, - public BrowserContextKeyedService, + public KeyedService, public BookmarkRenumberObserver { public: explicit BookmarkUndoService(Profile* profile); diff --git a/chrome/browser/undo/bookmark_undo_service_factory.cc b/chrome/browser/undo/bookmark_undo_service_factory.cc index c7c10d7..1359a02 100644 --- a/chrome/browser/undo/bookmark_undo_service_factory.cc +++ b/chrome/browser/undo/bookmark_undo_service_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/undo/bookmark_undo_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static BookmarkUndoService* BookmarkUndoServiceFactory::GetForProfile( @@ -31,7 +31,7 @@ BookmarkUndoServiceFactory::BookmarkUndoServiceFactory() BookmarkUndoServiceFactory::~BookmarkUndoServiceFactory() { } -BrowserContextKeyedService* BookmarkUndoServiceFactory::BuildServiceInstanceFor( +KeyedService* BookmarkUndoServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); return new BookmarkUndoService(profile); diff --git a/chrome/browser/undo/bookmark_undo_service_factory.h b/chrome/browser/undo/bookmark_undo_service_factory.h index 4c2f4f8..9bfb82f 100644 --- a/chrome/browser/undo/bookmark_undo_service_factory.h +++ b/chrome/browser/undo/bookmark_undo_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UNDO_BOOKMARK_UNDO_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" class BookmarkUndoService; class Profile; @@ -24,7 +24,7 @@ class BookmarkUndoServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~BookmarkUndoServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(BookmarkUndoServiceFactory); diff --git a/chrome/browser/webdata/web_data_service_factory.cc b/chrome/browser/webdata/web_data_service_factory.cc index e268f93..ac077c5 100644 --- a/chrome/browser/webdata/web_data_service_factory.cc +++ b/chrome/browser/webdata/web_data_service_factory.cc @@ -20,7 +20,7 @@ #include "components/autofill/core/browser/webdata/autofill_profile_syncable_service.h" #include "components/autofill/core/browser/webdata/autofill_table.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/signin/core/webdata/token_service_table.h" #include "components/signin/core/webdata/token_web_data.h" #include "components/webdata/common/webdata_constants.h" @@ -228,7 +228,7 @@ content::BrowserContext* WebDataServiceFactory::GetBrowserContextToUse( return chrome::GetBrowserContextRedirectedInIncognito(context); } -BrowserContextKeyedService* WebDataServiceFactory::BuildServiceInstanceFor( +KeyedService* WebDataServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new WebDataServiceWrapper(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/webdata/web_data_service_factory.h b/chrome/browser/webdata/web_data_service_factory.h index a8d848e..3eded2d 100644 --- a/chrome/browser/webdata/web_data_service_factory.h +++ b/chrome/browser/webdata/web_data_service_factory.h @@ -9,8 +9,8 @@ #include "base/memory/ref_counted.h" #include "base/memory/singleton.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/webdata/common/web_database_service.h" class TokenWebData; @@ -21,7 +21,7 @@ class AutofillWebDataService; } // namespace autofill // A wrapper of WebDataService so that we can use it as a profile keyed service. -class WebDataServiceWrapper : public BrowserContextKeyedService { +class WebDataServiceWrapper : public KeyedService { public: explicit WebDataServiceWrapper(Profile* profile); @@ -30,7 +30,7 @@ class WebDataServiceWrapper : public BrowserContextKeyedService { virtual ~WebDataServiceWrapper(); - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; virtual scoped_refptr<autofill::AutofillWebDataService> GetAutofillWebData(); @@ -82,7 +82,7 @@ class WebDataServiceFactory : public BrowserContextKeyedServiceFactory { // |BrowserContextKeyedBaseFactory| methods: virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |