Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1167)

Unified Diff: chrome/browser/themes/theme_service_factory.h

Issue 6766004: Create a ProfileDependencyManager to order ProfileKeyedService destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix improper usage of static_cast<> in existing mac code. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/themes/theme_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service_factory.h
diff --git a/chrome/browser/themes/theme_service_factory.h b/chrome/browser/themes/theme_service_factory.h
index cc8900203cfa06f31e8cdfab75496ea26a71d58e..a837ee8ff21e5d60fd5dd1bfc881f778acbddb22 100644
--- a/chrome/browser/themes/theme_service_factory.h
+++ b/chrome/browser/themes/theme_service_factory.h
@@ -8,6 +8,7 @@
#include <map>
#include "base/memory/singleton.h"
+#include "chrome/browser/profiles/profile_keyed_service_factory.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
@@ -18,7 +19,7 @@ class Profile;
// Singleton that owns all ThemeServices and associates them with
// Profiles. Listens for the Profile's destruction notification and cleans up
// the associated ThemeService.
-class ThemeServiceFactory : public NotificationObserver {
+class ThemeServiceFactory : public ProfileKeyedServiceFactory {
public:
// Returns the ThemeService that provides theming resources for
// |profile|. Note that even if a Profile doesn't have a theme installed, it
@@ -41,19 +42,11 @@ class ThemeServiceFactory : public NotificationObserver {
friend struct DefaultSingletonTraits<ThemeServiceFactory>;
ThemeServiceFactory();
- ~ThemeServiceFactory();
+ virtual ~ThemeServiceFactory();
- // Maps |profile| to |provider| and listens for notifications relating to
- // either.
- void Associate(Profile* profile, ThemeService* provider);
-
- // NotificationObserver:
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
-
- NotificationRegistrar registrar_;
- std::map<Profile*, ThemeService*> mapping_;
+ // ProfileKeyedServiceFactory:
+ virtual ProfileKeyedService* BuildServiceInstanceFor(Profile* profile) const;
+ virtual bool ServiceRedirectedInIncognito();
};
#endif // CHROME_BROWSER_THEMES_THEME_SERVICE_FACTORY_H_
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/themes/theme_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698