OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // A class to schedule syncer tasks intelligently. | 5 // A class to schedule syncer tasks intelligently. |
6 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_H_ | 6 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_H_ |
7 #define SYNC_ENGINE_SYNC_SCHEDULER_H_ | 7 #define SYNC_ENGINE_SYNC_SCHEDULER_H_ |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 }; | 256 }; |
257 | 257 |
258 static const char* GetModeString(Mode mode); | 258 static const char* GetModeString(Mode mode); |
259 | 259 |
260 static const char* GetDecisionString(JobProcessDecision decision); | 260 static const char* GetDecisionString(JobProcessDecision decision); |
261 | 261 |
262 // Assign |start| and |end| to appropriate SyncerStep values for the | 262 // Assign |start| and |end| to appropriate SyncerStep values for the |
263 // specified |purpose|. | 263 // specified |purpose|. |
264 static void SetSyncerStepsForPurpose( | 264 static void SetSyncerStepsForPurpose( |
265 SyncSessionJob::SyncSessionJobPurpose purpose, | 265 SyncSessionJob::SyncSessionJobPurpose purpose, |
| 266 const ConfigurationParams& config_params, |
266 SyncerStep* start, SyncerStep* end); | 267 SyncerStep* start, SyncerStep* end); |
267 | 268 |
268 // Helpers that log before posting to |sync_loop_|. These will only post | 269 // Helpers that log before posting to |sync_loop_|. These will only post |
269 // the task in between calls to Start/Stop. | 270 // the task in between calls to Start/Stop. |
270 void PostTask(const tracked_objects::Location& from_here, | 271 void PostTask(const tracked_objects::Location& from_here, |
271 const char* name, | 272 const char* name, |
272 const base::Closure& task); | 273 const base::Closure& task); |
273 void PostDelayedTask(const tracked_objects::Location& from_here, | 274 void PostDelayedTask(const tracked_objects::Location& from_here, |
274 const char* name, | 275 const char* name, |
275 const base::Closure& task, | 276 const base::Closure& task, |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 scoped_ptr<Syncer> syncer_; | 413 scoped_ptr<Syncer> syncer_; |
413 | 414 |
414 sessions::SyncSessionContext *session_context_; | 415 sessions::SyncSessionContext *session_context_; |
415 | 416 |
416 DISALLOW_COPY_AND_ASSIGN(SyncScheduler); | 417 DISALLOW_COPY_AND_ASSIGN(SyncScheduler); |
417 }; | 418 }; |
418 | 419 |
419 } // namespace syncer | 420 } // namespace syncer |
420 | 421 |
421 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_ | 422 #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_ |
OLD | NEW |