| Index: chrome/browser/themes/theme_service.cc
|
| diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
|
| index 1731b47bbf9881445db31b9c9cf2b9ccc5dc49d7..3c4c3ff63b87859406d0262df87f679b00a904da 100644
|
| --- a/chrome/browser/themes/theme_service.cc
|
| +++ b/chrome/browser/themes/theme_service.cc
|
| @@ -209,6 +209,10 @@ void ThemeService::Init(Profile* profile) {
|
| DCHECK(CalledOnValidThread());
|
| profile_ = profile;
|
|
|
| + registrar_.Add(this,
|
| + NotificationType::THEME_INSTALLED,
|
| + Source<Profile>(profile_));
|
| +
|
| LoadThemePrefs();
|
| }
|
|
|
| @@ -604,6 +608,14 @@ void ThemeService::FreePlatformCaches() {
|
| }
|
| #endif
|
|
|
| +void ThemeService::Observe(NotificationType type,
|
| + const NotificationSource& source,
|
| + const NotificationDetails& details) {
|
| + DCHECK(type == NotificationType::THEME_INSTALLED);
|
| + const Extension* extension = Details<const Extension>(details).ptr();
|
| + SetTheme(extension);
|
| +}
|
| +
|
| void ThemeService::SavePackName(const FilePath& pack_path) {
|
| profile_->GetPrefs()->SetFilePath(
|
| prefs::kCurrentThemePackFilename, pack_path);
|
|
|