diff options
author | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-13 13:10:45 +0000 |
---|---|---|
committer | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-13 13:10:45 +0000 |
commit | 396b0c71f6b94aadab9395a059d50ec282ff29e9 (patch) | |
tree | 31e568b8cfc45b2cf8babfe8bc9bfdb89888c653 | |
parent | d64bbadf8de48fab8dafa5874f51f5ae99c588cc (diff) | |
download | chromium_src-396b0c71f6b94aadab9395a059d50ec282ff29e9.zip chromium_src-396b0c71f6b94aadab9395a059d50ec282ff29e9.tar.gz chromium_src-396b0c71f6b94aadab9395a059d50ec282ff29e9.tar.bz2 |
Move clients of BrowserContextKeyedService to use KeyedService
The moved clients are the ones in:
- //chrome/browser/signin
- //chrome/browser/sync
- //chrome/browser/ui
BUG=351704
TBR=jochen
Review URL: https://codereview.chromium.org/197473005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256808 0039d316-1c4b-4281-b951-d872f2087c98
82 files changed, 166 insertions, 190 deletions
diff --git a/chrome/browser/signin/about_signin_internals.h b/chrome/browser/signin/about_signin_internals.h index 8b2aca3..6207393 100644 --- a/chrome/browser/signin/about_signin_internals.h +++ b/chrome/browser/signin/about_signin_internals.h @@ -14,7 +14,7 @@ #include "chrome/browser/signin/signin_internals_util.h" #include "chrome/browser/signin/signin_manager.h" #include "chrome/browser/signin/signin_manager_factory.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "google_apis/gaia/oauth2_token_service.h" class Profile; @@ -26,7 +26,7 @@ typedef std::pair<std::string, std::string> TimedSigninStatusValue; // This class collects authentication, signin and token information // to propagate to about:signin-internals via SigninInternalsUI. class AboutSigninInternals - : public BrowserContextKeyedService, + : public KeyedService, public signin_internals_util::SigninDiagnosticsObserver, public OAuth2TokenService::DiagnosticsObserver { public: @@ -60,7 +60,7 @@ class AboutSigninInternals void Initialize(Profile* profile); - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; // Returns a dictionary of values in signin_status_ for use in diff --git a/chrome/browser/signin/about_signin_internals_factory.cc b/chrome/browser/signin/about_signin_internals_factory.cc index bd17a00..462484c 100644 --- a/chrome/browser/signin/about_signin_internals_factory.cc +++ b/chrome/browser/signin/about_signin_internals_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_internals_util.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 "google_apis/gaia/gaia_constants.h" @@ -64,8 +64,7 @@ void AboutSigninInternalsFactory::RegisterProfilePrefs( } } -BrowserContextKeyedService* -AboutSigninInternalsFactory::BuildServiceInstanceFor( +KeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { AboutSigninInternals* service = new AboutSigninInternals(); service->Initialize(static_cast<Profile*>(profile)); diff --git a/chrome/browser/signin/about_signin_internals_factory.h b/chrome/browser/signin/about_signin_internals_factory.h index 59e6a7e..3cc5ada 100644 --- a/chrome/browser/signin/about_signin_internals_factory.h +++ b/chrome/browser/signin/about_signin_internals_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_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 AboutSigninInternals; class Profile; @@ -33,7 +33,7 @@ class AboutSigninInternalsFactory : public BrowserContextKeyedServiceFactory { virtual ~AboutSigninInternalsFactory(); // BrowserContextKeyedServiceFactory - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; }; diff --git a/chrome/browser/signin/account_reconcilor.h b/chrome/browser/signin/account_reconcilor.h index b024a0e..f86a1ac 100644 --- a/chrome/browser/signin/account_reconcilor.h +++ b/chrome/browser/signin/account_reconcilor.h @@ -15,7 +15,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "chrome/browser/signin/signin_manager.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/gaia/gaia_auth_consumer.h" @@ -27,7 +27,7 @@ class GaiaAuthFetcher; class Profile; struct ChromeCookieDetails; -class AccountReconcilor : public BrowserContextKeyedService, +class AccountReconcilor : public KeyedService, public content::NotificationObserver, public GaiaAuthConsumer, public MergeSessionHelper::Observer, @@ -40,7 +40,7 @@ class AccountReconcilor : public BrowserContextKeyedService, void Initialize(bool start_reconcile_if_tokens_available); - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; // Add or remove observers for the merge session notification. diff --git a/chrome/browser/signin/account_reconcilor_factory.cc b/chrome/browser/signin/account_reconcilor_factory.cc index 3fb0f79..10f18bd 100644 --- a/chrome/browser/signin/account_reconcilor_factory.cc +++ b/chrome/browser/signin/account_reconcilor_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.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" AccountReconcilorFactory::AccountReconcilorFactory() : BrowserContextKeyedServiceFactory( @@ -31,7 +31,7 @@ AccountReconcilorFactory* AccountReconcilorFactory::GetInstance() { return Singleton<AccountReconcilorFactory>::get(); } -BrowserContextKeyedService* AccountReconcilorFactory::BuildServiceInstanceFor( +KeyedService* AccountReconcilorFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { AccountReconcilor* reconcilor = new AccountReconcilor(static_cast<Profile*>(context)); diff --git a/chrome/browser/signin/account_reconcilor_factory.h b/chrome/browser/signin/account_reconcilor_factory.h index f17fdf1..e27c4c2 100644 --- a/chrome/browser/signin/account_reconcilor_factory.h +++ b/chrome/browser/signin/account_reconcilor_factory.h @@ -7,7 +7,7 @@ #include "base/memory/singleton.h" #include "chrome/browser/signin/account_reconcilor.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 AccountReconcilor; class Profile; @@ -31,7 +31,7 @@ class AccountReconcilorFactory : public BrowserContextKeyedServiceFactory { virtual ~AccountReconcilorFactory(); // 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/signin/account_reconcilor_unittest.cc b/chrome/browser/signin/account_reconcilor_unittest.cc index f794dd2..c184891 100644 --- a/chrome/browser/signin/account_reconcilor_unittest.cc +++ b/chrome/browser/signin/account_reconcilor_unittest.cc @@ -27,7 +27,7 @@ const char kTestEmail[] = "user@gmail.com"; class MockAccountReconcilor : public testing::StrictMock<AccountReconcilor> { public: - static BrowserContextKeyedService* Build(content::BrowserContext* profile); + static KeyedService* Build(content::BrowserContext* profile); explicit MockAccountReconcilor(Profile* profile); virtual ~MockAccountReconcilor() {} @@ -45,8 +45,7 @@ class MockAccountReconcilor : public testing::StrictMock<AccountReconcilor> { }; // static -BrowserContextKeyedService* MockAccountReconcilor::Build( - content::BrowserContext* profile) { +KeyedService* MockAccountReconcilor::Build(content::BrowserContext* profile) { AccountReconcilor* reconcilor = new MockAccountReconcilor(static_cast<Profile*>(profile)); reconcilor->Initialize(false /* start_reconcile_if_tokens_available */); diff --git a/chrome/browser/signin/chrome_signin_client.h b/chrome/browser/signin/chrome_signin_client.h index 12bb164..4bd7369 100644 --- a/chrome/browser/signin/chrome_signin_client.h +++ b/chrome/browser/signin/chrome_signin_client.h @@ -7,14 +7,13 @@ #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/signin/core/signin_client.h" class CookieSettings; class Profile; -class ChromeSigninClient : public SigninClient, - public BrowserContextKeyedService { +class ChromeSigninClient : public SigninClient, public KeyedService { public: explicit ChromeSigninClient(Profile* profile); virtual ~ChromeSigninClient(); diff --git a/chrome/browser/signin/chrome_signin_client_factory.cc b/chrome/browser/signin/chrome_signin_client_factory.cc index baec2ef..5e42a14 100644 --- a/chrome/browser/signin/chrome_signin_client_factory.cc +++ b/chrome/browser/signin/chrome_signin_client_factory.cc @@ -5,7 +5,7 @@ #include "chrome/browser/signin/chrome_signin_client_factory.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" ChromeSigninClientFactory::ChromeSigninClientFactory() : BrowserContextKeyedServiceFactory( @@ -25,7 +25,7 @@ ChromeSigninClientFactory* ChromeSigninClientFactory::GetInstance() { return Singleton<ChromeSigninClientFactory>::get(); } -BrowserContextKeyedService* ChromeSigninClientFactory::BuildServiceInstanceFor( +KeyedService* ChromeSigninClientFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { ChromeSigninClient* client = new ChromeSigninClient(static_cast<Profile*>(context)); diff --git a/chrome/browser/signin/chrome_signin_client_factory.h b/chrome/browser/signin/chrome_signin_client_factory.h index fb7f2ad..06a0825 100644 --- a/chrome/browser/signin/chrome_signin_client_factory.h +++ b/chrome/browser/signin/chrome_signin_client_factory.h @@ -7,7 +7,7 @@ #include "base/memory/singleton.h" #include "chrome/browser/signin/chrome_signin_client.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 ChromeSigninClientFactory : public BrowserContextKeyedServiceFactory { virtual ~ChromeSigninClientFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; }; diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.cc b/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.cc index 86a3599..5484c20 100644 --- a/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.cc +++ b/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.cc @@ -7,14 +7,14 @@ #include "chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h" // static -BrowserContextKeyedService* FakeProfileOAuth2TokenServiceWrapper::Build( +KeyedService* FakeProfileOAuth2TokenServiceWrapper::Build( content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); return new FakeProfileOAuth2TokenServiceWrapper(profile, false); } // static -BrowserContextKeyedService* +KeyedService* FakeProfileOAuth2TokenServiceWrapper::BuildAutoIssuingTokenService( content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h b/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h index f749b94..17fc7bf 100644 --- a/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h +++ b/chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h @@ -16,14 +16,14 @@ class FakeProfileOAuth2TokenServiceWrapper : public ProfileOAuth2TokenServiceWrapper { public: // Helper function to be used with - // BrowserContextKeyedService::SetTestingFactory(). - static BrowserContextKeyedService* Build(content::BrowserContext* context); + // KeyedService::SetTestingFactory(). + static KeyedService* Build(content::BrowserContext* context); // Helper function to be used with - // BrowserContextKeyedService::SetTestingFactory() that creates a + // KeyedService::SetTestingFactory() that creates a // FakeProfileOAuth2TokenService object that posts fetch responses on the // current message loop. - static BrowserContextKeyedService* BuildAutoIssuingTokenService( + static KeyedService* BuildAutoIssuingTokenService( content::BrowserContext* context); FakeProfileOAuth2TokenServiceWrapper(Profile* profile, diff --git a/chrome/browser/signin/fake_signin_manager.cc b/chrome/browser/signin/fake_signin_manager.cc index b796506..ac6a042 100644 --- a/chrome/browser/signin/fake_signin_manager.cc +++ b/chrome/browser/signin/fake_signin_manager.cc @@ -23,8 +23,7 @@ FakeSigninManagerBase::~FakeSigninManagerBase() { } // static -BrowserContextKeyedService* FakeSigninManagerBase::Build( - content::BrowserContext* context) { +KeyedService* FakeSigninManagerBase::Build(content::BrowserContext* context) { SigninManagerBase* manager; Profile* profile = static_cast<Profile*>(context); #if defined(OS_CHROMEOS) diff --git a/chrome/browser/signin/fake_signin_manager.h b/chrome/browser/signin/fake_signin_manager.h index 4ea03e6..82fcb92 100644 --- a/chrome/browser/signin/fake_signin_manager.h +++ b/chrome/browser/signin/fake_signin_manager.h @@ -23,11 +23,11 @@ class FakeSigninManagerBase : public SigninManagerBase { virtual ~FakeSigninManagerBase(); // Helper function to be used with - // BrowserContextKeyedService::SetTestingFactory(). In order to match + // KeyedService::SetTestingFactory(). In order to match // the API of SigninManagerFactory::GetForProfile(), returns a // FakeSigninManagerBase* on ChromeOS, and a FakeSigninManager* on all other // platforms. The returned instance is initialized. - static BrowserContextKeyedService* Build(content::BrowserContext* context); + static KeyedService* Build(content::BrowserContext* context); }; #if !defined(OS_CHROMEOS) diff --git a/chrome/browser/signin/profile_oauth2_token_service.h b/chrome/browser/signin/profile_oauth2_token_service.h index f277c61..668e47a 100644 --- a/chrome/browser/signin/profile_oauth2_token_service.h +++ b/chrome/browser/signin/profile_oauth2_token_service.h @@ -10,7 +10,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/linked_ptr.h" #include "chrome/browser/signin/signin_global_error.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "google_apis/gaia/oauth2_token_service.h" namespace net { diff --git a/chrome/browser/signin/profile_oauth2_token_service_factory.cc b/chrome/browser/signin/profile_oauth2_token_service_factory.cc index f781e39..be35495 100644 --- a/chrome/browser/signin/profile_oauth2_token_service_factory.cc +++ b/chrome/browser/signin/profile_oauth2_token_service_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/signin/profile_oauth2_token_service.h" #include "chrome/browser/ui/global_error/global_error_service_factory.h" #include "chrome/browser/webdata/web_data_service_factory.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #if defined(OS_ANDROID) #include "chrome/browser/signin/android_profile_oauth2_token_service.h" @@ -26,7 +26,7 @@ class ProfileOAuth2TokenServiceWrapperImpl // ProfileOAuth2TokenServiceWrapper: virtual ProfileOAuth2TokenService* GetProfileOAuth2TokenService() OVERRIDE; - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; private: @@ -91,8 +91,7 @@ ProfileOAuth2TokenServiceFactory* return Singleton<ProfileOAuth2TokenServiceFactory>::get(); } -BrowserContextKeyedService* -ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor( +KeyedService* ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); return new ProfileOAuth2TokenServiceWrapperImpl(profile); diff --git a/chrome/browser/signin/profile_oauth2_token_service_factory.h b/chrome/browser/signin/profile_oauth2_token_service_factory.h index ab58937..c58626c 100644 --- a/chrome/browser/signin/profile_oauth2_token_service_factory.h +++ b/chrome/browser/signin/profile_oauth2_token_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_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 ProfileOAuth2TokenService; class Profile; @@ -18,7 +18,7 @@ class MutableProfileOAuth2TokenService; #endif // A wrapper of ProfileOAuth2TokenService so we can use it as a BCKS. -class ProfileOAuth2TokenServiceWrapper : public BrowserContextKeyedService { +class ProfileOAuth2TokenServiceWrapper : public KeyedService { public: virtual ProfileOAuth2TokenService* GetProfileOAuth2TokenService() = 0; }; @@ -64,7 +64,7 @@ class ProfileOAuth2TokenServiceFactory virtual ~ProfileOAuth2TokenServiceFactory(); // BrowserContextKeyedServiceFactory implementation. - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceFactory); diff --git a/chrome/browser/signin/signin_manager.h b/chrome/browser/signin/signin_manager.h index ff269d6..a0e5622 100644 --- a/chrome/browser/signin/signin_manager.h +++ b/chrome/browser/signin/signin_manager.h @@ -34,7 +34,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/signin_internals_util.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/render_process_host_observer.h" #include "google_apis/gaia/gaia_auth_consumer.h" #include "google_apis/gaia/google_service_auth_error.h" diff --git a/chrome/browser/signin/signin_manager_base.h b/chrome/browser/signin/signin_manager_base.h index 5b609d6..127bc13 100644 --- a/chrome/browser/signin/signin_manager_base.h +++ b/chrome/browser/signin/signin_manager_base.h @@ -34,7 +34,7 @@ #include "base/prefs/pref_member.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/signin_internals_util.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "google_apis/gaia/google_service_auth_error.h" class CookieSettings; @@ -62,7 +62,7 @@ struct GoogleServiceSignoutDetails { std::string username; }; -class SigninManagerBase : public BrowserContextKeyedService { +class SigninManagerBase : public KeyedService { public: class Observer { public: @@ -125,7 +125,7 @@ class SigninManagerBase : public BrowserContextKeyedService { // Returns true if there's a signin in progress. virtual bool AuthInProgress() const; - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; // Methods to register or remove observers of signin. diff --git a/chrome/browser/signin/signin_manager_factory.cc b/chrome/browser/signin/signin_manager_factory.cc index 89838ca..0c4d6d7 100644 --- a/chrome/browser/signin/signin_manager_factory.cc +++ b/chrome/browser/signin/signin_manager_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager.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" SigninManagerFactory::SigninManagerFactory() @@ -120,7 +120,7 @@ void SigninManagerFactory::NotifyObserversOfSigninManagerCreationForTesting( FOR_EACH_OBSERVER(Observer, observer_list_, SigninManagerCreated(manager)); } -BrowserContextKeyedService* SigninManagerFactory::BuildServiceInstanceFor( +KeyedService* SigninManagerFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { SigninManagerBase* service = NULL; Profile* profile = static_cast<Profile*>(context); diff --git a/chrome/browser/signin/signin_manager_factory.h b/chrome/browser/signin/signin_manager_factory.h index 0dcbe27..03f17f9 100644 --- a/chrome/browser/signin/signin_manager_factory.h +++ b/chrome/browser/signin/signin_manager_factory.h @@ -7,7 +7,7 @@ #include "base/memory/singleton.h" #include "base/observer_list.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 SigninManager; class SigninManagerBase; @@ -86,7 +86,7 @@ class SigninManagerFactory : public BrowserContextKeyedServiceFactory { #endif // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual void BrowserContextShutdown(content::BrowserContext* context) OVERRIDE; diff --git a/chrome/browser/signin/signin_manager_unittest.cc b/chrome/browser/signin/signin_manager_unittest.cc index 7c37082..be8bdfa 100644 --- a/chrome/browser/signin/signin_manager_unittest.cc +++ b/chrome/browser/signin/signin_manager_unittest.cc @@ -50,8 +50,7 @@ const char kGetTokenPairValidResponse[] = const char kUberAuthTokenURLFormat[] = "?source=%s&issueuberauth=1"; -BrowserContextKeyedService* SigninManagerBuild( - content::BrowserContext* context) { +KeyedService* SigninManagerBuild(content::BrowserContext* context) { SigninManager* service = NULL; Profile* profile = static_cast<Profile*>(context); service = new SigninManager( diff --git a/chrome/browser/signin/signin_tracker.h b/chrome/browser/signin/signin_tracker.h index 69dbcc3..c88b441 100644 --- a/chrome/browser/signin/signin_tracker.h +++ b/chrome/browser/signin/signin_tracker.h @@ -31,7 +31,7 @@ class Profile; // // LoginUIService - Our desktop UI flows rely on having only a single login flow // visible to the user at once. This is achieved via LoginUIService -// (a BrowserContextKeyedService that keeps track of the currently visible +// (a KeyedService that keeps track of the currently visible // login UI). // // SigninManager - Records the currently-logged-in user and handles all diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc index 656fe1b..b94d98c 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc @@ -112,7 +112,7 @@ class FakeWebDataService : public AutofillWebDataService { class MockWebDataServiceWrapperSyncable : public MockWebDataServiceWrapper { public: - static BrowserContextKeyedService* Build(content::BrowserContext* profile) { + static KeyedService* Build(content::BrowserContext* profile) { return new MockWebDataServiceWrapperSyncable(); } diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc index 7898980..9d5f48e 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc @@ -21,7 +21,7 @@ #include "chrome/browser/sync/profile_sync_components_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.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 "components/sync_driver/data_type_controller_mock.h" #include "components/sync_driver/model_associator_mock.h" #include "content/public/browser/notification_service.h" @@ -54,21 +54,19 @@ class HistoryMock : public HistoryService { virtual ~HistoryMock() {} }; -BrowserContextKeyedService* BuildBookmarkModel( - content::BrowserContext* context) { +KeyedService* BuildBookmarkModel(content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); BookmarkModel* bookmark_model = new BookmarkModel(profile); bookmark_model->Load(profile->GetIOTaskRunner()); return bookmark_model; } -BrowserContextKeyedService* BuildBookmarkModelWithoutLoading( +KeyedService* BuildBookmarkModelWithoutLoading( content::BrowserContext* profile) { return new BookmarkModel(static_cast<Profile*>(profile)); } -BrowserContextKeyedService* BuildHistoryService( - content::BrowserContext* profile) { +KeyedService* BuildHistoryService(content::BrowserContext* profile) { return new HistoryMock(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/sync/glue/favicon_cache.h b/chrome/browser/sync/glue/favicon_cache.h index ea4c8f5..7901684 100644 --- a/chrome/browser/sync/glue/favicon_cache.h +++ b/chrome/browser/sync/glue/favicon_cache.h @@ -44,7 +44,7 @@ enum IconSize { struct SyncedFaviconInfo; // Encapsulates the logic for loading and storing synced favicons. -// TODO(zea): make this a BrowserContextKeyedService. +// TODO(zea): make this a KeyedService. class FaviconCache : public syncer::SyncableService, public content::NotificationObserver { public: diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index 27cd83e..eb89d2f 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -28,7 +28,7 @@ #include "chrome/browser/sync/sessions2/sessions_sync_manager.h" #include "chrome/browser/sync/startup_controller.h" #include "chrome/browser/sync/sync_prefs.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/sync_driver/data_type_controller.h" #include "components/sync_driver/data_type_encryption_handler.h" #include "components/sync_driver/data_type_manager.h" @@ -167,18 +167,17 @@ using browser_sync::SessionsSyncManager; // tell the sync engine that setup is completed and it can begin downloading // data from the sync server. // -class ProfileSyncService - : public ProfileSyncServiceBase, - public browser_sync::SyncFrontend, - public browser_sync::SyncPrefObserver, - public browser_sync::DataTypeManagerObserver, - public syncer::UnrecoverableErrorHandler, - public content::NotificationObserver, - public BrowserContextKeyedService, - public browser_sync::DataTypeEncryptionHandler, - public OAuth2TokenService::Consumer, - public OAuth2TokenService::Observer, - public SessionsSyncManager::SyncInternalApiDelegate { +class ProfileSyncService : public ProfileSyncServiceBase, + public browser_sync::SyncFrontend, + public browser_sync::SyncPrefObserver, + public browser_sync::DataTypeManagerObserver, + public syncer::UnrecoverableErrorHandler, + public content::NotificationObserver, + public KeyedService, + public browser_sync::DataTypeEncryptionHandler, + public OAuth2TokenService::Consumer, + public OAuth2TokenService::Observer, + public SessionsSyncManager::SyncInternalApiDelegate { public: typedef browser_sync::SyncBackendHost::Status Status; @@ -683,7 +682,7 @@ class ProfileSyncService virtual void OnRefreshTokenRevoked(const std::string& account_id) OVERRIDE; virtual void OnRefreshTokensLoaded() OVERRIDE; - // BrowserContextKeyedService implementation. This must be called exactly + // KeyedService implementation. This must be called exactly // once (before this object is destroyed). virtual void Shutdown() OVERRIDE; diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc index 03462a6..3792262 100644 --- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc @@ -338,8 +338,7 @@ class WebDataServiceFake : public AutofillWebDataService { DISALLOW_COPY_AND_ASSIGN(WebDataServiceFake); }; -BrowserContextKeyedService* BuildMockWebDataServiceWrapper( - content::BrowserContext* profile) { +KeyedService* BuildMockWebDataServiceWrapper(content::BrowserContext* profile) { return new MockWebDataServiceWrapper( NULL, new WebDataServiceFake(), @@ -453,7 +452,7 @@ class MockPersonalDataManager : public PersonalDataManager { class MockPersonalDataManagerService : public autofill::PersonalDataManagerService { public: - static BrowserContextKeyedService* Build(content::BrowserContext* profile) { + static KeyedService* Build(content::BrowserContext* profile) { return new MockPersonalDataManagerService(); } diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc index 93c202a..4f965cf 100644 --- a/chrome/browser/sync/profile_sync_service_factory.cc +++ b/chrome/browser/sync/profile_sync_service_factory.cc @@ -31,7 +31,7 @@ #include "chrome/browser/ui/global_error/global_error_service_factory.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 "extensions/browser/extension_system_provider.h" #include "extensions/browser/extensions_browser_client.h" @@ -86,7 +86,7 @@ ProfileSyncServiceFactory::ProfileSyncServiceFactory() ProfileSyncServiceFactory::~ProfileSyncServiceFactory() { } -BrowserContextKeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor( +KeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); diff --git a/chrome/browser/sync/profile_sync_service_factory.h b/chrome/browser/sync/profile_sync_service_factory.h index 0ad8c2a..89916ed 100644 --- a/chrome/browser/sync/profile_sync_service_factory.h +++ b/chrome/browser/sync/profile_sync_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; class ProfileSyncService; @@ -26,7 +26,7 @@ class ProfileSyncServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~ProfileSyncServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; }; diff --git a/chrome/browser/sync/profile_sync_service_mock.cc b/chrome/browser/sync/profile_sync_service_mock.cc index 333aa34..aeefd04 100644 --- a/chrome/browser/sync/profile_sync_service_mock.cc +++ b/chrome/browser/sync/profile_sync_service_mock.cc @@ -34,7 +34,7 @@ TestingProfile* ProfileSyncServiceMock::MakeSignedInTestingProfile() { } // static -BrowserContextKeyedService* ProfileSyncServiceMock::BuildMockProfileSyncService( +KeyedService* ProfileSyncServiceMock::BuildMockProfileSyncService( content::BrowserContext* profile) { return new ProfileSyncServiceMock(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/sync/profile_sync_service_mock.h b/chrome/browser/sync/profile_sync_service_mock.h index fa9c3f0..15eb0ee 100644 --- a/chrome/browser/sync/profile_sync_service_mock.h +++ b/chrome/browser/sync/profile_sync_service_mock.h @@ -33,7 +33,7 @@ class ProfileSyncServiceMock : public ProfileSyncService { // Helper routine to be used in conjunction with // BrowserContextKeyedServiceFactory::SetTestingFactory(). - static BrowserContextKeyedService* BuildMockProfileSyncService( + static KeyedService* BuildMockProfileSyncService( content::BrowserContext* profile); MOCK_METHOD0(DisableForUser, void()); diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc index d1a710f..9c8ce39 100644 --- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc @@ -90,8 +90,7 @@ class ProfileSyncServiceStartupTest : public testing::Test { profile_.reset(); } - static BrowserContextKeyedService* BuildService( - content::BrowserContext* browser_context) { + static KeyedService* BuildService(content::BrowserContext* browser_context) { Profile* profile = static_cast<Profile*>(browser_context); return new ProfileSyncService( new ProfileSyncComponentsFactoryMock(), @@ -151,8 +150,7 @@ class ProfileSyncServiceStartupCrosTest : public ProfileSyncServiceStartupTest { sync_->AddObserver(&observer_); } - static BrowserContextKeyedService* BuildCrosService( - content::BrowserContext* context) { + static KeyedService* BuildCrosService(content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile); diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc index c8c988d..396f700 100644 --- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc @@ -41,7 +41,7 @@ #include "chrome/browser/sync/profile_sync_test_util.h" #include "chrome/browser/sync/test_profile_sync_service.h" #include "chrome/test/base/testing_profile.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 "components/sync_driver/data_type_error_handler_mock.h" #include "content/public/browser/notification_service.h" #include "google_apis/gaia/gaia_constants.h" @@ -110,8 +110,7 @@ class HistoryServiceMock : public HistoryService { virtual ~HistoryServiceMock() {} }; -BrowserContextKeyedService* BuildHistoryService( - content::BrowserContext* profile) { +KeyedService* BuildHistoryService(content::BrowserContext* profile) { return new HistoryServiceMock(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/sync/sync_global_error_unittest.cc b/chrome/browser/sync/sync_global_error_unittest.cc index a1f06da..b35399e 100644 --- a/chrome/browser/sync/sync_global_error_unittest.cc +++ b/chrome/browser/sync/sync_global_error_unittest.cc @@ -51,8 +51,7 @@ class FakeLoginUI : public LoginUIService::LoginUI { int focus_ui_call_count_; }; -BrowserContextKeyedService* BuildMockLoginUIService( - content::BrowserContext* profile) { +KeyedService* BuildMockLoginUIService(content::BrowserContext* profile) { return new FakeLoginUIService(); } diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index 6f06c11..c540f7f 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc @@ -105,8 +105,7 @@ void SetProxyConfigCallback( done->Signal(); } -BrowserContextKeyedService* BuildP2PInvalidationService( - content::BrowserContext* context) { +KeyedService* BuildP2PInvalidationService(content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); return new invalidation::P2PInvalidationService(profile); } diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc index 6a92bff..3bdba1f 100644 --- a/chrome/browser/sync/test_profile_sync_service.cc +++ b/chrome/browser/sync/test_profile_sync_service.cc @@ -114,7 +114,7 @@ TestProfileSyncService::~TestProfileSyncService() { } // static -BrowserContextKeyedService* TestProfileSyncService::TestFactoryFunction( +KeyedService* TestProfileSyncService::TestFactoryFunction( content::BrowserContext* context) { Profile* profile = static_cast<Profile*>(context); SigninManagerBase* signin = diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h index d3c4102..fff476d 100644 --- a/chrome/browser/sync/test_profile_sync_service.h +++ b/chrome/browser/sync/test_profile_sync_service.h @@ -93,8 +93,7 @@ class TestProfileSyncService : public ProfileSyncService { syncer::TestIdFactory* id_factory(); protected: - static BrowserContextKeyedService* TestFactoryFunction( - content::BrowserContext* profile); + static KeyedService* TestFactoryFunction(content::BrowserContext* profile); // Return NULL handle to use in backend initialization to avoid receiving // js messages on UI loop when it's being destroyed, which are not deleted diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.h b/chrome/browser/ui/app_list/app_list_syncable_service.h index 7ba1dd8..5dc066f 100644 --- a/chrome/browser/ui/app_list/app_list_syncable_service.h +++ b/chrome/browser/ui/app_list/app_list_syncable_service.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/sync/glue/sync_start_util.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/string_ordinal.h" @@ -38,7 +38,7 @@ class AppListModel; // Keyed Service that owns, stores, and syncs an AppListModel for a profile. class AppListSyncableService : public syncer::SyncableService, - public BrowserContextKeyedService, + public KeyedService, public content::NotificationObserver { public: struct SyncItem { diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc index 4a1cc37..d34b213 100644 --- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc +++ b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/app_list/app_list_syncable_service.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.h" #include "extensions/browser/extension_system_provider.h" #include "extensions/browser/extensions_browser_client.h" @@ -38,8 +38,7 @@ AppListSyncableServiceFactory::AppListSyncableServiceFactory() AppListSyncableServiceFactory::~AppListSyncableServiceFactory() { } -BrowserContextKeyedService* -AppListSyncableServiceFactory::BuildServiceInstanceFor( +KeyedService* AppListSyncableServiceFactory::BuildServiceInstanceFor( content::BrowserContext* browser_context) const { Profile* profile = static_cast<Profile*>(browser_context); return new AppListSyncableService(profile, diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.h b/chrome/browser/ui/app_list/app_list_syncable_service_factory.h index e00b367..e26c714 100644 --- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.h +++ b/chrome/browser/ui/app_list/app_list_syncable_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; @@ -31,7 +31,7 @@ class AppListSyncableServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~AppListSyncableServiceFactory(); // 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/ui/app_list/search/common/webservice_cache.h b/chrome/browser/ui/app_list/search/common/webservice_cache.h index 8bedd16..c45f33c 100644 --- a/chrome/browser/ui/app_list/search/common/webservice_cache.h +++ b/chrome/browser/ui/app_list/search/common/webservice_cache.h @@ -13,7 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "chrome/browser/ui/app_list/search/common/dictionary_data_store.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" namespace base { class DictionaryValue; @@ -38,7 +38,7 @@ typedef std::pair<ResultStatus, const base::DictionaryValue*> CacheResult; // during an input session. This will reduce unnecessary queries for typing // backspace or so on. This is not meant to hold cache entries across multiple // search sessions. -class WebserviceCache : public BrowserContextKeyedService, +class WebserviceCache : public KeyedService, public base::SupportsWeakPtr<WebserviceCache> { public: enum QueryType { diff --git a/chrome/browser/ui/app_list/search/common/webservice_cache_factory.cc b/chrome/browser/ui/app_list/search/common/webservice_cache_factory.cc index b87276c..73e273f 100644 --- a/chrome/browser/ui/app_list/search/common/webservice_cache_factory.cc +++ b/chrome/browser/ui/app_list/search/common/webservice_cache_factory.cc @@ -6,7 +6,7 @@ #include "base/memory/singleton.h" #include "chrome/browser/ui/app_list/search/common/webservice_cache.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace app_list { @@ -29,7 +29,7 @@ WebserviceCacheFactory::WebserviceCacheFactory() WebserviceCacheFactory::~WebserviceCacheFactory() {} -BrowserContextKeyedService* WebserviceCacheFactory::BuildServiceInstanceFor( +KeyedService* WebserviceCacheFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { return new WebserviceCache(context); } diff --git a/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h b/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h index a7ad11b..c82d737 100644 --- a/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h +++ b/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_WEBSERVICE_CACHE_FACTORY_H_ #define CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_WEBSERVICE_CACHE_FACTORY_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; @@ -34,7 +34,7 @@ class WebserviceCacheFactory : public BrowserContextKeyedServiceFactory { virtual ~WebserviceCacheFactory(); // BrowserContextKeyedServiceFactory overrides: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(WebserviceCacheFactory); diff --git a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h index 4e3ce06..4be1c21 100644 --- a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h +++ b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h @@ -34,7 +34,7 @@ class WebserviceSearchProvider : public SearchProvider { protected: Profile* profile_; - WebserviceCache* cache_; // BrowserContextKeyedService, not owned. + WebserviceCache* cache_; // KeyedService, not owned. private: bool IsSensitiveInput(const base::string16& query); diff --git a/chrome/browser/ui/app_list/search/history.h b/chrome/browser/ui/app_list/search/history.h index 0464461..3e4f334 100644 --- a/chrome/browser/ui/app_list/search/history.h +++ b/chrome/browser/ui/app_list/search/history.h @@ -13,7 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/ui/app_list/search/history_data_observer.h" #include "chrome/browser/ui/app_list/search/history_types.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" namespace content { class BrowserContext; @@ -34,8 +34,7 @@ class SearchHistoryTest; // primary and secondary associations. See HistoryData comments to see how // they are built. The learning data is sent to the mixer to boost results that // have been launched before. -class History : public BrowserContextKeyedService, - public HistoryDataObserver { +class History : public KeyedService, public HistoryDataObserver { public: explicit History(content::BrowserContext* context); virtual ~History(); diff --git a/chrome/browser/ui/app_list/search/history_factory.cc b/chrome/browser/ui/app_list/search/history_factory.cc index 5d4585e..ee2bb7c 100644 --- a/chrome/browser/ui/app_list/search/history_factory.cc +++ b/chrome/browser/ui/app_list/search/history_factory.cc @@ -6,7 +6,7 @@ #include "base/memory/singleton.h" #include "chrome/browser/ui/app_list/search/history.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace app_list { @@ -29,7 +29,7 @@ HistoryFactory::HistoryFactory() HistoryFactory::~HistoryFactory() {} -BrowserContextKeyedService* HistoryFactory::BuildServiceInstanceFor( +KeyedService* HistoryFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { return new History(context); } diff --git a/chrome/browser/ui/app_list/search/history_factory.h b/chrome/browser/ui/app_list/search/history_factory.h index d46998d..6c76e47 100644 --- a/chrome/browser/ui/app_list/search/history_factory.h +++ b/chrome/browser/ui/app_list/search/history_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_HISTORY_FACTORY_H_ #define CHROME_BROWSER_UI_APP_LIST_SEARCH_HISTORY_FACTORY_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; @@ -33,7 +33,7 @@ class HistoryFactory : public BrowserContextKeyedServiceFactory { virtual ~HistoryFactory(); // BrowserContextKeyedServiceFactory overrides: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(HistoryFactory); diff --git a/chrome/browser/ui/app_list/search/search_controller.h b/chrome/browser/ui/app_list/search/search_controller.h index 9610700..5809bf1 100644 --- a/chrome/browser/ui/app_list/search/search_controller.h +++ b/chrome/browser/ui/app_list/search/search_controller.h @@ -68,7 +68,7 @@ class SearchController : public SpeechUIModelObserver { bool dispatching_query_; Providers providers_; scoped_ptr<Mixer> mixer_; - History* history_; // BrowserContextKeyedService, not owned. + History* history_; // KeyedService, not owned. base::OneShotTimer<SearchController> stop_timer_; diff --git a/chrome/browser/ui/app_list/start_page_service.h b/chrome/browser/ui/app_list/start_page_service.h index 1c3352a..dde24c5 100644 --- a/chrome/browser/ui/app_list/start_page_service.h +++ b/chrome/browser/ui/app_list/start_page_service.h @@ -12,7 +12,7 @@ #include "base/memory/scoped_ptr.h" #include "base/observer_list.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 "content/public/browser/web_contents.h" #include "ui/app_list/speech_ui_model_observer.h" @@ -29,7 +29,7 @@ class StartPageObserver; // StartPageService collects data to be displayed in app list's start page // and hosts the start page contents. -class StartPageService : public BrowserContextKeyedService { +class StartPageService : public KeyedService { public: typedef std::vector<scoped_refptr<const extensions::Extension> > ExtensionList; @@ -68,7 +68,7 @@ class StartPageService : public BrowserContextKeyedService { explicit StartPageService(Profile* profile); virtual ~StartPageService(); - // BrowserContextKeyedService overrides: + // KeyedService overrides: virtual void Shutdown() OVERRIDE; Profile* profile_; diff --git a/chrome/browser/ui/app_list/start_page_service_factory.cc b/chrome/browser/ui/app_list/start_page_service_factory.cc index 336157d..a5141e2 100644 --- a/chrome/browser/ui/app_list/start_page_service_factory.cc +++ b/chrome/browser/ui/app_list/start_page_service_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/app_list/start_page_service.h" #include "chrome/common/chrome_switches.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" #include "ui/app_list/app_list_switches.h" @@ -44,7 +44,7 @@ StartPageServiceFactory::StartPageServiceFactory() StartPageServiceFactory::~StartPageServiceFactory() {} -BrowserContextKeyedService* StartPageServiceFactory::BuildServiceInstanceFor( +KeyedService* StartPageServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); return new StartPageService(profile); diff --git a/chrome/browser/ui/app_list/start_page_service_factory.h b/chrome/browser/ui/app_list/start_page_service_factory.h index fe52501..647b565 100644 --- a/chrome/browser/ui/app_list/start_page_service_factory.h +++ b/chrome/browser/ui/app_list/start_page_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_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; @@ -29,7 +29,7 @@ class StartPageServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~StartPageServiceFactory(); // BrowserContextKeyedServiceFactory overrides: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(StartPageServiceFactory); diff --git a/chrome/browser/ui/ash/app_sync_ui_state.h b/chrome/browser/ui/ash/app_sync_ui_state.h index 55dc6c2..958db67 100644 --- a/chrome/browser/ui/ash/app_sync_ui_state.h +++ b/chrome/browser/ui/ash/app_sync_ui_state.h @@ -10,7 +10,7 @@ #include "base/observer_list.h" #include "base/timer/timer.h" #include "chrome/browser/sync/profile_sync_service_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" @@ -22,7 +22,7 @@ class ProfileSyncService; // accordingly. Its status is for UI display only. It only watches for new // normal user profile (i.e. it does not watch for guest profile or exsiting // user profile) and lasts for at the most 1 minute. -class AppSyncUIState : public BrowserContextKeyedService, +class AppSyncUIState : public KeyedService, public content::NotificationObserver, public ProfileSyncServiceObserver { public: diff --git a/chrome/browser/ui/ash/app_sync_ui_state_factory.cc b/chrome/browser/ui/ash/app_sync_ui_state_factory.cc index edceaf0..7ec4177 100644 --- a/chrome/browser/ui/ash/app_sync_ui_state_factory.cc +++ b/chrome/browser/ui/ash/app_sync_ui_state_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/ui/ash/app_sync_ui_state.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static AppSyncUIState* AppSyncUIStateFactory::GetForProfile(Profile* profile) { @@ -33,7 +33,7 @@ AppSyncUIStateFactory::AppSyncUIStateFactory() AppSyncUIStateFactory::~AppSyncUIStateFactory() { } -BrowserContextKeyedService* AppSyncUIStateFactory::BuildServiceInstanceFor( +KeyedService* AppSyncUIStateFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast<Profile*>(context); DCHECK(AppSyncUIState::ShouldObserveAppSyncForProfile(profile)); diff --git a/chrome/browser/ui/ash/app_sync_ui_state_factory.h b/chrome/browser/ui/ash/app_sync_ui_state_factory.h index 2278f10..d8bea8f 100644 --- a/chrome/browser/ui/ash/app_sync_ui_state_factory.h +++ b/chrome/browser/ui/ash/app_sync_ui_state_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 AppSyncUIState; class Profile; @@ -27,7 +27,7 @@ class AppSyncUIStateFactory : public BrowserContextKeyedServiceFactory { virtual ~AppSyncUIStateFactory(); // BrowserContextKeyedServiceFactory overrides: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(AppSyncUIStateFactory); diff --git a/chrome/browser/ui/bookmarks/bookmark_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_unittest.cc index e0b204e..8d15774 100644 --- a/chrome/browser/ui/bookmarks/bookmark_unittest.cc +++ b/chrome/browser/ui/bookmarks/bookmark_unittest.cc @@ -54,7 +54,7 @@ class BookmarkInstantExtendedTest : public BrowserWithTestWindowTest { } private: - static BrowserContextKeyedService* CreateTemplateURLService( + static KeyedService* CreateTemplateURLService( content::BrowserContext* profile) { return new TemplateURLService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/find_bar/find_bar_state.h b/chrome/browser/ui/find_bar/find_bar_state.h index c639496..3915439 100644 --- a/chrome/browser/ui/find_bar/find_bar_state.h +++ b/chrome/browser/ui/find_bar/find_bar_state.h @@ -10,11 +10,11 @@ #include "base/basictypes.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" class Profile; -class FindBarState : public BrowserContextKeyedService { +class FindBarState : public KeyedService { public: FindBarState() {} virtual ~FindBarState() {} diff --git a/chrome/browser/ui/find_bar/find_bar_state_factory.cc b/chrome/browser/ui/find_bar/find_bar_state_factory.cc index 36b7032..ddffb9f 100644 --- a/chrome/browser/ui/find_bar/find_bar_state_factory.cc +++ b/chrome/browser/ui/find_bar/find_bar_state_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/find_bar/find_bar_state.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static FindBarState* FindBarStateFactory::GetForProfile(Profile* profile) { @@ -42,7 +42,7 @@ FindBarStateFactory::FindBarStateFactory() FindBarStateFactory::~FindBarStateFactory() {} -BrowserContextKeyedService* FindBarStateFactory::BuildServiceInstanceFor( +KeyedService* FindBarStateFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new FindBarState; } diff --git a/chrome/browser/ui/find_bar/find_bar_state_factory.h b/chrome/browser/ui/find_bar/find_bar_state_factory.h index 03a561d..b52c0b7 100644 --- a/chrome/browser/ui/find_bar/find_bar_state_factory.h +++ b/chrome/browser/ui/find_bar/find_bar_state_factory.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/memory/singleton.h" #include "base/strings/string16.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 FindBarState; @@ -31,7 +31,7 @@ class FindBarStateFactory : public BrowserContextKeyedServiceFactory { virtual ~FindBarStateFactory(); // 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/ui/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc index 36e7e4f..c7d6451 100644 --- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc +++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc @@ -15,7 +15,7 @@ #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/keyed_service/content/browser_context_dependency_manager.h" #include "components/user_prefs/pref_registry_syncable.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_service.h" @@ -63,12 +63,12 @@ const std::vector<OverscrollPref>& GetOverscrollPrefs() { } // This class manages gesture configuration preferences. -class GesturePrefsObserver : public BrowserContextKeyedService { +class GesturePrefsObserver : public KeyedService { public: explicit GesturePrefsObserver(PrefService* prefs); virtual ~GesturePrefsObserver(); - // BrowserContextKeyedService implementation. + // KeyedService implementation. virtual void Shutdown() OVERRIDE; private: @@ -283,8 +283,7 @@ GesturePrefsObserverFactoryAura::GesturePrefsObserverFactoryAura() GesturePrefsObserverFactoryAura::~GesturePrefsObserverFactoryAura() {} -BrowserContextKeyedService* -GesturePrefsObserverFactoryAura::BuildServiceInstanceFor( +KeyedService* GesturePrefsObserverFactoryAura::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new GesturePrefsObserver(static_cast<Profile*>(profile)->GetPrefs()); } diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.h b/chrome/browser/ui/gesture_prefs_observer_factory_aura.h index 7145e60..7e71250 100644 --- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.h +++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.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 PrefService; class Profile; @@ -28,7 +28,7 @@ class GesturePrefsObserverFactoryAura void RegisterFlingCurveParameters(user_prefs::PrefRegistrySyncable* registry); // 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/ui/global_error/global_error_service.h b/chrome/browser/ui/global_error/global_error_service.h index 6ceccc1..6ef2918 100644 --- a/chrome/browser/ui/global_error/global_error_service.h +++ b/chrome/browser/ui/global_error/global_error_service.h @@ -8,7 +8,7 @@ #include <vector> #include "base/basictypes.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class GlobalError; class Profile; @@ -18,7 +18,7 @@ class Profile; // error should be shown using this service. Examples of global errors are: // - the previous session crashed for a given profile. // - a sync error occurred -class GlobalErrorService : public BrowserContextKeyedService { +class GlobalErrorService : public KeyedService { public: // Type used to represent the list of currently active errors. typedef std::vector<GlobalError*> GlobalErrorList; diff --git a/chrome/browser/ui/global_error/global_error_service_factory.cc b/chrome/browser/ui/global_error/global_error_service_factory.cc index cc4be64..38b77cc 100644 --- a/chrome/browser/ui/global_error/global_error_service_factory.cc +++ b/chrome/browser/ui/global_error/global_error_service_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/global_error/global_error_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static GlobalErrorService* GlobalErrorServiceFactory::GetForProfile(Profile* profile) { @@ -29,7 +29,7 @@ GlobalErrorServiceFactory::GlobalErrorServiceFactory() GlobalErrorServiceFactory::~GlobalErrorServiceFactory() { } -BrowserContextKeyedService* GlobalErrorServiceFactory::BuildServiceInstanceFor( +KeyedService* GlobalErrorServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new GlobalErrorService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/global_error/global_error_service_factory.h b/chrome/browser/ui/global_error/global_error_service_factory.h index 8f0c80f..8ec81eca 100644 --- a/chrome/browser/ui/global_error/global_error_service_factory.h +++ b/chrome/browser/ui/global_error/global_error_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 GlobalErrorService; class Profile; @@ -29,7 +29,7 @@ class GlobalErrorServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~GlobalErrorServiceFactory(); // 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/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc index a785af1..465f403 100644 --- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc +++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc @@ -60,8 +60,7 @@ class SigninManagerMock : public FakeSigninManager { MOCK_CONST_METHOD1(IsAllowedUsername, bool(const std::string& username)); }; -static BrowserContextKeyedService* BuildSigninManagerMock( - content::BrowserContext* profile) { +static KeyedService* BuildSigninManagerMock(content::BrowserContext* profile) { return new SigninManagerMock(static_cast<Profile*>(profile)); } @@ -161,7 +160,7 @@ class OneClickTestProfileSyncService : public TestProfileSyncService { // Helper routine to be used in conjunction with // BrowserContextKeyedServiceFactory::SetTestingFactory(). - static BrowserContextKeyedService* Build(content::BrowserContext* profile) { + static KeyedService* Build(content::BrowserContext* profile) { return new OneClickTestProfileSyncService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc index e5767f4..4a32d19 100644 --- a/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc +++ b/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc @@ -81,8 +81,7 @@ class OneClickSigninSyncStarterTest : public testing::Test { int succeeded_count_; private: - static BrowserContextKeyedService* BuildSigninManager( - content::BrowserContext* profile) { + static KeyedService* BuildSigninManager(content::BrowserContext* profile) { return new FakeSigninManager(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/tabs/pinned_tab_service.h b/chrome/browser/ui/tabs/pinned_tab_service.h index 7524ebc..c4feca6 100644 --- a/chrome/browser/ui/tabs/pinned_tab_service.h +++ b/chrome/browser/ui/tabs/pinned_tab_service.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_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 "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -16,7 +16,7 @@ class Profile; // pinned tabs to restore at startup. PinnedTabService listens for the // appropriate set of notifications to know it should update preferences. class PinnedTabService : public content::NotificationObserver, - public BrowserContextKeyedService { + public KeyedService { public: explicit PinnedTabService(Profile* profile); diff --git a/chrome/browser/ui/tabs/pinned_tab_service_factory.cc b/chrome/browser/ui/tabs/pinned_tab_service_factory.cc index 2d04542..24ecf5f 100644 --- a/chrome/browser/ui/tabs/pinned_tab_service_factory.cc +++ b/chrome/browser/ui/tabs/pinned_tab_service_factory.cc @@ -6,7 +6,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/tabs/pinned_tab_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static PinnedTabService* PinnedTabServiceFactory::GetForProfile( @@ -28,7 +28,7 @@ PinnedTabServiceFactory::PinnedTabServiceFactory() PinnedTabServiceFactory::~PinnedTabServiceFactory() { } -BrowserContextKeyedService* PinnedTabServiceFactory::BuildServiceInstanceFor( +KeyedService* PinnedTabServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new PinnedTabService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/tabs/pinned_tab_service_factory.h b/chrome/browser/ui/tabs/pinned_tab_service_factory.h index fe05b2d..5fa0585 100644 --- a/chrome/browser/ui/tabs/pinned_tab_service_factory.h +++ b/chrome/browser/ui/tabs/pinned_tab_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 PinnedTabService; class Profile; @@ -29,7 +29,7 @@ class PinnedTabServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~PinnedTabServiceFactory(); // 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/ui/tabs/pinned_tab_service_unittest.cc b/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc index 298b932..fe49e65 100644 --- a/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc +++ b/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc @@ -18,8 +18,7 @@ namespace { -BrowserContextKeyedService* BuildPinnedTabService( - content::BrowserContext* profile) { +KeyedService* BuildPinnedTabService(content::BrowserContext* profile) { return new PinnedTabService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc index 8246792..80f7884 100644 --- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc +++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc @@ -143,7 +143,7 @@ class RecentTabsSubMenuModelTest content::BrowserThread::GetBlockingPool()->FlushForTesting(); } - static BrowserContextKeyedService* GetTabRestoreService( + static KeyedService* GetTabRestoreService( content::BrowserContext* browser_context) { // Ownership is tranfered to the profile. return new PersistentTabRestoreService( diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc index 4a07963..07a02b9 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc @@ -33,7 +33,7 @@ class BookmarkBarViewInstantExtendedTest : public BrowserWithTestWindowTest { } private: - static BrowserContextKeyedService* CreateTemplateURLService( + static KeyedService* CreateTemplateURLService( content::BrowserContext* profile) { return new TemplateURLService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc index 087afc7..d119d4d 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc @@ -73,7 +73,7 @@ class BookmarkBubbleViewTest : public BrowserWithTestWindowTest { scoped_ptr<BookmarkBubbleView> bubble_; private: - static BrowserContextKeyedService* BuildFakeSignInManager( + static KeyedService* BuildFakeSignInManager( content::BrowserContext* profile) { #if defined(OS_CHROMEOS) return new FakeSigninManagerBase(); diff --git a/chrome/browser/ui/views/frame/test_with_browser_view.cc b/chrome/browser/ui/views/frame/test_with_browser_view.cc index 30c166a..23829b9 100644 --- a/chrome/browser/ui/views/frame/test_with_browser_view.cc +++ b/chrome/browser/ui/views/frame/test_with_browser_view.cc @@ -25,13 +25,11 @@ namespace { // Caller owns the returned service. -BrowserContextKeyedService* CreateTemplateURLService( - content::BrowserContext* profile) { +KeyedService* CreateTemplateURLService(content::BrowserContext* profile) { return new TemplateURLService(static_cast<Profile*>(profile)); } -BrowserContextKeyedService* CreateAutocompleteClassifier( - content::BrowserContext* profile) { +KeyedService* CreateAutocompleteClassifier(content::BrowserContext* profile) { return new AutocompleteClassifier(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/webui/ntp/app_resource_cache_factory.cc b/chrome/browser/ui/webui/ntp/app_resource_cache_factory.cc index 6c8afb7..ebc41d8 100644 --- a/chrome/browser/ui/webui/ntp/app_resource_cache_factory.cc +++ b/chrome/browser/ui/webui/ntp/app_resource_cache_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static NTPResourceCache* AppResourceCacheFactory::GetForProfile(Profile* profile) { @@ -32,7 +32,7 @@ AppResourceCacheFactory::AppResourceCacheFactory() AppResourceCacheFactory::~AppResourceCacheFactory() {} -BrowserContextKeyedService* AppResourceCacheFactory::BuildServiceInstanceFor( +KeyedService* AppResourceCacheFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new NTPResourceCache(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/webui/ntp/app_resource_cache_factory.h b/chrome/browser/ui/webui/ntp/app_resource_cache_factory.h index 4f1179d..9d96c4b 100644 --- a/chrome/browser/ui/webui/ntp/app_resource_cache_factory.h +++ b/chrome/browser/ui/webui/ntp/app_resource_cache_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_WEBUI_NTP_APP_RESOURCE_CACHE_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 NTPResourceCache; class Profile; @@ -27,7 +27,7 @@ class AppResourceCacheFactory : public BrowserContextKeyedServiceFactory { virtual ~AppResourceCacheFactory(); // 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/ui/webui/ntp/ntp_resource_cache.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h index cc76dd2..cde7169 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h @@ -10,7 +10,7 @@ #include "base/memory/ref_counted.h" #include "base/prefs/pref_change_registrar.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 "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -27,7 +27,7 @@ class RenderProcessHost; // This class keeps a cache of NTP resources (HTML and CSS) so we don't have to // regenerate them all the time. class NTPResourceCache : public content::NotificationObserver, - public BrowserContextKeyedService { + public KeyedService { public: enum WindowType { NORMAL, diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc index 0a7025f..28cfb11 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static NTPResourceCache* NTPResourceCacheFactory::GetForProfile(Profile* profile) { @@ -32,7 +32,7 @@ NTPResourceCacheFactory::NTPResourceCacheFactory() NTPResourceCacheFactory::~NTPResourceCacheFactory() {} -BrowserContextKeyedService* NTPResourceCacheFactory::BuildServiceInstanceFor( +KeyedService* NTPResourceCacheFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new NTPResourceCache(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h index 2be7d33..05c75a1 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_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 NTPResourceCache; class Profile; @@ -27,7 +27,7 @@ class NTPResourceCacheFactory : public BrowserContextKeyedServiceFactory { virtual ~NTPResourceCacheFactory(); // 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/ui/webui/signin/login_ui_service.h b/chrome/browser/ui/webui/signin/login_ui_service.h index 479eba0..99dc03c 100644 --- a/chrome/browser/ui/webui/signin/login_ui_service.h +++ b/chrome/browser/ui/webui/signin/login_ui_service.h @@ -7,14 +7,14 @@ #include "base/basictypes.h" #include "base/observer_list.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class Browser; class Profile; // The LoginUIService helps track per-profile information for the login UI - // for example, whether there is login UI currently on-screen. -class LoginUIService : public BrowserContextKeyedService { +class LoginUIService : public KeyedService { public: // Various UI components implement this API to allow LoginUIService to // manipulate their associated login UI. diff --git a/chrome/browser/ui/webui/signin/login_ui_service_factory.cc b/chrome/browser/ui/webui/signin/login_ui_service_factory.cc index e502476..cd8f7cd 100644 --- a/chrome/browser/ui/webui/signin/login_ui_service_factory.cc +++ b/chrome/browser/ui/webui/signin/login_ui_service_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/signin/signin_manager.h" #include "chrome/browser/ui/webui/signin/login_ui_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" LoginUIServiceFactory::LoginUIServiceFactory() : BrowserContextKeyedServiceFactory( @@ -29,7 +29,7 @@ LoginUIServiceFactory* LoginUIServiceFactory::GetInstance() { return Singleton<LoginUIServiceFactory>::get(); } -BrowserContextKeyedService* LoginUIServiceFactory::BuildServiceInstanceFor( +KeyedService* LoginUIServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new LoginUIService(static_cast<Profile*>(profile)); } diff --git a/chrome/browser/ui/webui/signin/login_ui_service_factory.h b/chrome/browser/ui/webui/signin/login_ui_service_factory.h index ddaebf4..93730d0 100644 --- a/chrome/browser/ui/webui/signin/login_ui_service_factory.h +++ b/chrome/browser/ui/webui/signin/login_ui_service_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_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 LoginUIService; class Profile; @@ -31,7 +31,7 @@ class LoginUIServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~LoginUIServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(LoginUIServiceFactory); |