diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 20:32:08 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 20:32:08 +0000 |
commit | a3e61e816e52e956ed57d7edc1341ee2d61e0c7e (patch) | |
tree | 3fa44483afe024effc0d0bf064667a1bf9461001 /chrome/browser/extensions/theme_installed_infobar_delegate.cc | |
parent | 2c5c2d07325f72e4c2d2a10c7ed6669683e6f86d (diff) | |
download | chromium_src-a3e61e816e52e956ed57d7edc1341ee2d61e0c7e.zip chromium_src-a3e61e816e52e956ed57d7edc1341ee2d61e0c7e.tar.gz chromium_src-a3e61e816e52e956ed57d7edc1341ee2d61e0c7e.tar.bz2 |
[Sync] Simplify themes notifications and themes sync
Change ThemesService to listen to EXTENSION_LOADED instead of
THEME_INSTALLED. Remove THEME_INSTALLED notification and always send
EXTENSION_INSTALLED.
Remove Extension details from BROWSER_THEME_CHANGED notification.
The two changes above make it so that listeners to BROWSER_THEME_CHANGED
can simply query the ThemeService about the new theme; previously this
was not possible since the theme was only installed and not loaded.
Cut out the now-unneeded code in ThemeChangeProcessor (yay!).
BUG=74831
TEST=
Review URL: http://codereview.chromium.org/6874001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/theme_installed_infobar_delegate.cc')
-rw-r--r-- | chrome/browser/extensions/theme_installed_infobar_delegate.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc index eaf7a7a..e6aa111 100644 --- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc +++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc @@ -100,8 +100,7 @@ void ThemeInstalledInfoBarDelegate::Observe( DCHECK_EQ(NotificationType::BROWSER_THEME_CHANGED, type.value); // If the new theme is different from what this info bar is associated // with, close this info bar since it is no longer relevant. - const Extension* extension = Details<const Extension>(details).ptr(); - if (!extension || theme_id_ != extension->id()) { + if (theme_id_ != theme_service_->GetThemeID()) { if (tab_contents_ && !tab_contents_->is_being_destroyed()) { tab_contents_->RemoveInfoBar(this); // The infobar is gone so there is no reason for this delegate to keep |