| 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/sessions/data_type_tracker.h" | 5 #include "sync/sessions/data_type_tracker.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 base::TimeDelta DataTypeTracker::RecordLocalChange() { | 28 base::TimeDelta DataTypeTracker::RecordLocalChange() { |
| 29 local_nudge_count_++; | 29 local_nudge_count_++; |
| 30 return nudge_delay_; | 30 return nudge_delay_; |
| 31 } | 31 } |
| 32 | 32 |
| 33 void DataTypeTracker::RecordLocalRefreshRequest() { | 33 void DataTypeTracker::RecordLocalRefreshRequest() { |
| 34 local_refresh_request_count_++; | 34 local_refresh_request_count_++; |
| 35 } | 35 } |
| 36 | 36 |
| 37 void DataTypeTracker::RecordRemoteInvalidation( | 37 void DataTypeTracker::RecordRemoteInvalidation( |
| 38 scoped_ptr<InvalidationInterface> incoming) { | 38 std::unique_ptr<InvalidationInterface> incoming) { |
| 39 DCHECK(incoming); | 39 DCHECK(incoming); |
| 40 | 40 |
| 41 // Merge the incoming invalidation into our list of pending invalidations. | 41 // Merge the incoming invalidation into our list of pending invalidations. |
| 42 // | 42 // |
| 43 // We won't use STL algorithms here because our concept of equality doesn't | 43 // We won't use STL algorithms here because our concept of equality doesn't |
| 44 // quite fit the expectations of set_intersection. In particular, two | 44 // quite fit the expectations of set_intersection. In particular, two |
| 45 // invalidations can be equal according to the SingleObjectInvalidationSet's | 45 // invalidations can be equal according to the SingleObjectInvalidationSet's |
| 46 // rules (ie. have equal versions), but still have different AckHandle values | 46 // rules (ie. have equal versions), but still have different AckHandle values |
| 47 // and need to be acknowledged separately. | 47 // and need to be acknowledged separately. |
| 48 // | 48 // |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 unthrottle_time_ = base::TimeTicks(); | 234 unthrottle_time_ = base::TimeTicks(); |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 void DataTypeTracker::UpdateLocalNudgeDelay(base::TimeDelta delay) { | 238 void DataTypeTracker::UpdateLocalNudgeDelay(base::TimeDelta delay) { |
| 239 nudge_delay_ = delay; | 239 nudge_delay_ = delay; |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace sessions | 242 } // namespace sessions |
| 243 } // namespace syncer | 243 } // namespace syncer |
| OLD | NEW |