| 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 "components/sync/engine_impl/cycle/data_type_tracker.h" | 5 #include "components/sync/engine_impl/cycle/data_type_tracker.h" |
| 6 | 6 |
| 7 #include <stddef.h> | |
| 8 | |
| 9 #include <algorithm> | 7 #include <algorithm> |
| 10 | 8 |
| 11 #include "base/logging.h" | 9 #include "base/logging.h" |
| 12 #include "components/sync/base/invalidation_interface.h" | |
| 13 #include "components/sync/engine_impl/cycle/nudge_tracker.h" | 10 #include "components/sync/engine_impl/cycle/nudge_tracker.h" |
| 14 | 11 |
| 15 namespace syncer { | 12 namespace syncer { |
| 16 | 13 |
| 17 DataTypeTracker::DataTypeTracker() | 14 DataTypeTracker::DataTypeTracker() |
| 18 : local_nudge_count_(0), | 15 : local_nudge_count_(0), |
| 19 local_refresh_request_count_(0), | 16 local_refresh_request_count_(0), |
| 20 payload_buffer_size_(NudgeTracker::kDefaultMaxPayloadsPerType), | 17 payload_buffer_size_(NudgeTracker::kDefaultMaxPayloadsPerType), |
| 21 initial_sync_required_(false), | 18 initial_sync_required_(false), |
| 22 sync_required_to_resolve_conflict_(false) {} | 19 sync_required_to_resolve_conflict_(false) {} |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 if (now >= unthrottle_time_) { | 225 if (now >= unthrottle_time_) { |
| 229 unthrottle_time_ = base::TimeTicks(); | 226 unthrottle_time_ = base::TimeTicks(); |
| 230 } | 227 } |
| 231 } | 228 } |
| 232 | 229 |
| 233 void DataTypeTracker::UpdateLocalNudgeDelay(base::TimeDelta delay) { | 230 void DataTypeTracker::UpdateLocalNudgeDelay(base::TimeDelta delay) { |
| 234 nudge_delay_ = delay; | 231 nudge_delay_ = delay; |
| 235 } | 232 } |
| 236 | 233 |
| 237 } // namespace syncer | 234 } // namespace syncer |
| OLD | NEW |