summaryrefslogtreecommitdiffstats
path: root/chrome/browser/themes
diff options
context:
space:
mode:
authortorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 12:36:53 +0000
committertorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 12:36:53 +0000
commitdcb72d5ca4b77916d0ecc139f2d5d8aa4461d4a9 (patch)
tree5acdcd312af2248ffd4aba3c264be40d42b550bf /chrome/browser/themes
parent146cb7d13ce0b53c7516d87e0a08009adb47db55 (diff)
downloadchromium_src-dcb72d5ca4b77916d0ecc139f2d5d8aa4461d4a9.zip
chromium_src-dcb72d5ca4b77916d0ecc139f2d5d8aa4461d4a9.tar.gz
chromium_src-dcb72d5ca4b77916d0ecc139f2d5d8aa4461d4a9.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@81399 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: