| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/invalidation/impl/mock_ack_handler.h" | 5 #include "components/invalidation/impl/mock_ack_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "components/invalidation/public/ack_handle.h" | 10 #include "components/invalidation/public/ack_handle.h" |
| 11 #include "components/invalidation/public/invalidation.h" | 11 #include "components/invalidation/public/invalidation.h" |
| 12 | 12 |
| 13 namespace syncer { | 13 namespace syncer { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 struct AckHandleMatcher { | 17 struct AckHandleMatcher { |
| 18 AckHandleMatcher(const AckHandle& handle); | 18 AckHandleMatcher(const AckHandle& handle); |
| 19 bool operator()(const syncer::Invalidation& invalidation) const; | 19 bool operator()(const syncer::Invalidation& invalidation) const; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 matcher); | 113 matcher); |
| 114 if (it != unacked_invalidations_.end()) { | 114 if (it != unacked_invalidations_.end()) { |
| 115 dropped_invalidations_.push_back(*it); | 115 dropped_invalidations_.push_back(*it); |
| 116 unacked_invalidations_.erase(it); | 116 unacked_invalidations_.erase(it); |
| 117 } | 117 } |
| 118 unrecovered_drop_events_.erase(id); | 118 unrecovered_drop_events_.erase(id); |
| 119 unrecovered_drop_events_.insert(std::make_pair(id, handle)); | 119 unrecovered_drop_events_.insert(std::make_pair(id, handle)); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace syncer | 122 } // namespace syncer |
| OLD | NEW |