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