diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 21:54:40 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 21:54:40 +0000 |
commit | 5e24a9861f56772b42bb173554e55a831f98f746 (patch) | |
tree | ae49ac6073fbc0f67b07461ac310d43898274856 /chrome/common/notification_registrar.cc | |
parent | 67eefea83d6f8fd0859b4a5e2526583c00dac3a1 (diff) | |
download | chromium_src-5e24a9861f56772b42bb173554e55a831f98f746.zip chromium_src-5e24a9861f56772b42bb173554e55a831f98f746.tar.gz chromium_src-5e24a9861f56772b42bb173554e55a831f98f746.tar.bz2 |
Pass NotificationSource by const ref rather than value, as it's a class (and this matches NotificationObserver).
Review URL: http://codereview.chromium.org/6468
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/notification_registrar.cc')
-rw-r--r-- | chrome/common/notification_registrar.cc | 4 |
1 files changed, 2 insertions, 2 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); |