| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ | 5 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ |
| 6 #define SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ | 6 #define SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/cancelable_callback.h" | 12 #include "base/cancelable_callback.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
| 19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
| 21 #include "sync/base/sync_export.h" | 21 #include "sync/base/sync_export.h" |
| 22 #include "sync/engine/net/server_connection_manager.h" | 22 #include "sync/engine/net/server_connection_manager.h" |
| 23 #include "sync/engine/nudge_source.h" | 23 #include "sync/engine/nudge_source.h" |
| 24 #include "sync/engine/sync_scheduler.h" | 24 #include "sync/engine/sync_scheduler.h" |
| 25 #include "sync/engine/syncer.h" | 25 #include "sync/engine/syncer.h" |
| 26 #include "sync/internal_api/public/base/model_type_invalidation_map.h" | |
| 27 #include "sync/internal_api/public/engine/polling_constants.h" | 26 #include "sync/internal_api/public/engine/polling_constants.h" |
| 28 #include "sync/internal_api/public/util/weak_handle.h" | 27 #include "sync/internal_api/public/util/weak_handle.h" |
| 29 #include "sync/sessions/nudge_tracker.h" | 28 #include "sync/sessions/nudge_tracker.h" |
| 30 #include "sync/sessions/sync_session.h" | 29 #include "sync/sessions/sync_session.h" |
| 31 #include "sync/sessions/sync_session_context.h" | 30 #include "sync/sessions/sync_session_context.h" |
| 32 | 31 |
| 33 namespace syncer { | 32 namespace syncer { |
| 34 | 33 |
| 35 class BackoffDelayProvider; | 34 class BackoffDelayProvider; |
| 36 | 35 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 59 virtual void ScheduleLocalNudge( | 58 virtual void ScheduleLocalNudge( |
| 60 const base::TimeDelta& desired_delay, | 59 const base::TimeDelta& desired_delay, |
| 61 ModelTypeSet types, | 60 ModelTypeSet types, |
| 62 const tracked_objects::Location& nudge_location) OVERRIDE; | 61 const tracked_objects::Location& nudge_location) OVERRIDE; |
| 63 virtual void ScheduleLocalRefreshRequest( | 62 virtual void ScheduleLocalRefreshRequest( |
| 64 const base::TimeDelta& desired_delay, | 63 const base::TimeDelta& desired_delay, |
| 65 ModelTypeSet types, | 64 ModelTypeSet types, |
| 66 const tracked_objects::Location& nudge_location) OVERRIDE; | 65 const tracked_objects::Location& nudge_location) OVERRIDE; |
| 67 virtual void ScheduleInvalidationNudge( | 66 virtual void ScheduleInvalidationNudge( |
| 68 const base::TimeDelta& desired_delay, | 67 const base::TimeDelta& desired_delay, |
| 69 const ModelTypeInvalidationMap& invalidation_map, | 68 const ObjectIdInvalidationMap& invalidation_map, |
| 70 const tracked_objects::Location& nudge_location) OVERRIDE; | 69 const tracked_objects::Location& nudge_location) OVERRIDE; |
| 71 virtual void SetNotificationsEnabled(bool notifications_enabled) OVERRIDE; | 70 virtual void SetNotificationsEnabled(bool notifications_enabled) OVERRIDE; |
| 72 | 71 |
| 73 virtual base::TimeDelta GetSessionsCommitDelay() const OVERRIDE; | 72 virtual base::TimeDelta GetSessionsCommitDelay() const OVERRIDE; |
| 74 | 73 |
| 75 virtual void OnCredentialsUpdated() OVERRIDE; | 74 virtual void OnCredentialsUpdated() OVERRIDE; |
| 76 virtual void OnConnectionStatusChange() OVERRIDE; | 75 virtual void OnConnectionStatusChange() OVERRIDE; |
| 77 | 76 |
| 78 // SyncSession::Delegate implementation. | 77 // SyncSession::Delegate implementation. |
| 79 virtual void OnThrottled(const base::TimeDelta& throttle_duration) OVERRIDE; | 78 virtual void OnThrottled(const base::TimeDelta& throttle_duration) OVERRIDE; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // The change is to remember that poll timer just fired and retry poll job | 318 // The change is to remember that poll timer just fired and retry poll job |
| 320 // after credentials are updated. | 319 // after credentials are updated. |
| 321 bool do_poll_after_credentials_updated_; | 320 bool do_poll_after_credentials_updated_; |
| 322 | 321 |
| 323 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); | 322 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); |
| 324 }; | 323 }; |
| 325 | 324 |
| 326 } // namespace syncer | 325 } // namespace syncer |
| 327 | 326 |
| 328 #endif // SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ | 327 #endif // SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ |
| OLD | NEW |