| 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 COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "components/sync/base/invalidation_interface.h" | 14 #include "components/sync/base/invalidation_interface.h" |
| 15 #include "components/sync/engine_impl/cycle/sync_cycle.h" | 15 #include "components/sync/engine_impl/cycle/sync_cycle.h" |
| 16 #include "components/sync/engine_impl/nudge_source.h" | 16 #include "components/sync/engine_impl/nudge_source.h" |
| 17 | 17 |
| 18 namespace tracked_objects { | 18 namespace tracked_objects { |
| 19 class Location; | 19 class Location; |
| 20 } // namespace tracked_objects | 20 } // namespace tracked_objects |
| 21 | 21 |
| 22 namespace syncer { | 22 namespace syncer { |
| 23 | 23 |
| 24 struct ConfigurationParams { | 24 struct ConfigurationParams { |
| 25 ConfigurationParams(); | 25 ConfigurationParams(); |
| 26 ConfigurationParams( | 26 ConfigurationParams( |
| 27 const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source, | 27 const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source, |
| 28 ModelTypeSet types_to_download, | 28 ModelTypeSet types_to_download, |
| 29 const ModelSafeRoutingInfo& routing_info, |
| 29 const base::Closure& ready_task, | 30 const base::Closure& ready_task, |
| 30 const base::Closure& retry_task); | 31 const base::Closure& retry_task); |
| 31 ConfigurationParams(const ConfigurationParams& other); | 32 ConfigurationParams(const ConfigurationParams& other); |
| 32 ~ConfigurationParams(); | 33 ~ConfigurationParams(); |
| 33 | 34 |
| 34 // Source for the configuration. | 35 // Source for the configuration. |
| 35 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source; | 36 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source; |
| 36 // The types that should be downloaded. | 37 // The types that should be downloaded. |
| 37 ModelTypeSet types_to_download; | 38 ModelTypeSet types_to_download; |
| 39 // The new routing info (superset of types to be downloaded). |
| 40 ModelSafeRoutingInfo routing_info; |
| 38 // Callback to invoke on configuration completion. | 41 // Callback to invoke on configuration completion. |
| 39 base::Closure ready_task; | 42 base::Closure ready_task; |
| 40 // Callback to invoke on configuration failure. | 43 // Callback to invoke on configuration failure. |
| 41 base::Closure retry_task; | 44 base::Closure retry_task; |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 struct ClearParams { | 47 struct ClearParams { |
| 45 explicit ClearParams(const base::Closure& report_success_task); | 48 explicit ClearParams(const base::Closure& report_success_task); |
| 46 ClearParams(const ClearParams& other); | 49 ClearParams(const ClearParams& other); |
| 47 ~ClearParams(); | 50 ~ClearParams(); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Called when credentials are updated by the user. | 147 // Called when credentials are updated by the user. |
| 145 virtual void OnCredentialsUpdated() = 0; | 148 virtual void OnCredentialsUpdated() = 0; |
| 146 | 149 |
| 147 // Called when the network layer detects a connection status change. | 150 // Called when the network layer detects a connection status change. |
| 148 virtual void OnConnectionStatusChange() = 0; | 151 virtual void OnConnectionStatusChange() = 0; |
| 149 }; | 152 }; |
| 150 | 153 |
| 151 } // namespace syncer | 154 } // namespace syncer |
| 152 | 155 |
| 153 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ | 156 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_H_ |
| OLD | NEW |