| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "sync/internal_api/public/engine/polling_constants.h" | 8 #include "sync/internal_api/public/engine/polling_constants.h" |
| 9 #include "sync/protocol/sync.pb.h" | 9 #include "sync/protocol/sync.pb.h" |
| 10 | 10 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 tracker_it->second->RecordRemoteInvalidation(invalidation.Pass()); | 161 tracker_it->second->RecordRemoteInvalidation(invalidation.Pass()); |
| 162 return remote_invalidation_nudge_delay_; | 162 return remote_invalidation_nudge_delay_; |
| 163 } | 163 } |
| 164 | 164 |
| 165 void NudgeTracker::RecordInitialSyncRequired(syncer::ModelType type) { | 165 void NudgeTracker::RecordInitialSyncRequired(syncer::ModelType type) { |
| 166 TypeTrackerMap::iterator tracker_it = type_trackers_.find(type); | 166 TypeTrackerMap::iterator tracker_it = type_trackers_.find(type); |
| 167 DCHECK(tracker_it != type_trackers_.end()); | 167 DCHECK(tracker_it != type_trackers_.end()); |
| 168 tracker_it->second->RecordInitialSyncRequired(); | 168 tracker_it->second->RecordInitialSyncRequired(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void NudgeTracker::RecordCommitConflict(syncer::ModelType type) { | |
| 172 TypeTrackerMap::iterator tracker_it = type_trackers_.find(type); | |
| 173 DCHECK(tracker_it != type_trackers_.end()); | |
| 174 tracker_it->second->RecordCommitConflict(); | |
| 175 } | |
| 176 | |
| 177 void NudgeTracker::OnInvalidationsEnabled() { | 171 void NudgeTracker::OnInvalidationsEnabled() { |
| 178 invalidations_enabled_ = true; | 172 invalidations_enabled_ = true; |
| 179 } | 173 } |
| 180 | 174 |
| 181 void NudgeTracker::OnInvalidationsDisabled() { | 175 void NudgeTracker::OnInvalidationsDisabled() { |
| 182 invalidations_enabled_ = false; | 176 invalidations_enabled_ = false; |
| 183 invalidations_out_of_sync_ = true; | 177 invalidations_out_of_sync_ = true; |
| 184 } | 178 } |
| 185 | 179 |
| 186 void NudgeTracker::SetTypesThrottledUntil( | 180 void NudgeTracker::SetTypesThrottledUntil( |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 394 } |
| 401 } | 395 } |
| 402 } | 396 } |
| 403 | 397 |
| 404 void NudgeTracker::SetDefaultNudgeDelay(base::TimeDelta nudge_delay) { | 398 void NudgeTracker::SetDefaultNudgeDelay(base::TimeDelta nudge_delay) { |
| 405 minimum_local_nudge_delay_ = nudge_delay; | 399 minimum_local_nudge_delay_ = nudge_delay; |
| 406 } | 400 } |
| 407 | 401 |
| 408 } // namespace sessions | 402 } // namespace sessions |
| 409 } // namespace syncer | 403 } // namespace syncer |
| OLD | NEW |