| 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 #ifndef SYNC_ENGINE_COMMIT_H_ | 5 #ifndef SYNC_ENGINE_COMMIT_H_ |
| 6 #define SYNC_ENGINE_COMMIT_H_ | 6 #define SYNC_ENGINE_COMMIT_H_ |
| 7 | 7 |
| 8 #include "sync/internal_api/public/base/model_type.h" |
| 8 #include "sync/internal_api/public/util/syncer_error.h" | 9 #include "sync/internal_api/public/util/syncer_error.h" |
| 9 | 10 |
| 10 namespace syncer { | 11 namespace syncer { |
| 11 | 12 |
| 12 namespace sessions { | 13 namespace sessions { |
| 13 class SyncSession; | 14 class SyncSession; |
| 14 } | 15 } |
| 15 | 16 |
| 16 class Syncer; | 17 class Syncer; |
| 17 | 18 |
| 18 // This function will commit batches of unsynced items to the server until the | 19 // This function will commit batches of unsynced items to the server until the |
| 19 // number of unsynced and ready to commit items reaches zero or an error is | 20 // number of unsynced and ready to commit items reaches zero or an error is |
| 20 // encountered. A request to exit early will be treated as an error and will | 21 // encountered. A request to exit early will be treated as an error and will |
| 21 // abort any blocking operations. | 22 // abort any blocking operations. |
| 22 // | 23 // |
| 23 // The Syncer parameter is provided only for access to its ExitRequested() | 24 // The Syncer parameter is provided only for access to its ExitRequested() |
| 24 // method. This is technically unnecessary since an early exit request should | 25 // method. This is technically unnecessary since an early exit request should |
| 25 // be detected as we attempt to contact the sync server. | 26 // be detected as we attempt to contact the sync server. |
| 26 // | 27 // |
| 27 // The SyncSession parameter contains pointers to various bits of state, | 28 // The SyncSession parameter contains pointers to various bits of state, |
| 28 // including the syncable::Directory that contains all sync items and the | 29 // including the syncable::Directory that contains all sync items and the |
| 29 // ServerConnectionManager used to contact the server. | 30 // ServerConnectionManager used to contact the server. |
| 30 SyncerError BuildAndPostCommits( | 31 SyncerError BuildAndPostCommits( |
| 32 ModelTypeSet request_types, |
| 31 Syncer* syncer, | 33 Syncer* syncer, |
| 32 sessions::SyncSession* session); | 34 sessions::SyncSession* session); |
| 33 | 35 |
| 34 } // namespace syncer | 36 } // namespace syncer |
| 35 | 37 |
| 36 #endif // SYNC_ENGINE_COMMIT_H_ | 38 #endif // SYNC_ENGINE_COMMIT_H_ |
| OLD | NEW |