| Index: chrome/browser/invalidation/invalidation_logger.cc
|
| diff --git a/chrome/browser/invalidation/invalidation_logger.cc b/chrome/browser/invalidation/invalidation_logger.cc
|
| index 19bdf9d2464409600d139744fe6d3b5bc7336797..73adbc67946660f7f415b4277c21e058390723bd 100644
|
| --- a/chrome/browser/invalidation/invalidation_logger.cc
|
| +++ b/chrome/browser/invalidation/invalidation_logger.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/invalidation/invalidation_logger_observer.h"
|
| +#include "sync/notifier/invalidation_handler.h"
|
|
|
| namespace syncer {
|
| class ObjectIdInvalidationMap;
|
| @@ -43,9 +44,26 @@ void InvalidationLogger::EmitState() {
|
| OnStateChange(last_invalidator_state_));
|
| }
|
|
|
| -void InvalidationLogger::OnUpdateIds(const base::DictionaryValue& details) {
|
| - FOR_EACH_OBSERVER(
|
| - InvalidationLoggerObserver, observer_list_, OnUpdateIds(details));
|
| +void InvalidationLogger::OnUpdateIds(
|
| + std::map<std::string, syncer::ObjectIdSet> updatedIds) {
|
| + for (std::map<std::string, syncer::ObjectIdSet>::iterator it =
|
| + updatedIds.begin();
|
| + it != updatedIds.end();
|
| + ++it) {
|
| + latest_ids_[it->first] = syncer::ObjectIdSet(it->second);
|
| + }
|
| + EmitUpdatedIds();
|
| +}
|
| +
|
| +void InvalidationLogger::EmitUpdatedIds() {
|
| + for (std::map<std::string, syncer::ObjectIdSet>::iterator it =
|
| + latest_ids_.begin();
|
| + it != latest_ids_.end();
|
| + ++it) {
|
| + FOR_EACH_OBSERVER(InvalidationLoggerObserver,
|
| + observer_list_,
|
| + OnUpdateIds(it->first, it->second));
|
| + }
|
| }
|
|
|
| void InvalidationLogger::OnDebugMessage(const base::DictionaryValue& details) {
|
| @@ -63,6 +81,7 @@ void InvalidationLogger::EmitContent() {
|
| // Here we add content to send to the observers not via real time push
|
| // but on explicit request.
|
| EmitState();
|
| + EmitUpdatedIds();
|
| }
|
|
|
| // Obtain a target object to call whenever we have
|
|
|