Index: chrome/browser/themes/theme_service.h |
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h |
index 4baa6af24a7b77cb4cd85bbefe660a74f674c9d5..cd04f90c27841b1e6fc5b4bbf461d483d494c3f4 100644 |
--- a/chrome/browser/themes/theme_service.h |
+++ b/chrome/browser/themes/theme_service.h |
@@ -13,10 +13,9 @@ |
#include "base/compiler_specific.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/threading/non_thread_safe.h" |
#include "chrome/browser/profiles/profile_keyed_service.h" |
-#include "content/public/browser/notification_observer.h" |
-#include "content/public/browser/notification_registrar.h" |
#include "ui/base/theme_provider.h" |
class BrowserThemePack; |
@@ -52,7 +51,6 @@ extern "C" NSString* const kBrowserThemeDidChangeNotification; |
#endif // __OBJC__ |
class ThemeService : public base::NonThreadSafe, |
- public content::NotificationObserver, |
public ProfileKeyedService, |
public ui::ThemeProvider { |
public: |
@@ -94,11 +92,6 @@ class ThemeService : public base::NonThreadSafe, |
virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const OVERRIDE; |
#endif |
- // Overridden from content::NotificationObserver: |
- virtual void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) OVERRIDE; |
- |
// Set the current theme to the theme defined in |extension|. |
// |extension| must already be added to this profile's |
// ExtensionService. |
@@ -170,6 +163,8 @@ class ThemeService : public base::NonThreadSafe, |
private: |
friend class ThemeServiceTest; |
+ void FinishLoadingAfterExtensionsReady(); |
+ |
// Migrate the theme to the new theme pack schema by recreating the data pack |
// from the extension. |
void MigrateTheme(); |
@@ -217,7 +212,7 @@ class ThemeService : public base::NonThreadSafe, |
// The number of infobars currently displayed. |
int number_of_infobars_; |
- content::NotificationRegistrar registrar_; |
+ base::WeakPtrFactory<ThemeService> weak_ptr_factory_; |
scoped_ptr<ThemeSyncableService> theme_syncable_service_; |