summaryrefslogtreecommitdiffstats
path: root/chrome/browser/themes
diff options
context:
space:
mode:
authortorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 18:48:17 +0000
committertorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 18:48:17 +0000
commit7211f74d2f66c46507e235b39245f736420e68d1 (patch)
treeea8f2a932730dd902540f8e9ce2cb79db4b654c8 /chrome/browser/themes
parent413a8e22c2ff986d335cdc9b86f78a6716a52975 (diff)
downloadchromium_src-7211f74d2f66c46507e235b39245f736420e68d1.zip
chromium_src-7211f74d2f66c46507e235b39245f736420e68d1.tar.gz
chromium_src-7211f74d2f66c46507e235b39245f736420e68d1.tar.bz2
Profile shouldn't own DesktopNotificationService.
DesktopNotificationService is now owned by DesktopNotificationServiceFactory, using Profile as a key. This uses the ProfileKeyedService infrastructure originally created for ThemeServiceFactory. BUG=77155 TEST=existing tests Review URL: http://codereview.chromium.org/6803012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/themes')
-rw-r--r--chrome/browser/themes/theme_service_factory.cc7
-rw-r--r--chrome/browser/themes/theme_service_factory.h5
2 files changed, 2 insertions, 10 deletions
diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc
index 3a9e4b9..d0ba8eb 100644
--- a/chrome/browser/themes/theme_service_factory.cc
+++ b/chrome/browser/themes/theme_service_factory.cc
@@ -21,6 +21,7 @@ ThemeService* ThemeServiceFactory::GetForProfile(Profile* profile) {
GetInstance()->GetServiceForProfile(profile));
}
+// static
const Extension* ThemeServiceFactory::GetThemeForProfile(Profile* profile) {
std::string id = GetForProfile(profile)->GetThemeID();
if (id == ThemeService::kDefaultThemeID)
@@ -29,11 +30,7 @@ const Extension* ThemeServiceFactory::GetThemeForProfile(Profile* profile) {
return profile->GetExtensionService()->GetExtensionById(id, false);
}
-void ThemeServiceFactory::ForceAssociationBetween(Profile* profile,
- ThemeService* provider) {
- GetInstance()->Associate(profile, provider);
-}
-
+// static
ThemeServiceFactory* ThemeServiceFactory::GetInstance() {
return Singleton<ThemeServiceFactory>::get();
}
diff --git a/chrome/browser/themes/theme_service_factory.h b/chrome/browser/themes/theme_service_factory.h
index a837ee8..924704b 100644
--- a/chrome/browser/themes/theme_service_factory.h
+++ b/chrome/browser/themes/theme_service_factory.h
@@ -31,11 +31,6 @@ class ThemeServiceFactory : public ProfileKeyedServiceFactory {
// no installed theme, or the theme was cleared.
static const Extension* GetThemeForProfile(Profile* profile);
- // Forces an association between |profile| and |provider|. Used in unit tests
- // where we need to mock ThemeService.
- static void ForceAssociationBetween(Profile* profile,
- ThemeService* provider);
-
static ThemeServiceFactory* GetInstance();
private: