OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/nudge_tracker.h" | 5 #include "sync/sessions/nudge_tracker.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 155 } |
156 return local_refresh_nudge_delay_; | 156 return local_refresh_nudge_delay_; |
157 } | 157 } |
158 | 158 |
159 base::TimeDelta NudgeTracker::RecordRemoteInvalidation( | 159 base::TimeDelta NudgeTracker::RecordRemoteInvalidation( |
160 syncer::ModelType type, | 160 syncer::ModelType type, |
161 scoped_ptr<InvalidationInterface> invalidation) { | 161 scoped_ptr<InvalidationInterface> invalidation) { |
162 // Forward the invalidations to the proper recipient. | 162 // Forward the invalidations to the proper recipient. |
163 TypeTrackerMap::const_iterator tracker_it = type_trackers_.find(type); | 163 TypeTrackerMap::const_iterator tracker_it = type_trackers_.find(type); |
164 DCHECK(tracker_it != type_trackers_.end()); | 164 DCHECK(tracker_it != type_trackers_.end()); |
165 tracker_it->second->RecordRemoteInvalidation(invalidation.Pass()); | 165 tracker_it->second->RecordRemoteInvalidation(std::move(invalidation)); |
166 return remote_invalidation_nudge_delay_; | 166 return remote_invalidation_nudge_delay_; |
167 } | 167 } |
168 | 168 |
169 void NudgeTracker::RecordInitialSyncRequired(syncer::ModelType type) { | 169 void NudgeTracker::RecordInitialSyncRequired(syncer::ModelType type) { |
170 TypeTrackerMap::const_iterator tracker_it = type_trackers_.find(type); | 170 TypeTrackerMap::const_iterator tracker_it = type_trackers_.find(type); |
171 DCHECK(tracker_it != type_trackers_.end()); | 171 DCHECK(tracker_it != type_trackers_.end()); |
172 tracker_it->second->RecordInitialSyncRequired(); | 172 tracker_it->second->RecordInitialSyncRequired(); |
173 } | 173 } |
174 | 174 |
175 void NudgeTracker::RecordCommitConflict(syncer::ModelType type) { | 175 void NudgeTracker::RecordCommitConflict(syncer::ModelType type) { |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 } | 404 } |
405 } | 405 } |
406 } | 406 } |
407 | 407 |
408 void NudgeTracker::SetDefaultNudgeDelay(base::TimeDelta nudge_delay) { | 408 void NudgeTracker::SetDefaultNudgeDelay(base::TimeDelta nudge_delay) { |
409 minimum_local_nudge_delay_ = nudge_delay; | 409 minimum_local_nudge_delay_ = nudge_delay; |
410 } | 410 } |
411 | 411 |
412 } // namespace sessions | 412 } // namespace sessions |
413 } // namespace syncer | 413 } // namespace syncer |
OLD | NEW |