diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 21:29:54 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 21:29:54 +0000 |
commit | 0baf54ea99585819b1f2c5ad1f87c83ae8138751 (patch) | |
tree | d8df6ac32db221e2b34c5a593d26ff48a0bd3fdb | |
parent | a29b1c2232fc9a02de9f8c6b7061b56387e5f25d (diff) | |
download | chromium_src-0baf54ea99585819b1f2c5ad1f87c83ae8138751.zip chromium_src-0baf54ea99585819b1f2c5ad1f87c83ae8138751.tar.gz chromium_src-0baf54ea99585819b1f2c5ad1f87c83ae8138751.tar.bz2 |
Fixed bug in how a profile listens to theme notifications
A profile should listen for theme notifications coming only
from its original profile.
BUG=None
TEST=Open normal and incognito window. Install in both window. Theme should change in both windows.
Review URL: http://codereview.chromium.org/4494001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65114 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/profile_impl.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc index 20e513f..40d5ed7 100644 --- a/chrome/browser/profile_impl.cc +++ b/chrome/browser/profile_impl.cc @@ -306,9 +306,9 @@ ProfileImpl::ProfileImpl(const FilePath& path) if (base_cache_path_.empty()) base_cache_path_ = path_; - // Listen for theme installation. + // Listen for theme installations from our original profile. registrar_.Add(this, NotificationType::THEME_INSTALLED, - NotificationService::AllSources()); + Source<Profile>(GetOriginalProfile())); // Listen for bookmark model load, to bootstrap the sync service. registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED, @@ -1226,6 +1226,7 @@ void ProfileImpl::Observe(NotificationType type, Source<Profile>(this), NotificationService::NoDetails()); } } else if (NotificationType::THEME_INSTALLED == type) { + DCHECK_EQ(Source<Profile>(source).ptr(), GetOriginalProfile()); const Extension* extension = Details<const Extension>(details).ptr(); SetTheme(extension); } else if (NotificationType::BOOKMARK_MODEL_LOADED == type) { |