diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 18:09:02 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 18:09:02 +0000 |
commit | c7fa4367503441fefc7da332b0bddd329ceea9dd (patch) | |
tree | b1469aab9cb635f9f00096b7f746047272474690 /chrome/browser/sessions | |
parent | aca70615b08a5d741e5a10b91c8746e74d66f897 (diff) | |
download | chromium_src-c7fa4367503441fefc7da332b0bddd329ceea9dd.zip chromium_src-c7fa4367503441fefc7da332b0bddd329ceea9dd.tar.gz chromium_src-c7fa4367503441fefc7da332b0bddd329ceea9dd.tar.bz2 |
[components] Switch {RefCounted}ProfileKeyedService to use BrowserContext
instead of Profile. This will help move it out of chrome.
BUG=227219
Review URL: https://codereview.chromium.org/14141006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
7 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/sessions/in_memory_tab_restore_service.cc b/chrome/browser/sessions/in_memory_tab_restore_service.cc index c7f81f2..89caa2e 100644 --- a/chrome/browser/sessions/in_memory_tab_restore_service.cc +++ b/chrome/browser/sessions/in_memory_tab_restore_service.cc @@ -5,6 +5,7 @@ #include "chrome/browser/sessions/in_memory_tab_restore_service.h" #include "base/compiler_specific.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/tab_restore_service_factory.h" InMemoryTabRestoreService::InMemoryTabRestoreService( @@ -87,6 +88,6 @@ void InMemoryTabRestoreService::Shutdown() { } ProfileKeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( - Profile* profile) const { - return new InMemoryTabRestoreService(profile, NULL); + content::BrowserContext* profile) const { + return new InMemoryTabRestoreService(static_cast<Profile*>(profile), NULL); } diff --git a/chrome/browser/sessions/persistent_tab_restore_service.cc b/chrome/browser/sessions/persistent_tab_restore_service.cc index 9e7e801..7476086 100644 --- a/chrome/browser/sessions/persistent_tab_restore_service.cc +++ b/chrome/browser/sessions/persistent_tab_restore_service.cc @@ -975,6 +975,6 @@ void PersistentTabRestoreService::PruneEntries() { } ProfileKeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( - Profile* profile) const { - return new PersistentTabRestoreService(profile, NULL); + content::BrowserContext* profile) const { + return new PersistentTabRestoreService(static_cast<Profile*>(profile), NULL); } diff --git a/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc b/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc index 1c6675c..a4b91e4 100644 --- a/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc +++ b/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc @@ -7,6 +7,7 @@ #include "base/compiler_specific.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sessions/session_service_factory.h" #include "chrome/browser/sessions/session_types.h" diff --git a/chrome/browser/sessions/session_service_factory.cc b/chrome/browser/sessions/session_service_factory.cc index 7c27170..938420a 100644 --- a/chrome/browser/sessions/session_service_factory.cc +++ b/chrome/browser/sessions/session_service_factory.cc @@ -4,6 +4,7 @@ #include "chrome/browser/sessions/session_service_factory.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_dependency_manager.h" #include "chrome/browser/sessions/session_service.h" @@ -58,9 +59,9 @@ SessionServiceFactory::~SessionServiceFactory() { } ProfileKeyedService* SessionServiceFactory::BuildServiceInstanceFor( - Profile* profile) const { + content::BrowserContext* profile) const { SessionService* service = NULL; - service = new SessionService(profile); + service = new SessionService(static_cast<Profile*>(profile)); service->ResetFromCurrentBrowsers(); return service; } diff --git a/chrome/browser/sessions/session_service_factory.h b/chrome/browser/sessions/session_service_factory.h index 3a4fde8..3500bc7 100644 --- a/chrome/browser/sessions/session_service_factory.h +++ b/chrome/browser/sessions/session_service_factory.h @@ -56,7 +56,7 @@ class SessionServiceFactory : public ProfileKeyedServiceFactory { // ProfileKeyedServiceFactory: virtual ProfileKeyedService* BuildServiceInstanceFor( - Profile* profile) const OVERRIDE; + content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsCreatedWithProfile() const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; }; diff --git a/chrome/browser/sessions/tab_restore_service_factory.cc b/chrome/browser/sessions/tab_restore_service_factory.cc index a0ad156..c4eba06 100644 --- a/chrome/browser/sessions/tab_restore_service_factory.cc +++ b/chrome/browser/sessions/tab_restore_service_factory.cc @@ -4,6 +4,7 @@ #include "chrome/browser/sessions/tab_restore_service_factory.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_dependency_manager.h" #include "chrome/browser/sessions/tab_restore_service.h" diff --git a/chrome/browser/sessions/tab_restore_service_factory.h b/chrome/browser/sessions/tab_restore_service_factory.h index be90f8e..f9e513e 100644 --- a/chrome/browser/sessions/tab_restore_service_factory.h +++ b/chrome/browser/sessions/tab_restore_service_factory.h @@ -34,7 +34,7 @@ class TabRestoreServiceFactory : public ProfileKeyedServiceFactory { // ProfileKeyedServiceFactory: virtual ProfileKeyedService* BuildServiceInstanceFor( - Profile* profile) const OVERRIDE; + content::BrowserContext* profile) const OVERRIDE; virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; }; |