OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "sync/notifier/unacked_invalidation_set.h" | 5 #include "sync/notifier/unacked_invalidation_set.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "sync/internal_api/public/base/ack_handle.h" | 8 #include "sync/internal_api/public/base/ack_handle.h" |
9 #include "sync/notifier/object_id_invalidation_map.h" | 9 #include "sync/notifier/object_id_invalidation_map.h" |
| 10 #include "sync/notifier/sync_invalidation_listener.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 const char kSourceKey[] = "source"; | 14 const char kSourceKey[] = "source"; |
14 const char kNameKey[] = "name"; | 15 const char kNameKey[] = "name"; |
15 const char kInvalidationListKey[] = "invalidation-list"; | 16 const char kInvalidationListKey[] = "invalidation-list"; |
16 | 17 |
17 } // namespace | 18 } // namespace |
18 | 19 |
19 namespace syncer { | 20 namespace syncer { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // an UnknownVersion invalidation. We remove the oldest remaining | 195 // an UnknownVersion invalidation. We remove the oldest remaining |
195 // invalidation to make room for it. | 196 // invalidation to make room for it. |
196 invalidation::ObjectId id = invalidations_.begin()->object_id(); | 197 invalidation::ObjectId id = invalidations_.begin()->object_id(); |
197 invalidations_.erase(*invalidations_.begin()); | 198 invalidations_.erase(*invalidations_.begin()); |
198 | 199 |
199 Invalidation unknown_version = Invalidation::InitUnknownVersion(id); | 200 Invalidation unknown_version = Invalidation::InitUnknownVersion(id); |
200 invalidations_.insert(unknown_version); | 201 invalidations_.insert(unknown_version); |
201 } | 202 } |
202 | 203 |
203 } // namespace syncer | 204 } // namespace syncer |
OLD | NEW |