| Index: content/public/browser/notification_registrar.cc
|
| diff --git a/content/public/browser/notification_registrar.cc b/content/public/browser/notification_registrar.cc
|
| index d539902738094d886ae6657e45104649081774f7..1c4004d038f89e92c53356d97d37b0136db56065 100644
|
| --- a/content/public/browser/notification_registrar.cc
|
| +++ b/content/public/browser/notification_registrar.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -28,7 +28,7 @@ struct NotificationRegistrar::Record {
|
|
|
| NotificationObserver* observer;
|
| int type;
|
| - content::NotificationSource source;
|
| + NotificationSource source;
|
| base::PlatformThreadId thread_id;
|
| };
|
|
|
| @@ -54,7 +54,7 @@ NotificationRegistrar::~NotificationRegistrar() {
|
|
|
| void NotificationRegistrar::Add(NotificationObserver* observer,
|
| int type,
|
| - const content::NotificationSource& source) {
|
| + const NotificationSource& source) {
|
| DCHECK(!IsRegistered(observer, type, source)) << "Duplicate registration.";
|
|
|
| Record record = { observer, type, source, base::PlatformThread::CurrentId() };
|
| @@ -65,7 +65,7 @@ void NotificationRegistrar::Add(NotificationObserver* observer,
|
|
|
| void NotificationRegistrar::Remove(NotificationObserver* observer,
|
| int type,
|
| - const content::NotificationSource& source) {
|
| + const NotificationSource& source) {
|
| if (!IsRegistered(observer, type, source)) {
|
| NOTREACHED() << "Trying to remove unregistered observer of type " <<
|
| type << " from list of size " << registered_.size() << ".";
|
| @@ -114,10 +114,9 @@ bool NotificationRegistrar::IsEmpty() const {
|
| return registered_.empty();
|
| }
|
|
|
| -bool NotificationRegistrar::IsRegistered(
|
| - NotificationObserver* observer,
|
| - int type,
|
| - const content::NotificationSource& source) {
|
| +bool NotificationRegistrar::IsRegistered(NotificationObserver* observer,
|
| + int type,
|
| + const NotificationSource& source) {
|
| Record record = { observer, type, source };
|
| return std::find(registered_.begin(), registered_.end(), record) !=
|
| registered_.end();
|
|
|