From b3edb31e6ec0a3a3a312718933e907f341606548 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Fri, 22 May 2009 01:47:16 +0000 Subject: More NotificationRegistrar conversions. BUG=2381 Review URL: http://codereview.chromium.org/115674 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16699 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/google_url_tracker.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'chrome/browser/google_url_tracker.cc') diff --git a/chrome/browser/google_url_tracker.cc b/chrome/browser/google_url_tracker.cc index 2e26147..8b60ae4 100644 --- a/chrome/browser/google_url_tracker.cc +++ b/chrome/browser/google_url_tracker.cc @@ -25,9 +25,8 @@ GoogleURLTracker::GoogleURLTracker() already_fetched_(false), need_to_fetch_(false), request_context_available_(!!Profile::GetDefaultRequestContext()) { - NotificationService::current()->AddObserver(this, - NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, - NotificationService::AllSources()); + registrar_.Add(this, NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, + NotificationService::AllSources()); // Because this function can be called during startup, when kicking off a URL // fetch can eat up 20 ms of time, we delay five seconds, which is hopefully @@ -42,9 +41,6 @@ GoogleURLTracker::GoogleURLTracker() } GoogleURLTracker::~GoogleURLTracker() { - NotificationService::current()->RemoveObserver(this, - NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, - NotificationService::AllSources()); } // static -- cgit v1.1