diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 22:57:48 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 22:57:48 +0000 |
commit | 1f3157f5c807cae9cddd92fb8b6e4908da9adefb (patch) | |
tree | 47aad89aebb339ac6f1723af13da3795200a62a6 /chrome/browser/gtk/browser_window_gtk.cc | |
parent | 65f77adcaf52868c720a73ba3ca08dee7899d707 (diff) | |
download | chromium_src-1f3157f5c807cae9cddd92fb8b6e4908da9adefb.zip chromium_src-1f3157f5c807cae9cddd92fb8b6e4908da9adefb.tar.gz chromium_src-1f3157f5c807cae9cddd92fb8b6e4908da9adefb.tar.bz2 |
Use a NotificationRegistrar to listen for notifications.
BUG=2381
Review URL: http://codereview.chromium.org/113792
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/browser_window_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index 34e42f0..24d4509 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -354,17 +354,11 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser) HideUnsupportedWindowFeatures(); - NotificationService* ns = NotificationService::current(); - ns->AddObserver(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, - NotificationService::AllSources()); + registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, + NotificationService::AllSources()); } BrowserWindowGtk::~BrowserWindowGtk() { - NotificationService* ns = NotificationService::current(); - ns->RemoveObserver(this, - NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, - NotificationService::AllSources()); - browser_->tabstrip_model()->RemoveObserver(this); } |