| Index: chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
|
| diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc b/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
|
| index 9936fa08f020e93b0eff6fe86a1dcbecc3f81db8..8c6d2a045febe4e46a9f66b20c141454eb484abc 100644
|
| --- a/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
|
| +++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
|
| @@ -14,9 +14,7 @@ using content::BrowserThread;
|
| namespace browser_sync {
|
|
|
| ChromeSyncNotificationBridge::ChromeSyncNotificationBridge(
|
| - const Profile* profile)
|
| - : observers_(
|
| - new ObserverListThreadSafe<syncer::SyncNotifierObserver>()) {
|
| + const Profile* profile) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| DCHECK(profile);
|
| registrar_.Add(this, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
|
| @@ -33,14 +31,11 @@ void ChromeSyncNotificationBridge::UpdateEnabledTypes(
|
| enabled_types_ = types;
|
| }
|
|
|
| -void ChromeSyncNotificationBridge::AddObserver(
|
| - syncer::SyncNotifierObserver* observer) {
|
| - observers_->AddObserver(observer);
|
| -}
|
| -
|
| -void ChromeSyncNotificationBridge::RemoveObserver(
|
| - syncer::SyncNotifierObserver* observer) {
|
| - observers_->RemoveObserver(observer);
|
| +void ChromeSyncNotificationBridge::UpdateRegisteredIds(
|
| + syncer::SyncNotifierObserver* handler,
|
| + const syncer::ObjectIdSet& ids) {
|
| + base::AutoLock locker(helper_lock_);
|
| + helper_.UpdateRegisteredIds(handler, ids);
|
| }
|
|
|
| void ChromeSyncNotificationBridge::Observe(
|
| @@ -69,9 +64,10 @@ void ChromeSyncNotificationBridge::Observe(
|
| syncer::ModelTypePayloadMapFromEnumSet(enabled_types_, std::string());
|
| }
|
|
|
| - observers_->Notify(
|
| - &syncer::SyncNotifierObserver::OnIncomingNotification,
|
| - payload_map, notification_source);
|
| + base::AutoLock locker(helper_lock_);
|
| + helper_.DispatchInvalidationsToHandlers(
|
| + ModelTypePayloadMapToObjectIdPayloadMap(payload_map),
|
| + notification_source);
|
| }
|
|
|
| } // namespace browser_sync
|
|
|