Chromium Code Reviews| Index: sync/notifier/p2p_notifier.h |
| diff --git a/sync/notifier/p2p_notifier.h b/sync/notifier/p2p_notifier.h |
| index 83ce5951c802f52dbb8251db1fc5dba55771cc81..328e5f699f15dc5d9eece7c7e86928162fd96702 100644 |
| --- a/sync/notifier/p2p_notifier.h |
| +++ b/sync/notifier/p2p_notifier.h |
| @@ -18,6 +18,7 @@ |
| #include "base/threading/thread_checker.h" |
| #include "jingle/notifier/listener/push_client_observer.h" |
| #include "sync/internal_api/public/base/model_type.h" |
| +#include "sync/notifier/invalidation_notifier_base.h" |
| #include "sync/notifier/notifications_disabled_reason.h" |
| #include "sync/notifier/sync_notifier.h" |
| @@ -81,9 +82,8 @@ class P2PNotificationData { |
| syncer::ModelTypeSet changed_types_; |
| }; |
| -class P2PNotifier |
| - : public SyncNotifier, |
| - public notifier::PushClientObserver { |
| +class P2PNotifier : public InvalidationNotifierBase, |
|
akalin
2012/07/11 00:10:24
i'm confused. P2PNotifier isn't an InvalidationNo
dcheng
2012/07/11 05:45:28
It probably needs a better name. It's to share the
akalin
2012/07/11 20:27:02
Would prefer a composed helper object rather than
|
| + public notifier::PushClientObserver { |
| public: |
| // The |send_notification_target| parameter was added to allow us to send |
| // self-notifications in some cases, but not others. The value should be |
| @@ -96,14 +96,13 @@ class P2PNotifier |
| virtual ~P2PNotifier(); |
| // SyncNotifier implementation |
| - virtual void AddObserver(SyncNotifierObserver* observer) OVERRIDE; |
| - virtual void RemoveObserver(SyncNotifierObserver* observer) OVERRIDE; |
| + virtual void AddHandler(SyncNotifierObserver* observer) OVERRIDE; |
| + virtual void RemoveHandler(SyncNotifierObserver* observer) OVERRIDE; |
| + virtual void ReloadHandlers() OVERRIDE; |
| virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; |
| virtual void SetStateDeprecated(const std::string& state) OVERRIDE; |
| virtual void UpdateCredentials( |
| const std::string& email, const std::string& token) OVERRIDE; |
| - virtual void UpdateEnabledTypes( |
| - syncer::ModelTypeSet enabled_types) OVERRIDE; |
| virtual void SendNotification( |
| syncer::ModelTypeSet changed_types) OVERRIDE; |
| @@ -122,8 +121,6 @@ class P2PNotifier |
| base::ThreadChecker thread_checker_; |
| - ObserverList<SyncNotifierObserver> observer_list_; |
| - |
| // The push client. |
| scoped_ptr<notifier::PushClient> push_client_; |
| // Our unique ID. |