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

Side by Side Diff: sync/notifier/p2p_notifier.h

Issue 10824161: [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A notifier that uses p2p notifications based on XMPP push 5 // A notifier that uses p2p notifications based on XMPP push
6 // notifications. Used only for sync integration tests. 6 // notifications. Used only for sync integration tests.
7 7
8 #ifndef SYNC_NOTIFIER_P2P_NOTIFIER_H_ 8 #ifndef SYNC_NOTIFIER_P2P_NOTIFIER_H_
9 #define SYNC_NOTIFIER_P2P_NOTIFIER_H_ 9 #define SYNC_NOTIFIER_P2P_NOTIFIER_H_
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // self-notifications in some cases, but not others. The value should be 89 // self-notifications in some cases, but not others. The value should be
90 // either NOTIFY_ALL to send notifications to all clients, or NOTIFY_OTHERS 90 // either NOTIFY_ALL to send notifications to all clients, or NOTIFY_OTHERS
91 // to send notifications to all clients except for the one that triggered the 91 // to send notifications to all clients except for the one that triggered the
92 // notification. See crbug.com/97780. 92 // notification. See crbug.com/97780.
93 P2PNotifier(scoped_ptr<notifier::PushClient> push_client, 93 P2PNotifier(scoped_ptr<notifier::PushClient> push_client,
94 P2PNotificationTarget send_notification_target); 94 P2PNotificationTarget send_notification_target);
95 95
96 virtual ~P2PNotifier(); 96 virtual ~P2PNotifier();
97 97
98 // SyncNotifier implementation 98 // SyncNotifier implementation
99 virtual void UpdateRegisteredIds(SyncNotifierObserver* handler, 99 virtual void SetHandler(const std::string& handler_name,
100 SyncNotifierObserver* handler) OVERRIDE;
101 virtual void UpdateRegisteredIds(const std::string& handler_name,
100 const ObjectIdSet& ids) OVERRIDE; 102 const ObjectIdSet& ids) OVERRIDE;
101 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; 103 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE;
102 virtual void SetStateDeprecated(const std::string& state) OVERRIDE; 104 virtual void SetStateDeprecated(const std::string& state) OVERRIDE;
103 virtual void UpdateCredentials( 105 virtual void UpdateCredentials(
104 const std::string& email, const std::string& token) OVERRIDE; 106 const std::string& email, const std::string& token) OVERRIDE;
105 virtual void SendNotification(ModelTypeSet changed_types) OVERRIDE; 107 virtual void SendNotification(ModelTypeSet changed_types) OVERRIDE;
106 108
107 // PushClientObserver implementation. 109 // PushClientObserver implementation.
108 virtual void OnNotificationsEnabled() OVERRIDE; 110 virtual void OnNotificationsEnabled() OVERRIDE;
109 virtual void OnNotificationsDisabled( 111 virtual void OnNotificationsDisabled(
(...skipping 20 matching lines...) Expand all
130 bool notifications_enabled_; 132 bool notifications_enabled_;
131 // Which set of clients should be sent notifications. 133 // Which set of clients should be sent notifications.
132 P2PNotificationTarget send_notification_target_; 134 P2PNotificationTarget send_notification_target_;
133 135
134 ModelTypeSet enabled_types_; 136 ModelTypeSet enabled_types_;
135 }; 137 };
136 138
137 } // namespace syncer 139 } // namespace syncer
138 140
139 #endif // SYNC_NOTIFIER_P2P_NOTIFIER_H_ 141 #endif // SYNC_NOTIFIER_P2P_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698