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

Unified Diff: sync/notifier/p2p_notifier.h

Issue 10702074: Refactor sync-specific parts out of SyncNotifier/SyncNotifierObserver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now with tests Created 8 years, 5 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
Index: sync/notifier/p2p_notifier.h
diff --git a/sync/notifier/p2p_notifier.h b/sync/notifier/p2p_notifier.h
index 83ce5951c802f52dbb8251db1fc5dba55771cc81..7f894a4db600e9c317376b61e22e2e9dc6d924ab 100644
--- a/sync/notifier/p2p_notifier.h
+++ b/sync/notifier/p2p_notifier.h
@@ -20,6 +20,7 @@
#include "sync/internal_api/public/base/model_type.h"
#include "sync/notifier/notifications_disabled_reason.h"
#include "sync/notifier/sync_notifier.h"
+#include "sync/notifier/sync_notifier_helper.h"
namespace notifier {
class PushClient;
@@ -81,9 +82,8 @@ class P2PNotificationData {
syncer::ModelTypeSet changed_types_;
};
-class P2PNotifier
- : public SyncNotifier,
- public notifier::PushClientObserver {
+class P2PNotifier : public SyncNotifier,
+ 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,12 @@ class P2PNotifier
virtual ~P2PNotifier();
// SyncNotifier implementation
- virtual void AddObserver(SyncNotifierObserver* observer) OVERRIDE;
- virtual void RemoveObserver(SyncNotifierObserver* observer) OVERRIDE;
+ virtual void UpdateRegisteredIds(SyncNotifierObserver* handler,
+ const ObjectIdSet& ids) 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,7 +120,7 @@ class P2PNotifier
base::ThreadChecker thread_checker_;
- ObserverList<SyncNotifierObserver> observer_list_;
+ SyncNotifierHelper helper_;
// The push client.
scoped_ptr<notifier::PushClient> push_client_;

Powered by Google App Engine
This is Rietveld 408576698