diff options
-rw-r--r-- | chrome/common/notification_registrar.cc | 4 | ||||
-rw-r--r-- | chrome/common/notification_registrar.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/common/notification_registrar.cc b/chrome/common/notification_registrar.cc index fdedde4..aaa5b9e 100644 --- a/chrome/common/notification_registrar.cc +++ b/chrome/common/notification_registrar.cc @@ -15,7 +15,7 @@ NotificationRegistrar::~NotificationRegistrar() { void NotificationRegistrar::Add(NotificationObserver* observer, NotificationType type, - NotificationSource source) { + const NotificationSource& source) { Record record = { observer, type, source }; DCHECK(std::find(registered_.begin(), registered_.end(), record) == registered_.end()) << "Duplicate registration."; @@ -26,7 +26,7 @@ void NotificationRegistrar::Add(NotificationObserver* observer, void NotificationRegistrar::Remove(NotificationObserver* observer, NotificationType type, - NotificationSource source) { + const NotificationSource& source) { Record record = { observer, type, source }; RecordVector::iterator found = std::find( registered_.begin(), registered_.end(), record); diff --git a/chrome/common/notification_registrar.h b/chrome/common/notification_registrar.h index e253eb4..25e46b2 100644 --- a/chrome/common/notification_registrar.h +++ b/chrome/common/notification_registrar.h @@ -27,10 +27,10 @@ class NotificationRegistrar { // Wrappers around NotificationService::[Add|Remove]Observer. void Add(NotificationObserver* observer, NotificationType type, - NotificationSource source); + const NotificationSource& source); void Remove(NotificationObserver* observer, NotificationType type, - NotificationSource source); + const NotificationSource& source); // Unregisters all notifications. void RemoveAll(); |