summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 01:40:44 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 01:40:44 +0000
commit973ef14dea54da60ba038a1c7e27b84973f2a7bc (patch)
treebd51dcee27e4368a3c7e9c150dbf0a64a7a2c93e /chrome/browser/dom_ui
parent7417a7de5226d08a2785a18976abeb7d28ce6a67 (diff)
downloadchromium_src-973ef14dea54da60ba038a1c7e27b84973f2a7bc.zip
chromium_src-973ef14dea54da60ba038a1c7e27b84973f2a7bc.tar.gz
chromium_src-973ef14dea54da60ba038a1c7e27b84973f2a7bc.tar.bz2
Missed a case when converting this file to NotificationRegistrar.
BUG=2381 Review URL: http://codereview.chromium.org/113735 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index ccef07f..350e838 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -392,6 +392,8 @@ class MostVisitedHandler : public DOMMessageHandler,
// Returns the key used in url_blacklist_ for the passed |url|.
std::wstring GetBlacklistKeyForURL(const std::string& url);
+ NotificationRegistrar registrar_;
+
// Our consumer for the history service.
CancelableRequestConsumerTSimple<PageUsageData*> cancelable_consumer_;
@@ -441,15 +443,11 @@ MostVisitedHandler::MostVisitedHandler(DOMUI* dom_ui)
}
// Get notifications when history is cleared.
- NotificationService* service = NotificationService::current();
- service->AddObserver(this, NotificationType::HISTORY_URLS_DELETED,
- Source<Profile>(dom_ui_->GetProfile()));
+ registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED,
+ Source<Profile>(dom_ui_->GetProfile()));
}
MostVisitedHandler::~MostVisitedHandler() {
- NotificationService* service = NotificationService::current();
- service->RemoveObserver(this, NotificationType::HISTORY_URLS_DELETED,
- Source<Profile>(dom_ui_->GetProfile()));
}
void MostVisitedHandler::HandleGetMostVisited(const Value* value) {