Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2373)

Unified Diff: chrome/browser/google_url_tracker.cc

Issue 115674: More NotificationRegistrar conversions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/google_url_tracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_url_tracker.cc
===================================================================
--- chrome/browser/google_url_tracker.cc (revision 16645)
+++ chrome/browser/google_url_tracker.cc (working copy)
@@ -25,9 +25,8 @@
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() {
- NotificationService::current()->RemoveObserver(this,
- NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE,
- NotificationService::AllSources());
}
// static
« no previous file with comments | « chrome/browser/google_url_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698