From 95003d52ea8b90463d7e1770f560c59f9eb03b97 Mon Sep 17 00:00:00 2001 From: "blundell@chromium.org" Date: Thu, 13 Mar 2014 20:22:31 +0000 Subject: [PATCH] Move clients of BrowserContextKeyedService to use KeyedService (#5) This patch moves the remaining clients of BCKS in //chrome/browser to use KeyedService. BUG=351704 TBR=jochen Review URL: https://codereview.chromium.org/198883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256912 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete_classifier.h | 6 +++--- chrome/browser/autocomplete/autocomplete_classifier_factory.cc | 7 +++---- chrome/browser/autocomplete/autocomplete_classifier_factory.h | 7 +++---- chrome/browser/autocomplete/history_quick_provider_unittest.cc | 2 +- chrome/browser/autocomplete/history_url_provider_unittest.cc | 2 +- chrome/browser/autofill/personal_data_manager_factory.cc | 4 ++-- chrome/browser/autofill/personal_data_manager_factory.h | 8 ++++---- chrome/browser/background/background_contents_service.h | 4 ++-- chrome/browser/background/background_contents_service_factory.cc | 5 ++--- chrome/browser/background/background_contents_service_factory.h | 4 ++-- chrome/browser/background/background_mode_manager.h | 2 +- chrome/browser/bookmarks/bookmark_model.h | 4 ++-- chrome/browser/bookmarks/bookmark_model_factory.cc | 4 ++-- chrome/browser/bookmarks/bookmark_model_factory.h | 4 ++-- chrome/browser/captive_portal/captive_portal_service.h | 7 +++---- chrome/browser/captive_portal/captive_portal_service_factory.cc | 5 ++--- chrome/browser/captive_portal/captive_portal_service_factory.h | 4 ++-- chrome/browser/content_settings/cookie_settings.cc | 4 ++-- chrome/browser/content_settings/cookie_settings.h | 4 ++-- chrome/browser/custom_handlers/protocol_handler_registry.h | 4 ++-- .../browser/custom_handlers/protocol_handler_registry_factory.cc | 5 ++--- .../browser/custom_handlers/protocol_handler_registry_factory.h | 4 ++-- chrome/browser/devtools/devtools_adb_bridge.cc | 5 ++--- chrome/browser/devtools/devtools_adb_bridge.h | 9 ++++----- chrome/browser/devtools/port_forwarding_controller.cc | 5 ++--- chrome/browser/devtools/port_forwarding_controller.h | 8 ++++---- chrome/browser/dom_distiller/dom_distiller_service_factory.cc | 4 ++-- chrome/browser/dom_distiller/dom_distiller_service_factory.h | 8 ++++---- .../dom_distiller/dom_distiller_viewer_source_browsertest.cc | 2 +- chrome/browser/download/download_service.h | 4 ++-- chrome/browser/download/download_service_factory.cc | 4 ++-- chrome/browser/download/download_service_factory.h | 4 ++-- chrome/browser/download/download_shelf_unittest.cc | 3 +-- chrome/browser/drive/drive_notification_manager.h | 9 ++++----- chrome/browser/drive/drive_notification_manager_factory.cc | 5 ++--- chrome/browser/drive/drive_notification_manager_factory.h | 4 ++-- chrome/browser/favicon/favicon_handler_unittest.cc | 6 ++---- chrome/browser/favicon/favicon_service.h | 5 ++--- chrome/browser/favicon/favicon_service_factory.cc | 4 ++-- chrome/browser/favicon/favicon_service_factory.h | 4 ++-- chrome/browser/feedback/feedback_uploader.h | 4 ++-- chrome/browser/feedback/feedback_uploader_factory.cc | 4 ++-- chrome/browser/feedback/feedback_uploader_factory.h | 4 ++-- chrome/browser/feedback/feedback_uploader_unittest.cc | 3 +-- .../geolocation/chrome_geolocation_permission_context_factory.cc | 6 +++--- .../geolocation/chrome_geolocation_permission_context_factory.h | 6 +++--- chrome/browser/google/google_url_tracker.h | 6 +++--- chrome/browser/google/google_url_tracker_factory.cc | 4 ++-- chrome/browser/google/google_url_tracker_factory.h | 4 ++-- chrome/browser/history/history_service.h | 6 +++--- chrome/browser/history/history_service_factory.cc | 5 ++--- chrome/browser/history/history_service_factory.h | 4 ++-- chrome/browser/history/shortcuts_backend.h | 2 +- chrome/browser/history/shortcuts_backend_factory.cc | 2 +- chrome/browser/history/shortcuts_backend_factory.h | 2 +- chrome/browser/history/web_history_service.h | 4 ++-- chrome/browser/history/web_history_service_factory.cc | 4 ++-- chrome/browser/history/web_history_service_factory.h | 4 ++-- chrome/browser/invalidation/fake_invalidation_service.cc | 3 +-- chrome/browser/invalidation/fake_invalidation_service.h | 2 +- chrome/browser/invalidation/invalidation_service.h | 4 ++-- chrome/browser/invalidation/invalidation_service_android.h | 2 +- chrome/browser/invalidation/invalidation_service_factory.cc | 4 ++-- chrome/browser/invalidation/invalidation_service_factory.h | 4 ++-- chrome/browser/invalidation/p2p_invalidation_service.h | 4 ++-- chrome/browser/invalidation/ticl_invalidation_service.h | 4 ++-- chrome/browser/local_discovery/privet_notifications.h | 4 ++-- chrome/browser/local_discovery/privet_notifications_factory.cc | 5 ++--- chrome/browser/local_discovery/privet_notifications_factory.h | 4 ++-- chrome/browser/media/chrome_midi_permission_context.h | 6 +++--- chrome/browser/media/chrome_midi_permission_context_factory.cc | 5 ++--- chrome/browser/media/chrome_midi_permission_context_factory.h | 4 ++-- .../protected_media_identifier_permission_context_factory.cc | 6 +++--- .../protected_media_identifier_permission_context_factory.h | 4 ++-- chrome/browser/media_galleries/media_galleries_preferences.h | 6 +++--- .../media_galleries/media_galleries_preferences_factory.cc | 5 ++--- .../media_galleries/media_galleries_preferences_factory.h | 4 ++-- chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h | 2 +- chrome/browser/network_time/network_time_service.h | 4 ++-- chrome/browser/network_time/network_time_service_factory.cc | 5 ++--- chrome/browser/network_time/network_time_service_factory.h | 4 ++-- chrome/browser/notifications/desktop_notification_service.h | 4 ++-- .../notifications/desktop_notification_service_factory.cc | 5 ++--- .../browser/notifications/desktop_notification_service_factory.h | 4 ++-- .../notifications/sync_notifier/chrome_notifier_service.cc | 2 +- .../notifications/sync_notifier/chrome_notifier_service.h | 6 +++--- .../sync_notifier/chrome_notifier_service_factory.cc | 5 ++--- .../sync_notifier/chrome_notifier_service_factory.h | 4 ++-- .../sync_notifier/synced_notification_app_info_service.cc | 2 +- .../sync_notifier/synced_notification_app_info_service.h | 6 +++--- .../synced_notification_app_info_service_factory.cc | 5 ++--- .../sync_notifier/synced_notification_app_info_service_factory.h | 4 ++-- 92 files changed, 192 insertions(+), 217 deletions(-) diff --git a/chrome/browser/autocomplete/autocomplete_classifier.h b/chrome/browser/autocomplete/autocomplete_classifier.h index 7ec95f5cb117..c78fe0ea2014 100644 --- a/chrome/browser/autocomplete/autocomplete_classifier.h +++ b/chrome/browser/autocomplete/autocomplete_classifier.h @@ -10,14 +10,14 @@ #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "chrome/browser/autocomplete/autocomplete_input.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class AutocompleteController; struct AutocompleteMatch; class GURL; class Profile; -class AutocompleteClassifier : public BrowserContextKeyedService { +class AutocompleteClassifier : public KeyedService { public: // Bitmap of AutocompleteProvider::Type values describing the default set of // providers queried for the omnibox. Intended to be passed to @@ -51,7 +51,7 @@ class AutocompleteClassifier : public BrowserContextKeyedService { GURL* alternate_nav_url); private: - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; scoped_ptr controller_; diff --git a/chrome/browser/autocomplete/autocomplete_classifier_factory.cc b/chrome/browser/autocomplete/autocomplete_classifier_factory.cc index f83dee42e982..1b9a483a662e 100644 --- a/chrome/browser/autocomplete/autocomplete_classifier_factory.cc +++ b/chrome/browser/autocomplete/autocomplete_classifier_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.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" #include "extensions/browser/extension_system_provider.h" #include "extensions/browser/extensions_browser_client.h" @@ -26,7 +26,7 @@ AutocompleteClassifierFactory* AutocompleteClassifierFactory::GetInstance() { } // static -BrowserContextKeyedService* AutocompleteClassifierFactory::BuildInstanceFor( +KeyedService* AutocompleteClassifierFactory::BuildInstanceFor( content::BrowserContext* profile) { return new AutocompleteClassifier(static_cast(profile)); } @@ -55,8 +55,7 @@ bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const { return true; } -BrowserContextKeyedService* -AutocompleteClassifierFactory::BuildServiceInstanceFor( +KeyedService* AutocompleteClassifierFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return BuildInstanceFor(static_cast(profile)); } diff --git a/chrome/browser/autocomplete/autocomplete_classifier_factory.h b/chrome/browser/autocomplete/autocomplete_classifier_factory.h index 51d42c7a5406..5a9b98bf9e35 100644 --- a/chrome/browser/autocomplete/autocomplete_classifier_factory.h +++ b/chrome/browser/autocomplete/autocomplete_classifier_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 AutocompleteClassifier; class Profile; @@ -21,8 +21,7 @@ class AutocompleteClassifierFactory : public BrowserContextKeyedServiceFactory { static AutocompleteClassifierFactory* GetInstance(); - static BrowserContextKeyedService* BuildInstanceFor( - content::BrowserContext* profile); + static KeyedService* BuildInstanceFor(content::BrowserContext* profile); private: friend struct DefaultSingletonTraits; @@ -34,7 +33,7 @@ class AutocompleteClassifierFactory : public BrowserContextKeyedServiceFactory { virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(AutocompleteClassifierFactory); diff --git a/chrome/browser/autocomplete/history_quick_provider_unittest.cc b/chrome/browser/autocomplete/history_quick_provider_unittest.cc index a81a92a7ccfc..c57fc15e0aee 100644 --- a/chrome/browser/autocomplete/history_quick_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_quick_provider_unittest.cc @@ -117,7 +117,7 @@ class HistoryQuickProviderTest : public testing::Test, std::set matches_; }; - static BrowserContextKeyedService* CreateTemplateURLService( + static KeyedService* CreateTemplateURLService( content::BrowserContext* profile) { return new TemplateURLService(static_cast(profile)); } diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc index 0188ed190854..476e12f70a17 100644 --- a/chrome/browser/autocomplete/history_url_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc @@ -163,7 +163,7 @@ class HistoryURLProviderTest : public testing::Test, virtual void OnProviderUpdate(bool updated_matches) OVERRIDE; protected: - static BrowserContextKeyedService* CreateTemplateURLService( + static KeyedService* CreateTemplateURLService( content::BrowserContext* profile) { return new TemplateURLService(static_cast(profile)); } diff --git a/chrome/browser/autofill/personal_data_manager_factory.cc b/chrome/browser/autofill/personal_data_manager_factory.cc index f5e8f4ad9226..04aa3b5577b1 100644 --- a/chrome/browser/autofill/personal_data_manager_factory.cc +++ b/chrome/browser/autofill/personal_data_manager_factory.cc @@ -12,7 +12,7 @@ #include "chrome/browser/webdata/web_data_service_factory.h" #include "components/autofill/core/browser/personal_data_manager.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" namespace autofill { namespace { @@ -82,7 +82,7 @@ PersonalDataManagerFactory::PersonalDataManagerFactory() PersonalDataManagerFactory::~PersonalDataManagerFactory() { } -BrowserContextKeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor( +KeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { PersonalDataManagerService* service = new PersonalDataManagerServiceImpl(static_cast(profile)); diff --git a/chrome/browser/autofill/personal_data_manager_factory.h b/chrome/browser/autofill/personal_data_manager_factory.h index fdff9e17dd90..7a0cbcc47834 100644 --- a/chrome/browser/autofill/personal_data_manager_factory.h +++ b/chrome/browser/autofill/personal_data_manager_factory.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_FACTORY_H_ #include "base/compiler_specific.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" template struct DefaultSingletonTraits; class Profile; @@ -19,7 +19,7 @@ class PersonalDataManager; // A wrapper of PersonalDataManager so we can use it as a profiled keyed // service. This should only be subclassed in tests, e.g. to provide a mock // PersonalDataManager. -class PersonalDataManagerService : public BrowserContextKeyedService { +class PersonalDataManagerService : public KeyedService { public: virtual PersonalDataManager* GetPersonalDataManager() = 0; }; @@ -43,7 +43,7 @@ class PersonalDataManagerFactory : public BrowserContextKeyedServiceFactory { virtual ~PersonalDataManagerFactory(); // 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/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h index 66437b3b0ac9..87f5d97d165e 100644 --- a/chrome/browser/background/background_contents_service.h +++ b/chrome/browser/background/background_contents_service.h @@ -12,7 +12,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "chrome/browser/tab_contents/background_contents.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/common/window_container_type.h" @@ -51,7 +51,7 @@ struct BackgroundContentsOpenedDetails; // parent app is unloaded. class BackgroundContentsService : private content::NotificationObserver, public BackgroundContents::Delegate, - public BrowserContextKeyedService { + public KeyedService { public: BackgroundContentsService(Profile* profile, const CommandLine* command_line); virtual ~BackgroundContentsService(); diff --git a/chrome/browser/background/background_contents_service_factory.cc b/chrome/browser/background/background_contents_service_factory.cc index 74e4ffabfba1..bbc74533cc15 100644 --- a/chrome/browser/background/background_contents_service_factory.cc +++ b/chrome/browser/background/background_contents_service_factory.cc @@ -10,7 +10,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" // static @@ -35,8 +35,7 @@ BackgroundContentsServiceFactory::BackgroundContentsServiceFactory() BackgroundContentsServiceFactory::~BackgroundContentsServiceFactory() { } -BrowserContextKeyedService* -BackgroundContentsServiceFactory::BuildServiceInstanceFor( +KeyedService* BackgroundContentsServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new BackgroundContentsService(static_cast(profile), CommandLine::ForCurrentProcess()); diff --git a/chrome/browser/background/background_contents_service_factory.h b/chrome/browser/background/background_contents_service_factory.h index 27ab044ac239..639470d582be 100644 --- a/chrome/browser/background/background_contents_service_factory.h +++ b/chrome/browser/background/background_contents_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 BackgroundContentsService; class Profile; @@ -29,7 +29,7 @@ class BackgroundContentsServiceFactory virtual ~BackgroundContentsServiceFactory(); // 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/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h index b65cd4ac2823..ae9bd484b184 100644 --- a/chrome/browser/background/background_mode_manager.h +++ b/chrome/browser/background/background_mode_manager.h @@ -15,7 +15,7 @@ #include "chrome/browser/status_icons/status_icon.h" #include "chrome/browser/status_icons/status_icon_menu_model.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" diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h index a16f4ad1cc4f..b48d5e3530c5 100644 --- a/chrome/browser/bookmarks/bookmark_model.h +++ b/chrome/browser/bookmarks/bookmark_model.h @@ -19,7 +19,7 @@ #include "base/synchronization/waitable_event.h" #include "base/task/cancelable_task_tracker.h" #include "chrome/browser/bookmarks/bookmark_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 "ui/base/models/tree_node_model.h" @@ -241,7 +241,7 @@ class BookmarkPermanentNode : public BookmarkNode { // BookmarkModelFactory. class BookmarkModel : public content::NotificationObserver, public BookmarkService, - public BrowserContextKeyedService { + public KeyedService { public: explicit BookmarkModel(Profile* profile); virtual ~BookmarkModel(); diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc index feafd0d2d066..b4e8754b01b0 100644 --- a/chrome/browser/bookmarks/bookmark_model_factory.cc +++ b/chrome/browser/bookmarks/bookmark_model_factory.cc @@ -17,7 +17,7 @@ #include "chrome/browser/undo/bookmark_undo_service_factory.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/user_prefs/pref_registry_syncable.h" // static @@ -44,7 +44,7 @@ BookmarkModelFactory::BookmarkModelFactory() BookmarkModelFactory::~BookmarkModelFactory() {} -BrowserContextKeyedService* BookmarkModelFactory::BuildServiceInstanceFor( +KeyedService* BookmarkModelFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast(context); BookmarkModel* bookmark_model = new BookmarkModel(profile); diff --git a/chrome/browser/bookmarks/bookmark_model_factory.h b/chrome/browser/bookmarks/bookmark_model_factory.h index 991b0ff182c4..87180ced7fd1 100644 --- a/chrome/browser/bookmarks/bookmark_model_factory.h +++ b/chrome/browser/bookmarks/bookmark_model_factory.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.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 struct DefaultSingletonTraits; @@ -30,7 +30,7 @@ class BookmarkModelFactory : public BrowserContextKeyedServiceFactory { virtual ~BookmarkModelFactory(); // 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/captive_portal/captive_portal_service.h b/chrome/browser/captive_portal/captive_portal_service.h index c8b597049ed7..2effcaeec2b6 100644 --- a/chrome/browser/captive_portal/captive_portal_service.h +++ b/chrome/browser/captive_portal/captive_portal_service.h @@ -12,7 +12,7 @@ #include "base/time/time.h" #include "base/timer/timer.h" #include "chrome/browser/captive_portal/captive_portal_detector.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "net/base/backoff_entry.h" #include "url/gurl.h" @@ -27,8 +27,7 @@ namespace captive_portal { // Captive portal checks are rate-limited. The CaptivePortalService may only // be accessed on the UI thread. // Design doc: https://docs.google.com/document/d/1k-gP2sswzYNvryu9NcgN7q5XrsMlUdlUdoW9WRaEmfM/edit -class CaptivePortalService : public BrowserContextKeyedService, - public base::NonThreadSafe { +class CaptivePortalService : public KeyedService, public base::NonThreadSafe { public: enum TestingState { NOT_TESTING, @@ -114,7 +113,7 @@ class CaptivePortalService : public BrowserContextKeyedService, void OnPortalDetectionCompleted( const CaptivePortalDetector::Results& results); - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; // Called when a captive portal check completes. Passes the result to all diff --git a/chrome/browser/captive_portal/captive_portal_service_factory.cc b/chrome/browser/captive_portal/captive_portal_service_factory.cc index 53b4483c0563..a7ac143fba42 100644 --- a/chrome/browser/captive_portal/captive_portal_service_factory.cc +++ b/chrome/browser/captive_portal/captive_portal_service_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/captive_portal/captive_portal_service.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 captive_portal { @@ -32,8 +32,7 @@ CaptivePortalServiceFactory::CaptivePortalServiceFactory() CaptivePortalServiceFactory::~CaptivePortalServiceFactory() { } -BrowserContextKeyedService* -CaptivePortalServiceFactory::BuildServiceInstanceFor( +KeyedService* CaptivePortalServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new CaptivePortalService(static_cast(profile)); } diff --git a/chrome/browser/captive_portal/captive_portal_service_factory.h b/chrome/browser/captive_portal/captive_portal_service_factory.h index 8a60bfe734e2..a96c246e310c 100644 --- a/chrome/browser/captive_portal/captive_portal_service_factory.h +++ b/chrome/browser/captive_portal/captive_portal_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 Profile; @@ -36,7 +36,7 @@ class CaptivePortalServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~CaptivePortalServiceFactory(); // 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/content_settings/cookie_settings.cc b/chrome/browser/content_settings/cookie_settings.cc index 95ba005a281a..606ba164884c 100644 --- a/chrome/browser/content_settings/cookie_settings.cc +++ b/chrome/browser/content_settings/cookie_settings.cc @@ -14,8 +14,8 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/content_settings_pattern.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" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/content_settings/cookie_settings.h b/chrome/browser/content_settings/cookie_settings.h index a8137b771e4c..44902e69704c 100644 --- a/chrome/browser/content_settings/cookie_settings.h +++ b/chrome/browser/content_settings/cookie_settings.h @@ -14,8 +14,8 @@ #include "base/synchronization/lock.h" #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/common/content_settings.h" -#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service.h" -#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service_factory.h" +#include "components/keyed_service/content/refcounted_browser_context_keyed_service.h" +#include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h" class ContentSettingsPattern; class CookieSettingsWrapper; diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.h b/chrome/browser/custom_handlers/protocol_handler_registry.h index f43183383635..523a8226026b 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry.h +++ b/chrome/browser/custom_handlers/protocol_handler_registry.h @@ -17,7 +17,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/shell_integration.h" #include "chrome/common/custom_handlers/protocol_handler.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 "net/url_request/url_request.h" @@ -33,7 +33,7 @@ class PrefRegistrySyncable; // instance of this class, which is initialized on browser start through // Profile::InitRegisteredProtocolHandlers(), and they should be the only // instances of this class. -class ProtocolHandlerRegistry : public BrowserContextKeyedService { +class ProtocolHandlerRegistry : public KeyedService { public: // Provides notification of when the OS level user agent settings diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc b/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc index 59f85de1a5ea..7488ce9039d2 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/custom_handlers/protocol_handler_registry.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" // static ProtocolHandlerRegistryFactory* ProtocolHandlerRegistryFactory::GetInstance() { @@ -52,8 +52,7 @@ bool ProtocolHandlerRegistryFactory::ServiceIsNULLWhileTesting() const { return true; } -BrowserContextKeyedService* -ProtocolHandlerRegistryFactory::BuildServiceInstanceFor( +KeyedService* ProtocolHandlerRegistryFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { ProtocolHandlerRegistry* registry = new ProtocolHandlerRegistry( static_cast(profile), new ProtocolHandlerRegistry::Delegate()); diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h index 14f97c6f9483..63b02b3dacfa 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h +++ b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.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 ProtocolHandlerRegistry; @@ -40,7 +40,7 @@ class ProtocolHandlerRegistryFactory virtual ~ProtocolHandlerRegistryFactory(); // BrowserContextKeyedServiceFactory implementation. - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistryFactory); diff --git a/chrome/browser/devtools/devtools_adb_bridge.cc b/chrome/browser/devtools/devtools_adb_bridge.cc index 824d07eea178..b55dcf1f459e 100644 --- a/chrome/browser/devtools/devtools_adb_bridge.cc +++ b/chrome/browser/devtools/devtools_adb_bridge.cc @@ -29,7 +29,7 @@ #include "chrome/browser/devtools/devtools_target_impl.h" #include "chrome/browser/devtools/devtools_window.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 "content/public/browser/devtools_agent_host.h" #include "content/public/browser/devtools_client_host.h" #include "content/public/browser/devtools_external_agent_proxy.h" @@ -718,8 +718,7 @@ DevToolsAdbBridge::Factory::Factory() DevToolsAdbBridge::Factory::~Factory() {} -BrowserContextKeyedService* -DevToolsAdbBridge::Factory::BuildServiceInstanceFor( +KeyedService* DevToolsAdbBridge::Factory::BuildServiceInstanceFor( content::BrowserContext* context) const { return new DevToolsAdbBridge::Wrapper(); } diff --git a/chrome/browser/devtools/devtools_adb_bridge.h b/chrome/browser/devtools/devtools_adb_bridge.h index 2e1bf41cbf26..c1cf53c8ca44 100644 --- a/chrome/browser/devtools/devtools_adb_bridge.h +++ b/chrome/browser/devtools/devtools_adb_bridge.h @@ -13,8 +13,8 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/devtools/android_device.h" #include "chrome/browser/devtools/refcounted_adb_thread.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 "content/public/browser/browser_thread.h" #include "net/socket/tcp_client_socket.h" #include "ui/gfx/size.h" @@ -51,8 +51,7 @@ class DevToolsAdbBridge const std::string& response)> Callback; typedef std::vector > DeviceProviders; - - class Wrapper : public BrowserContextKeyedService { + class Wrapper : public KeyedService { public: Wrapper(); virtual ~Wrapper(); @@ -77,7 +76,7 @@ class DevToolsAdbBridge virtual ~Factory(); // BrowserContextKeyedServiceFactory overrides: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(Factory); }; diff --git a/chrome/browser/devtools/port_forwarding_controller.cc b/chrome/browser/devtools/port_forwarding_controller.cc index 7d4255e356e0..72179ddb8955 100644 --- a/chrome/browser/devtools/port_forwarding_controller.cc +++ b/chrome/browser/devtools/port_forwarding_controller.cc @@ -21,7 +21,7 @@ #include "chrome/browser/devtools/devtools_protocol.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 "content/public/browser/browser_thread.h" #include "net/base/address_list.h" #include "net/base/net_errors.h" @@ -619,8 +619,7 @@ PortForwardingController::Factory::Factory() PortForwardingController::Factory::~Factory() {} -BrowserContextKeyedService* -PortForwardingController::Factory::BuildServiceInstanceFor( +KeyedService* PortForwardingController::Factory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = Profile::FromBrowserContext(context); return new PortForwardingController(profile->GetPrefs()); diff --git a/chrome/browser/devtools/port_forwarding_controller.h b/chrome/browser/devtools/port_forwarding_controller.h index fac4da598bfe..36e258bc07d8 100644 --- a/chrome/browser/devtools/port_forwarding_controller.h +++ b/chrome/browser/devtools/port_forwarding_controller.h @@ -8,12 +8,12 @@ #include #include "chrome/browser/devtools/devtools_adb_bridge.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 PrefService; -class PortForwardingController : public BrowserContextKeyedService { +class PortForwardingController : public KeyedService { public: explicit PortForwardingController(PrefService* pref_service); @@ -34,7 +34,7 @@ class PortForwardingController : public BrowserContextKeyedService { virtual ~Factory(); // BrowserContextKeyedServiceFactory overrides: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(Factory); }; diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc index 679e9141a4a5..312bf0737851 100644 --- a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc +++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc @@ -6,11 +6,11 @@ #include "base/threading/sequenced_worker_pool.h" #include "chrome/common/url_constants.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" #include "components/dom_distiller/content/distiller_page_web_contents.h" #include "components/dom_distiller/content/dom_distiller_viewer_source.h" #include "components/dom_distiller/core/distiller.h" #include "components/dom_distiller/core/dom_distiller_store.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/url_data_source.h" @@ -42,7 +42,7 @@ DomDistillerServiceFactory::DomDistillerServiceFactory() DomDistillerServiceFactory::~DomDistillerServiceFactory() {} -BrowserContextKeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor( +KeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { scoped_refptr background_task_runner = content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory.h b/chrome/browser/dom_distiller/dom_distiller_service_factory.h index b5a2c0e6acff..b083cd584618 100644 --- a/chrome/browser/dom_distiller/dom_distiller_service_factory.h +++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_DOM_DISTILLER_DOM_DISTILLER_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h" #include "components/dom_distiller/core/dom_distiller_service.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" namespace content { class BrowserContext; @@ -16,8 +16,8 @@ class BrowserContext; namespace dom_distiller { // A simple wrapper for DomDistillerService to expose it as a -// BrowserContextKeyedService. -class DomDistillerContextKeyedService : public BrowserContextKeyedService, +// KeyedService. +class DomDistillerContextKeyedService : public KeyedService, public DomDistillerService { public: DomDistillerContextKeyedService( @@ -41,7 +41,7 @@ class DomDistillerServiceFactory : public BrowserContextKeyedServiceFactory { DomDistillerServiceFactory(); virtual ~DomDistillerServiceFactory(); - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( diff --git a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc index 4064af0c6da6..0c73511b4ae7 100644 --- a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc +++ b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc @@ -120,7 +120,7 @@ class DomDistillerViewerSourceBrowserTest : public InProcessBrowserTest { command_line->AppendSwitch(switches::kEnableDomDistiller); } - static BrowserContextKeyedService* Build(content::BrowserContext* context) { + static KeyedService* Build(content::BrowserContext* context) { FakeDB* fake_db = new FakeDB(database_model_); MockDistillerFactory* factory = new MockDistillerFactory(); DomDistillerContextKeyedService* service = diff --git a/chrome/browser/download/download_service.h b/chrome/browser/download/download_service.h index 72b0de095746..e365d9793612 100644 --- a/chrome/browser/download/download_service.h +++ b/chrome/browser/download/download_service.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/callback_forward.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" class ChromeDownloadManagerDelegate; class DownloadHistory; @@ -21,7 +21,7 @@ class DownloadManager; } // Owning class for ChromeDownloadManagerDelegate. -class DownloadService : public BrowserContextKeyedService { +class DownloadService : public KeyedService { public: explicit DownloadService(Profile* profile); virtual ~DownloadService(); diff --git a/chrome/browser/download/download_service_factory.cc b/chrome/browser/download/download_service_factory.cc index 29b3d1743403..182bc78152e4 100644 --- a/chrome/browser/download/download_service_factory.cc +++ b/chrome/browser/download/download_service_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/download/download_service.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/profiles/incognito_helpers.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" // static DownloadService* DownloadServiceFactory::GetForBrowserContext( @@ -31,7 +31,7 @@ DownloadServiceFactory::DownloadServiceFactory() DownloadServiceFactory::~DownloadServiceFactory() { } -BrowserContextKeyedService* DownloadServiceFactory::BuildServiceInstanceFor( +KeyedService* DownloadServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { DownloadService* service = new DownloadService(static_cast(profile)); diff --git a/chrome/browser/download/download_service_factory.h b/chrome/browser/download/download_service_factory.h index ed78587f6c8e..5f99647b4258 100644 --- a/chrome/browser/download/download_service_factory.h +++ b/chrome/browser/download/download_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 DownloadService; @@ -24,7 +24,7 @@ class DownloadServiceFactory : public BrowserContextKeyedServiceFactory { protected: // 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/download/download_shelf_unittest.cc b/chrome/browser/download/download_shelf_unittest.cc index ca8d0f8560c8..d2a409446163 100644 --- a/chrome/browser/download/download_shelf_unittest.cc +++ b/chrome/browser/download/download_shelf_unittest.cc @@ -28,8 +28,7 @@ using content::DownloadItem; namespace { -BrowserContextKeyedService* CreateDownloadService( - content::BrowserContext* context) { +KeyedService* CreateDownloadService(content::BrowserContext* context) { return new DownloadService(Profile::FromBrowserContext(context)); } diff --git a/chrome/browser/drive/drive_notification_manager.h b/chrome/browser/drive/drive_notification_manager.h index a9fb2edc1c4d..c6712b2c7885 100644 --- a/chrome/browser/drive/drive_notification_manager.h +++ b/chrome/browser/drive/drive_notification_manager.h @@ -9,7 +9,7 @@ #include "base/observer_list.h" #include "base/timer/timer.h" #include "chrome/browser/drive/drive_notification_observer.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "sync/notifier/invalidation_handler.h" class ProfileSyncService; @@ -24,15 +24,14 @@ namespace drive { // Conditions under which updates should be searched: // 1. XMPP invalidation is received from Google Drive. // 2. Polling timer counts down. -class DriveNotificationManager - : public BrowserContextKeyedService, - public syncer::InvalidationHandler { +class DriveNotificationManager : public KeyedService, + public syncer::InvalidationHandler { public: explicit DriveNotificationManager( invalidation::InvalidationService* invalidation_service); virtual ~DriveNotificationManager(); - // BrowserContextKeyedService override. + // KeyedService override. virtual void Shutdown() OVERRIDE; // syncer::InvalidationHandler implementation. diff --git a/chrome/browser/drive/drive_notification_manager_factory.cc b/chrome/browser/drive/drive_notification_manager_factory.cc index 358377306125..5e8a9317eea3 100644 --- a/chrome/browser/drive/drive_notification_manager_factory.cc +++ b/chrome/browser/drive/drive_notification_manager_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/profile_sync_service.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" namespace drive { @@ -40,8 +40,7 @@ DriveNotificationManagerFactory::DriveNotificationManagerFactory() DriveNotificationManagerFactory::~DriveNotificationManagerFactory() {} -BrowserContextKeyedService* -DriveNotificationManagerFactory::BuildServiceInstanceFor( +KeyedService* DriveNotificationManagerFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { return new DriveNotificationManager( invalidation::InvalidationServiceFactory::GetForProfile( diff --git a/chrome/browser/drive/drive_notification_manager_factory.h b/chrome/browser/drive/drive_notification_manager_factory.h index a0f1ffbe6834..bd8aeac251dd 100644 --- a/chrome/browser/drive/drive_notification_manager_factory.h +++ b/chrome/browser/drive/drive_notification_manager_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_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 content { class BrowserContext; @@ -33,7 +33,7 @@ class DriveNotificationManagerFactory virtual ~DriveNotificationManagerFactory(); // BrowserContextKeyedServiceFactory implementation. - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; }; diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc index 68e044e4d129..70b4296d5081 100644 --- a/chrome/browser/favicon/favicon_handler_unittest.cc +++ b/chrome/browser/favicon/favicon_handler_unittest.cc @@ -1068,13 +1068,11 @@ TEST_F(FaviconHandlerTest, MultipleFavicons) { #endif -static BrowserContextKeyedService* BuildFaviconService( - content::BrowserContext* profile) { +static KeyedService* BuildFaviconService(content::BrowserContext* profile) { return new FaviconService(static_cast(profile)); } -static BrowserContextKeyedService* BuildHistoryService( - content::BrowserContext* profile) { +static KeyedService* BuildHistoryService(content::BrowserContext* profile) { return NULL; } diff --git a/chrome/browser/favicon/favicon_service.h b/chrome/browser/favicon/favicon_service.h index 4d38e3936e01..565147ed57e6 100644 --- a/chrome/browser/favicon/favicon_service.h +++ b/chrome/browser/favicon/favicon_service.h @@ -14,7 +14,7 @@ #include "chrome/browser/common/cancelable_request.h" #include "chrome/common/favicon/favicon_types.h" #include "chrome/common/ref_counted_util.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "ui/base/layout.h" class GURL; @@ -31,8 +31,7 @@ struct FaviconImageResult; // // This service is thread safe. Each request callback is invoked in the // thread that made the request. -class FaviconService : public CancelableRequestProvider, - public BrowserContextKeyedService { +class FaviconService : public CancelableRequestProvider, public KeyedService { public: explicit FaviconService(Profile* profile); diff --git a/chrome/browser/favicon/favicon_service_factory.cc b/chrome/browser/favicon/favicon_service_factory.cc index 4a2ed7e75593..3bfb42579807 100644 --- a/chrome/browser/favicon/favicon_service_factory.cc +++ b/chrome/browser/favicon/favicon_service_factory.cc @@ -10,7 +10,7 @@ #include "chrome/browser/history/history_service.h" #include "chrome/browser/history/history_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" // static FaviconService* FaviconServiceFactory::GetForProfile( @@ -44,7 +44,7 @@ FaviconServiceFactory::FaviconServiceFactory() FaviconServiceFactory::~FaviconServiceFactory() {} -BrowserContextKeyedService* FaviconServiceFactory::BuildServiceInstanceFor( +KeyedService* FaviconServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new FaviconService(static_cast(profile)); } diff --git a/chrome/browser/favicon/favicon_service_factory.h b/chrome/browser/favicon/favicon_service_factory.h index 42f76b431e35..5b519cb39aa2 100644 --- a/chrome/browser/favicon/favicon_service_factory.h +++ b/chrome/browser/favicon/favicon_service_factory.h @@ -7,7 +7,7 @@ #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" template struct DefaultSingletonTraits; @@ -32,7 +32,7 @@ class FaviconServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~FaviconServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; diff --git a/chrome/browser/feedback/feedback_uploader.h b/chrome/browser/feedback/feedback_uploader.h index aa91613d1144..415b16dc0cd0 100644 --- a/chrome/browser/feedback/feedback_uploader.h +++ b/chrome/browser/feedback/feedback_uploader.h @@ -14,7 +14,7 @@ #include "base/time/time.h" #include "base/timer/timer.h" #include "chrome/browser/feedback/feedback_uploader_delegate.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" namespace content { class BrowserContext; @@ -27,7 +27,7 @@ class FeedbackReport; // FeedbackUploader is used to add a feedback report to the queue of reports // being uploaded. In case uploading a report fails, it is written to disk and // tried again when it's turn comes up next in the queue. -class FeedbackUploader : public BrowserContextKeyedService, +class FeedbackUploader : public KeyedService, public base::SupportsWeakPtr { public: explicit FeedbackUploader(content::BrowserContext* context); diff --git a/chrome/browser/feedback/feedback_uploader_factory.cc b/chrome/browser/feedback/feedback_uploader_factory.cc index 72626a279e48..4a715ff3ead2 100644 --- a/chrome/browser/feedback/feedback_uploader_factory.cc +++ b/chrome/browser/feedback/feedback_uploader_factory.cc @@ -7,7 +7,7 @@ #include "base/memory/singleton.h" #include "chrome/browser/feedback/feedback_uploader.h" #include "chrome/browser/profiles/incognito_helpers.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace feedback { @@ -30,7 +30,7 @@ FeedbackUploaderFactory::FeedbackUploaderFactory() FeedbackUploaderFactory::~FeedbackUploaderFactory() {} -BrowserContextKeyedService* FeedbackUploaderFactory::BuildServiceInstanceFor( +KeyedService* FeedbackUploaderFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { return new FeedbackUploader(context); } diff --git a/chrome/browser/feedback/feedback_uploader_factory.h b/chrome/browser/feedback/feedback_uploader_factory.h index b79cbdb3d86d..2823c093bd3c 100644 --- a/chrome/browser/feedback/feedback_uploader_factory.h +++ b/chrome/browser/feedback/feedback_uploader_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_UPLOADER_FACTORY_H_ #define CHROME_BROWSER_FEEDBACK_FEEDBACK_UPLOADER_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 struct DefaultSingletonTraits; @@ -34,7 +34,7 @@ class FeedbackUploaderFactory : public BrowserContextKeyedServiceFactory { virtual ~FeedbackUploaderFactory(); // BrowserContextKeyedServiceFactory overrides: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; diff --git a/chrome/browser/feedback/feedback_uploader_unittest.cc b/chrome/browser/feedback/feedback_uploader_unittest.cc index ab5806559a02..2b07f917c4ac 100644 --- a/chrome/browser/feedback/feedback_uploader_unittest.cc +++ b/chrome/browser/feedback/feedback_uploader_unittest.cc @@ -25,8 +25,7 @@ const char kReportFive[] = "five"; const base::TimeDelta kRetryDelayForTest = base::TimeDelta::FromMilliseconds(100); -BrowserContextKeyedService* CreateFeedbackUploaderService( - content::BrowserContext* context) { +KeyedService* CreateFeedbackUploaderService(content::BrowserContext* context) { return new feedback::FeedbackUploader(Profile::FromBrowserContext(context)); } diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc index 515ed73e4b9a..a41c7d143938 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc @@ -7,7 +7,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" #if defined(OS_ANDROID) #include "chrome/browser/geolocation/chrome_geolocation_permission_context_android.h" @@ -17,7 +17,7 @@ namespace { -class Service : public BrowserContextKeyedService { +class Service : public KeyedService { public: explicit Service(Profile* profile) { #if defined(OS_ANDROID) @@ -67,7 +67,7 @@ ChromeGeolocationPermissionContextFactory:: ~ChromeGeolocationPermissionContextFactory() { } -BrowserContextKeyedService* +KeyedService* ChromeGeolocationPermissionContextFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new Service(static_cast(profile)); diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h index 874722bb696d..a7a006abfe1c 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h @@ -8,7 +8,7 @@ #include "base/memory/singleton.h" #include "base/prefs/pref_service.h" #include "base/values.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 ChromeGeolocationPermissionContext; class PrefRegistrySyncable; @@ -29,8 +29,8 @@ class ChromeGeolocationPermissionContextFactory virtual ~ChromeGeolocationPermissionContextFactory(); // BrowserContextKeyedBaseFactory methods: - virtual BrowserContextKeyedService* - BuildServiceInstanceFor(content::BrowserContext* profile) const OVERRIDE; + virtual KeyedService* BuildServiceInstanceFor( + content::BrowserContext* profile) const OVERRIDE; virtual void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h index e71dbecadea4..e4b5e9f33b2a 100644 --- a/chrome/browser/google/google_url_tracker.h +++ b/chrome/browser/google/google_url_tracker.h @@ -14,7 +14,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/google/google_url_tracker_map_entry.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "net/base/network_change_notifier.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_fetcher_delegate.h" @@ -44,7 +44,7 @@ class NavigationController; // RequestServerCheck(). class GoogleURLTracker : public net::URLFetcherDelegate, public net::NetworkChangeNotifier::IPAddressObserver, - public BrowserContextKeyedService { + public KeyedService { public: // The contents of the Details for a NOTIFICATION_GOOGLE_URL_UPDATED. typedef std::pair UpdatedDetails; @@ -136,7 +136,7 @@ class GoogleURLTracker : public net::URLFetcherDelegate, // NetworkChangeNotifier::IPAddressObserver: virtual void OnIPAddressChanged() OVERRIDE; - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; // Registers consumer interest in getting an updated URL from the server. diff --git a/chrome/browser/google/google_url_tracker_factory.cc b/chrome/browser/google/google_url_tracker_factory.cc index 88ad9d2233f0..b7dd52d5a26e 100644 --- a/chrome/browser/google/google_url_tracker_factory.cc +++ b/chrome/browser/google/google_url_tracker_factory.cc @@ -10,7 +10,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" @@ -34,7 +34,7 @@ GoogleURLTrackerFactory::GoogleURLTrackerFactory() GoogleURLTrackerFactory::~GoogleURLTrackerFactory() { } -BrowserContextKeyedService* GoogleURLTrackerFactory::BuildServiceInstanceFor( +KeyedService* GoogleURLTrackerFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { scoped_ptr nav_helper( new GoogleURLTrackerNavigationHelperImpl()); diff --git a/chrome/browser/google/google_url_tracker_factory.h b/chrome/browser/google/google_url_tracker_factory.h index 71753811cfbc..58688cbd5a2d 100644 --- a/chrome/browser/google/google_url_tracker_factory.h +++ b/chrome/browser/google/google_url_tracker_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 GoogleURLTracker; class Profile; @@ -28,7 +28,7 @@ class GoogleURLTrackerFactory : public BrowserContextKeyedServiceFactory { virtual ~GoogleURLTrackerFactory(); // 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/history/history_service.h b/chrome/browser/history/history_service.h index 72e6d714620e..fec0c6490059 100644 --- a/chrome/browser/history/history_service.h +++ b/chrome/browser/history/history_service.h @@ -28,7 +28,7 @@ #include "chrome/browser/history/typed_url_syncable_service.h" #include "chrome/browser/search_engines/template_url_id.h" #include "chrome/common/ref_counted_util.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/visitedlink/browser/visitedlink_delegate.h" #include "content/public/browser/download_manager_delegate.h" #include "content/public/browser/notification_observer.h" @@ -85,7 +85,7 @@ struct HistoryDetails; class HistoryService : public CancelableRequestProvider, public content::NotificationObserver, public syncer::SyncableService, - public BrowserContextKeyedService, + public KeyedService, public visitedlink::VisitedLinkDelegate { public: // Miscellaneous commonly-used types. @@ -164,7 +164,7 @@ class HistoryService : public CancelableRequestProvider, return in_memory_url_index_.get(); } - // BrowserContextKeyedService: + // KeyedService: virtual void Shutdown() OVERRIDE; // Navigation ---------------------------------------------------------------- diff --git a/chrome/browser/history/history_service_factory.cc b/chrome/browser/history/history_service_factory.cc index c33a7fa7d5cf..74cc2aecf687 100644 --- a/chrome/browser/history/history_service_factory.cc +++ b/chrome/browser/history/history_service_factory.cc @@ -10,7 +10,7 @@ #include "chrome/browser/history/history_service.h" #include "chrome/browser/profiles/incognito_helpers.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" // static HistoryService* HistoryServiceFactory::GetForProfile( @@ -64,8 +64,7 @@ HistoryServiceFactory::HistoryServiceFactory() HistoryServiceFactory::~HistoryServiceFactory() { } -BrowserContextKeyedService* -HistoryServiceFactory::BuildServiceInstanceFor( +KeyedService* HistoryServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast(context); HistoryService* history_service = new HistoryService(profile); diff --git a/chrome/browser/history/history_service_factory.h b/chrome/browser/history/history_service_factory.h index 6d8cc421f48f..97bf395fcb1d 100644 --- a/chrome/browser/history/history_service_factory.h +++ b/chrome/browser/history/history_service_factory.h @@ -7,7 +7,7 @@ #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 HistoryService; @@ -39,7 +39,7 @@ class HistoryServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~HistoryServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; diff --git a/chrome/browser/history/shortcuts_backend.h b/chrome/browser/history/shortcuts_backend.h index 22971aa56e34..2571a882652f 100644 --- a/chrome/browser/history/shortcuts_backend.h +++ b/chrome/browser/history/shortcuts_backend.h @@ -18,7 +18,7 @@ #include "base/synchronization/lock.h" #include "base/time/time.h" #include "chrome/browser/autocomplete/autocomplete_match.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 "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "url/gurl.h" diff --git a/chrome/browser/history/shortcuts_backend_factory.cc b/chrome/browser/history/shortcuts_backend_factory.cc index e532455f4506..2baf86a3f9a6 100644 --- a/chrome/browser/history/shortcuts_backend_factory.cc +++ b/chrome/browser/history/shortcuts_backend_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/history/shortcuts_backend.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" using history::ShortcutsBackend; diff --git a/chrome/browser/history/shortcuts_backend_factory.h b/chrome/browser/history/shortcuts_backend_factory.h index d56c5581efab..5a24f15b2148 100644 --- a/chrome/browser/history/shortcuts_backend_factory.h +++ b/chrome/browser/history/shortcuts_backend_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/history/web_history_service.h b/chrome/browser/history/web_history_service.h index f339d324151c..119b6e916678 100644 --- a/chrome/browser/history/web_history_service.h +++ b/chrome/browser/history/web_history_service.h @@ -10,7 +10,7 @@ #include "base/memory/weak_ptr.h" #include "chrome/browser/history/history_types.h" #include "chrome/browser/profiles/profile.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" namespace base { class DictionaryValue; @@ -25,7 +25,7 @@ namespace history { // Provides an API for querying Google servers for a signed-in user's // synced history visits. It is roughly analogous to HistoryService, and // supports a similar API. -class WebHistoryService : public BrowserContextKeyedService { +class WebHistoryService : public KeyedService { public: // Handles all the work of making an API request. This class encapsulates // the entire state of the request. When an instance is destroyed, all diff --git a/chrome/browser/history/web_history_service_factory.cc b/chrome/browser/history/web_history_service_factory.cc index bd0194b6e800..d3446a9f5c9e 100644 --- a/chrome/browser/history/web_history_service_factory.cc +++ b/chrome/browser/history/web_history_service_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_service_factory.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" namespace { // Returns true if the user is signed in and full history sync is enabled, @@ -45,7 +45,7 @@ history::WebHistoryService* WebHistoryServiceFactory::GetForProfile( return NULL; } -BrowserContextKeyedService* WebHistoryServiceFactory::BuildServiceInstanceFor( +KeyedService* WebHistoryServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast(context); diff --git a/chrome/browser/history/web_history_service_factory.h b/chrome/browser/history/web_history_service_factory.h index 3de9079bbb6c..c8c8db7eb8ea 100644 --- a/chrome/browser/history/web_history_service_factory.h +++ b/chrome/browser/history/web_history_service_factory.h @@ -7,7 +7,7 @@ #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" namespace history { class WebHistoryService; @@ -25,7 +25,7 @@ class WebHistoryServiceFactory : public BrowserContextKeyedServiceFactory { protected: // Overridden from BrowserContextKeyedServiceFactory. - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; private: diff --git a/chrome/browser/invalidation/fake_invalidation_service.cc b/chrome/browser/invalidation/fake_invalidation_service.cc index c782dd7d9fec..e73c0d016e5e 100644 --- a/chrome/browser/invalidation/fake_invalidation_service.cc +++ b/chrome/browser/invalidation/fake_invalidation_service.cc @@ -18,8 +18,7 @@ FakeInvalidationService::~FakeInvalidationService() { } // static -BrowserContextKeyedService* FakeInvalidationService::Build( - content::BrowserContext* context) { +KeyedService* FakeInvalidationService::Build(content::BrowserContext* context) { return new FakeInvalidationService(); } diff --git a/chrome/browser/invalidation/fake_invalidation_service.h b/chrome/browser/invalidation/fake_invalidation_service.h index a020143c1ab5..2a9a9a13f025 100644 --- a/chrome/browser/invalidation/fake_invalidation_service.h +++ b/chrome/browser/invalidation/fake_invalidation_service.h @@ -32,7 +32,7 @@ class FakeInvalidationService : public InvalidationService { FakeInvalidationService(); virtual ~FakeInvalidationService(); - static BrowserContextKeyedService* Build(content::BrowserContext* context); + static KeyedService* Build(content::BrowserContext* context); virtual void RegisterInvalidationHandler( syncer::InvalidationHandler* handler) OVERRIDE; diff --git a/chrome/browser/invalidation/invalidation_service.h b/chrome/browser/invalidation/invalidation_service.h index 48b7274b8bb0..f0eddb15bec2 100644 --- a/chrome/browser/invalidation/invalidation_service.h +++ b/chrome/browser/invalidation/invalidation_service.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_H_ #define CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_H_ -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "sync/notifier/invalidation_util.h" #include "sync/notifier/invalidator_state.h" @@ -65,7 +65,7 @@ class InvalidationLogger; // This class inherits from ProfileKeyedService to make it possible to correctly // cast from various InvalidationService implementations to ProfileKeyedService // in InvalidationServiceFactory. -class InvalidationService : public BrowserContextKeyedService { +class InvalidationService : public KeyedService { public: // Starts sending notifications to |handler|. |handler| must not be NULL, // and it must not already be registered. diff --git a/chrome/browser/invalidation/invalidation_service_android.h b/chrome/browser/invalidation/invalidation_service_android.h index af77045871e2..a02988505065 100644 --- a/chrome/browser/invalidation/invalidation_service_android.h +++ b/chrome/browser/invalidation/invalidation_service_android.h @@ -10,7 +10,7 @@ #include "base/memory/scoped_ptr.h" #include "base/threading/non_thread_safe.h" #include "chrome/browser/invalidation/invalidation_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/notifier/invalidator_registrar.h" diff --git a/chrome/browser/invalidation/invalidation_service_factory.cc b/chrome/browser/invalidation/invalidation_service_factory.cc index ad46df488d4f..26989d1ea5c2 100644 --- a/chrome/browser/invalidation/invalidation_service_factory.cc +++ b/chrome/browser/invalidation/invalidation_service_factory.cc @@ -16,7 +16,7 @@ #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager.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" #if defined(OS_ANDROID) #include "chrome/browser/invalidation/invalidation_controller_android.h" @@ -55,7 +55,7 @@ void InvalidationServiceFactory::RegisterTestingFactory( testing_factory_ = testing_factory; } -BrowserContextKeyedService* InvalidationServiceFactory::BuildServiceInstanceFor( +KeyedService* InvalidationServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { Profile* profile = static_cast(context); diff --git a/chrome/browser/invalidation/invalidation_service_factory.h b/chrome/browser/invalidation/invalidation_service_factory.h index 5bcfa60ccaf8..b75a378a02be 100644 --- a/chrome/browser/invalidation/invalidation_service_factory.h +++ b/chrome/browser/invalidation/invalidation_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" namespace user_prefs { class PrefRegistrySyncable; @@ -47,7 +47,7 @@ class InvalidationServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~InvalidationServiceFactory(); // 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/invalidation/p2p_invalidation_service.h b/chrome/browser/invalidation/p2p_invalidation_service.h index d1407eb8d74d..a7963ca8d727 100644 --- a/chrome/browser/invalidation/p2p_invalidation_service.h +++ b/chrome/browser/invalidation/p2p_invalidation_service.h @@ -4,7 +4,7 @@ #include "base/threading/non_thread_safe.h" #include "chrome/browser/invalidation/invalidation_service.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #ifndef CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ #define CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ @@ -29,7 +29,7 @@ class P2PInvalidationService explicit P2PInvalidationService(Profile* profile); virtual ~P2PInvalidationService(); - // Overrides BrowserContextKeyedService method. + // Overrides KeyedService method. virtual void Shutdown() OVERRIDE; // InvalidationService implementation. diff --git a/chrome/browser/invalidation/ticl_invalidation_service.h b/chrome/browser/invalidation/ticl_invalidation_service.h index 19cd19c668f6..97f98416ea14 100644 --- a/chrome/browser/invalidation/ticl_invalidation_service.h +++ b/chrome/browser/invalidation/ticl_invalidation_service.h @@ -13,7 +13,7 @@ #include "chrome/browser/invalidation/invalidator_storage.h" #include "chrome/browser/signin/profile_oauth2_token_service.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 "google_apis/gaia/oauth2_token_service.h" #include "net/base/backoff_entry.h" #include "sync/notifier/invalidation_handler.h" @@ -82,7 +82,7 @@ class TiclInvalidationService : public base::NonThreadSafe, const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; virtual std::string GetOwnerName() const OVERRIDE; - // Overrides BrowserContextKeyedService method. + // Overrides KeyedService method. virtual void Shutdown() OVERRIDE; protected: diff --git a/chrome/browser/local_discovery/privet_notifications.h b/chrome/browser/local_discovery/privet_notifications.h index 7bbb771dcdb7..b457e7d95455 100644 --- a/chrome/browser/local_discovery/privet_notifications.h +++ b/chrome/browser/local_discovery/privet_notifications.h @@ -12,7 +12,7 @@ #include "chrome/browser/local_discovery/privet_device_lister.h" #include "chrome/browser/local_discovery/privet_http.h" #include "chrome/browser/notifications/notification_delegate.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class NotificationUIManager; @@ -86,7 +86,7 @@ class PrivetNotificationsListener { }; class PrivetNotificationService - : public BrowserContextKeyedService, + : public KeyedService, public PrivetDeviceLister::Delegate, public PrivetNotificationsListener::Delegate, public base::SupportsWeakPtr { diff --git a/chrome/browser/local_discovery/privet_notifications_factory.cc b/chrome/browser/local_discovery/privet_notifications_factory.cc index 7c3bdf43f7a3..e782e54e6ea3 100644 --- a/chrome/browser/local_discovery/privet_notifications_factory.cc +++ b/chrome/browser/local_discovery/privet_notifications_factory.cc @@ -6,7 +6,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/local_discovery/privet_notifications.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace local_discovery { @@ -24,8 +24,7 @@ PrivetNotificationServiceFactory::PrivetNotificationServiceFactory() PrivetNotificationServiceFactory::~PrivetNotificationServiceFactory() { } -BrowserContextKeyedService* -PrivetNotificationServiceFactory::BuildServiceInstanceFor( +KeyedService* PrivetNotificationServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new PrivetNotificationService(profile); } diff --git a/chrome/browser/local_discovery/privet_notifications_factory.h b/chrome/browser/local_discovery/privet_notifications_factory.h index 6ea7710b0327..636ce6912d6e 100644 --- a/chrome/browser/local_discovery/privet_notifications_factory.h +++ b/chrome/browser/local_discovery/privet_notifications_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_NOTIFICATIONS_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 local_discovery { @@ -23,7 +23,7 @@ class PrivetNotificationServiceFactory virtual ~PrivetNotificationServiceFactory(); // 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/media/chrome_midi_permission_context.h b/chrome/browser/media/chrome_midi_permission_context.h index a868e453cdc7..0bc1daa27b62 100644 --- a/chrome/browser/media/chrome_midi_permission_context.h +++ b/chrome/browser/media/chrome_midi_permission_context.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_MEDIA_CHROME_MIDI_PERMISSION_CONTEXT_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" #include "content/public/browser/browser_context.h" namespace content { @@ -19,12 +19,12 @@ class PermissionRequestID; class Profile; // This class manages MIDI permissions flow. Used on the UI thread. -class ChromeMidiPermissionContext : public BrowserContextKeyedService { +class ChromeMidiPermissionContext : public KeyedService { public: explicit ChromeMidiPermissionContext(Profile* profile); virtual ~ChromeMidiPermissionContext(); - // BrowserContextKeyedService methods: + // KeyedService methods: virtual void Shutdown() OVERRIDE; // Request to ask users permission about MIDI. diff --git a/chrome/browser/media/chrome_midi_permission_context_factory.cc b/chrome/browser/media/chrome_midi_permission_context_factory.cc index 54d16580ed7a..83f91d7f1e7f 100644 --- a/chrome/browser/media/chrome_midi_permission_context_factory.cc +++ b/chrome/browser/media/chrome_midi_permission_context_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/media/chrome_midi_permission_context.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" // static ChromeMidiPermissionContext* @@ -33,8 +33,7 @@ ChromeMidiPermissionContextFactory:: ~ChromeMidiPermissionContextFactory() { } -BrowserContextKeyedService* -ChromeMidiPermissionContextFactory::BuildServiceInstanceFor( +KeyedService* ChromeMidiPermissionContextFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new ChromeMidiPermissionContext(static_cast(profile)); } diff --git a/chrome/browser/media/chrome_midi_permission_context_factory.h b/chrome/browser/media/chrome_midi_permission_context_factory.h index 35b65cba5f8e..3bcce61a3d17 100644 --- a/chrome/browser/media/chrome_midi_permission_context_factory.h +++ b/chrome/browser/media/chrome_midi_permission_context_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_MEDIA_CHROME_MIDI_PERMISSION_CONTEXT_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 ChromeMidiPermissionContext; class Profile; @@ -24,7 +24,7 @@ class ChromeMidiPermissionContextFactory virtual ~ChromeMidiPermissionContextFactory(); // BrowserContextKeyedBaseFactory methods: - 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/media/protected_media_identifier_permission_context_factory.cc b/chrome/browser/media/protected_media_identifier_permission_context_factory.cc index b4a2f47065c3..10e05fe044d4 100644 --- a/chrome/browser/media/protected_media_identifier_permission_context_factory.cc +++ b/chrome/browser/media/protected_media_identifier_permission_context_factory.cc @@ -8,12 +8,12 @@ #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" namespace { -class Service : public BrowserContextKeyedService { +class Service : public KeyedService { public: explicit Service(Profile* profile) { context_ = new ProtectedMediaIdentifierPermissionContext(profile); @@ -61,7 +61,7 @@ ProtectedMediaIdentifierPermissionContextFactory:: ~ProtectedMediaIdentifierPermissionContextFactory() { } -BrowserContextKeyedService* +KeyedService* ProtectedMediaIdentifierPermissionContextFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new Service(static_cast(profile)); diff --git a/chrome/browser/media/protected_media_identifier_permission_context_factory.h b/chrome/browser/media/protected_media_identifier_permission_context_factory.h index a6f85fee7186..1e5fcb47d42c 100644 --- a/chrome/browser/media/protected_media_identifier_permission_context_factory.h +++ b/chrome/browser/media/protected_media_identifier_permission_context_factory.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_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 ProtectedMediaIdentifierPermissionContext; class Profile; @@ -27,7 +27,7 @@ class ProtectedMediaIdentifierPermissionContextFactory virtual ~ProtectedMediaIdentifierPermissionContextFactory(); // BrowserContextKeyedBaseFactory methods: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; virtual void RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) OVERRIDE; diff --git a/chrome/browser/media_galleries/media_galleries_preferences.h b/chrome/browser/media_galleries/media_galleries_preferences.h index 15c6fbef89c8..3c8f0da19efd 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences.h +++ b/chrome/browser/media_galleries/media_galleries_preferences.h @@ -16,7 +16,7 @@ #include "base/observer_list.h" #include "base/strings/string16.h" #include "base/time/time.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "components/storage_monitor/removable_storage_observer.h" class Profile; @@ -133,7 +133,7 @@ typedef std::set MediaGalleryPrefIdSet; // A class to manage the media gallery preferences. There is one instance per // user profile. class MediaGalleriesPreferences - : public BrowserContextKeyedService, + : public KeyedService, public storage_monitor::RemovableStorageObserver { public: class GalleryChangeObserver { @@ -255,7 +255,7 @@ class MediaGalleriesPreferences base::Time GetLastScanCompletionTime() const; void SetLastScanCompletionTime(const base::Time& time); - // BrowserContextKeyedService implementation: + // KeyedService implementation: virtual void Shutdown() OVERRIDE; static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); diff --git a/chrome/browser/media_galleries/media_galleries_preferences_factory.cc b/chrome/browser/media_galleries/media_galleries_preferences_factory.cc index 05bbe95ad41d..e1ae1f7c988c 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences_factory.cc +++ b/chrome/browser/media_galleries/media_galleries_preferences_factory.cc @@ -7,7 +7,7 @@ #include "chrome/browser/media_galleries/media_galleries_preferences.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" #include "components/user_prefs/pref_registry_syncable.h" // static @@ -30,8 +30,7 @@ MediaGalleriesPreferencesFactory::MediaGalleriesPreferencesFactory() MediaGalleriesPreferencesFactory::~MediaGalleriesPreferencesFactory() {} -BrowserContextKeyedService* -MediaGalleriesPreferencesFactory::BuildServiceInstanceFor( +KeyedService* MediaGalleriesPreferencesFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { return new MediaGalleriesPreferences(static_cast(profile)); } diff --git a/chrome/browser/media_galleries/media_galleries_preferences_factory.h b/chrome/browser/media_galleries/media_galleries_preferences_factory.h index a97a4aed57dd..cff471ed9f4d 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences_factory.h +++ b/chrome/browser/media_galleries/media_galleries_preferences_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 MediaGalleriesPreferences; class Profile; @@ -30,7 +30,7 @@ class MediaGalleriesPreferencesFactory virtual ~MediaGalleriesPreferencesFactory(); // 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/net/spdyproxy/data_reduction_proxy_settings.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h index 17186f076224..c2a4bcc3241a 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h @@ -78,7 +78,7 @@ COMPILE_ASSERT(kNumDaysInHistorySummary <= kNumDaysInHistory, // Central point for configuring the data reduction proxy. // This object lives on the UI thread and all of its methods are expected to // be called from there. -// TODO(marq): Convert this to be a BrowserContextKeyedService with an +// TODO(marq): Convert this to be a KeyedService with an // associated factory class, and refactor the Java call sites accordingly. class DataReductionProxySettings : public net::URLFetcherDelegate, diff --git a/chrome/browser/network_time/network_time_service.h b/chrome/browser/network_time/network_time_service.h index e1fde3ae706e..e9361e3c4e3f 100644 --- a/chrome/browser/network_time/network_time_service.h +++ b/chrome/browser/network_time/network_time_service.h @@ -7,7 +7,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" class NetworkTimeTracker; class Profile; @@ -17,7 +17,7 @@ class PrefRegistrySyncable; } // NetworkTimeService can convert local time to network time. -class NetworkTimeService : public BrowserContextKeyedService { +class NetworkTimeService : public KeyedService { public: explicit NetworkTimeService(Profile* profile); virtual ~NetworkTimeService(); diff --git a/chrome/browser/network_time/network_time_service_factory.cc b/chrome/browser/network_time/network_time_service_factory.cc index a6132dc62247..258228aedd98 100644 --- a/chrome/browser/network_time/network_time_service_factory.cc +++ b/chrome/browser/network_time/network_time_service_factory.cc @@ -6,7 +6,7 @@ #include "chrome/browser/network_time/network_time_service.h" #include "chrome/browser/profiles/incognito_helpers.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" NetworkTimeServiceFactory::NetworkTimeServiceFactory() : BrowserContextKeyedServiceFactory( @@ -34,8 +34,7 @@ content::BrowserContext* NetworkTimeServiceFactory::GetBrowserContextToUse( return chrome::GetBrowserContextRedirectedInIncognito(context); } -BrowserContextKeyedService* -NetworkTimeServiceFactory::BuildServiceInstanceFor( +KeyedService* NetworkTimeServiceFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { return new NetworkTimeService(static_cast(context)); } diff --git a/chrome/browser/network_time/network_time_service_factory.h b/chrome/browser/network_time/network_time_service_factory.h index 66139a978353..54faabc3d4dc 100644 --- a/chrome/browser/network_time/network_time_service_factory.h +++ b/chrome/browser/network_time/network_time_service_factory.h @@ -7,7 +7,7 @@ #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 NetworkTimeService; @@ -27,7 +27,7 @@ class NetworkTimeServiceFactory : public BrowserContextKeyedServiceFactory { // BrowserContextKeyedServiceFactory: virtual content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const OVERRIDE; - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const OVERRIDE; DISALLOW_COPY_AND_ASSIGN(NetworkTimeServiceFactory); diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h index da85763e577f..941f78d13227 100644 --- a/chrome/browser/notifications/desktop_notification_service.h +++ b/chrome/browser/notifications/desktop_notification_service.h @@ -17,7 +17,7 @@ #include "chrome/browser/content_settings/content_settings_provider.h" #include "chrome/browser/notifications/extension_welcome_notification.h" #include "chrome/common/content_settings.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 "third_party/WebKit/public/web/WebNotificationPresenter.h" @@ -46,7 +46,7 @@ class PrefRegistrySyncable; // The DesktopNotificationService is an object, owned by the Profile, // which provides the creation of desktop "toasts" to web pages and workers. -class DesktopNotificationService : public BrowserContextKeyedService, +class DesktopNotificationService : public KeyedService, public content::NotificationObserver { public: enum DesktopNotificationSource { diff --git a/chrome/browser/notifications/desktop_notification_service_factory.cc b/chrome/browser/notifications/desktop_notification_service_factory.cc index f8b958a485dd..c5e3e51fa0ab 100644 --- a/chrome/browser/notifications/desktop_notification_service_factory.cc +++ b/chrome/browser/notifications/desktop_notification_service_factory.cc @@ -8,7 +8,7 @@ #include "chrome/browser/notifications/desktop_notification_service.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" #include "content/public/browser/browser_thread.h" using content::BrowserThread; @@ -36,8 +36,7 @@ DesktopNotificationServiceFactory::DesktopNotificationServiceFactory() DesktopNotificationServiceFactory::~DesktopNotificationServiceFactory() { } -BrowserContextKeyedService* -DesktopNotificationServiceFactory::BuildServiceInstanceFor( +KeyedService* DesktopNotificationServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { DesktopNotificationService* service = new DesktopNotificationService(static_cast(profile), NULL); diff --git a/chrome/browser/notifications/desktop_notification_service_factory.h b/chrome/browser/notifications/desktop_notification_service_factory.h index c616b5032f04..2118e3e6e434 100644 --- a/chrome/browser/notifications/desktop_notification_service_factory.h +++ b/chrome/browser/notifications/desktop_notification_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 DesktopNotificationService; class Profile; @@ -31,7 +31,7 @@ class DesktopNotificationServiceFactory virtual ~DesktopNotificationServiceFactory(); // 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/notifications/sync_notifier/chrome_notifier_service.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc index 71ad19878ff4..4c296bb99d55 100644 --- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc +++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc @@ -120,7 +120,7 @@ ChromeNotifierService::ChromeNotifierService(Profile* profile, ChromeNotifierService::~ChromeNotifierService() {} -// Methods from BrowserContextKeyedService. +// Methods from KeyedService. void ChromeNotifierService::Shutdown() {} // syncer::SyncableService implementation. diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h index b500fcb624ff..f1c1c430d61c 100644 --- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h +++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h @@ -14,7 +14,7 @@ #include "base/threading/thread_checker.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/sync_notifier/synced_notification.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "sync/api/syncable_service.h" #include "ui/message_center/notifier_settings.h" @@ -55,12 +55,12 @@ enum ChromeNotifierServiceActionType { // delivered notifications for chrome. These are obtained from the sync service // and kept up to date. class ChromeNotifierService : public syncer::SyncableService, - public BrowserContextKeyedService { + public KeyedService { public: ChromeNotifierService(Profile* profile, NotificationUIManager* manager); virtual ~ChromeNotifierService(); - // Methods from BrowserContextKeyedService. + // Methods from KeyedService. virtual void Shutdown() OVERRIDE; // syncer::SyncableService implementation. diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc index 5e65f5a9220f..a33a7d019d2e 100644 --- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc +++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc @@ -9,7 +9,7 @@ #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_version_info.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace notifier { @@ -51,8 +51,7 @@ ChromeNotifierServiceFactory::ChromeNotifierServiceFactory() ChromeNotifierServiceFactory::~ChromeNotifierServiceFactory() { } -BrowserContextKeyedService* -ChromeNotifierServiceFactory::BuildServiceInstanceFor( +KeyedService* ChromeNotifierServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { NotificationUIManager* notification_manager = g_browser_process->notification_ui_manager(); diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h index 947f5b7c5d95..e86be50e46fc 100644 --- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h +++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h @@ -7,7 +7,7 @@ #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 CommandLine; @@ -35,7 +35,7 @@ class ChromeNotifierServiceFactory : public BrowserContextKeyedServiceFactory { virtual ~ChromeNotifierServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; }; diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.cc b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.cc index 62995066503f..fc1916c4b98d 100644 --- a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.cc +++ b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.cc @@ -24,7 +24,7 @@ SyncedNotificationAppInfoService::SyncedNotificationAppInfoService( SyncedNotificationAppInfoService::~SyncedNotificationAppInfoService() {} -// Methods from BrowserContextKeyedService. +// Methods from KeyedService. void SyncedNotificationAppInfoService::Shutdown() {} // syncer::SyncableService implementation. diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.h b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.h index 4a1b19b98fe1..17f036f49928 100644 --- a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.h +++ b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.h @@ -12,7 +12,7 @@ #include "base/memory/scoped_vector.h" #include "base/threading/thread_checker.h" #include "chrome/browser/notifications/sync_notifier/synced_notification_app_info.h" -#include "components/browser_context_keyed_service/browser_context_keyed_service.h" +#include "components/keyed_service/core/keyed_service.h" #include "sync/api/syncable_service.h" class NotificationUIManager; @@ -28,12 +28,12 @@ namespace notifier { // from the server with metadata about the services sending synced // notifications. class SyncedNotificationAppInfoService : public syncer::SyncableService, - public BrowserContextKeyedService { + public KeyedService { public: explicit SyncedNotificationAppInfoService(Profile* profile); virtual ~SyncedNotificationAppInfoService(); - // Methods from BrowserContextKeyedService. + // Methods from KeyedService. virtual void Shutdown() OVERRIDE; // syncer::SyncableService implementation. diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.cc b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.cc index 54622038159a..760760fe617c 100644 --- a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.cc +++ b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.cc @@ -6,7 +6,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/notifications/sync_notifier/synced_notification_app_info_service.h" -#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" namespace notifier { @@ -34,8 +34,7 @@ SyncedNotificationAppInfoServiceFactory:: SyncedNotificationAppInfoServiceFactory:: ~SyncedNotificationAppInfoServiceFactory() {} -BrowserContextKeyedService* -SyncedNotificationAppInfoServiceFactory::BuildServiceInstanceFor( +KeyedService* SyncedNotificationAppInfoServiceFactory::BuildServiceInstanceFor( content::BrowserContext* profile) const { SyncedNotificationAppInfoService* app_info_service = new SyncedNotificationAppInfoService(static_cast(profile)); diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.h b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.h index acb2b3f3ccfe..2795683a5247 100644 --- a/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.h +++ b/chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.h @@ -7,7 +7,7 @@ #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" namespace notifier { @@ -31,7 +31,7 @@ class SyncedNotificationAppInfoServiceFactory virtual ~SyncedNotificationAppInfoServiceFactory(); // BrowserContextKeyedServiceFactory: - virtual BrowserContextKeyedService* BuildServiceInstanceFor( + virtual KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const OVERRIDE; }; -- 2.11.4.GIT