Index: chrome/browser/sync/glue/chrome_sync_notification_bridge.h |
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h b/chrome/browser/sync/glue/chrome_sync_notification_bridge.h |
index cc133bdf1cd5df5486aa689110be617686b720a8..140144f6346b0a759715457400b231d482a89a4e 100644 |
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge.h |
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge.h |
@@ -8,9 +8,12 @@ |
#include "base/compiler_specific.h" |
#include "base/memory/ref_counted.h" |
#include "base/observer_list_threadsafe.h" |
+#include "base/synchronization/lock.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "sync/internal_api/public/base/model_type.h" |
+#include "sync/notifier/invalidation_util.h" |
+#include "sync/notifier/sync_notifier_helper.h" |
class Profile; |
@@ -35,8 +38,8 @@ class ChromeSyncNotificationBridge : public content::NotificationObserver { |
void UpdateEnabledTypes(const syncer::ModelTypeSet enabled_types); |
// These can be called on any thread. |
- virtual void AddObserver(syncer::SyncNotifierObserver* observer); |
- virtual void RemoveObserver(syncer::SyncNotifierObserver* observer); |
+ virtual void UpdateRegisteredIds(syncer::SyncNotifierObserver* handler, |
+ const syncer::ObjectIdSet& ids); |
// NotificationObserver implementation. Called on UI thread. |
virtual void Observe(int type, |
@@ -46,11 +49,8 @@ class ChromeSyncNotificationBridge : public content::NotificationObserver { |
private: |
content::NotificationRegistrar registrar_; |
syncer::ModelTypeSet enabled_types_; |
- |
- // Because [Add/Remove]Observer can be called from any thread, we need a |
- // thread-safe observerlist. |
- scoped_refptr<ObserverListThreadSafe<syncer::SyncNotifierObserver> > |
- observers_; |
+ syncer::SyncNotifierHelper helper_; |
+ base::Lock helper_lock_; |
}; |
} // namespace browser_sync |