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
3 // found in the LICENSE file.
5 #ifndef SYNC_ENGINE_COMMIT_H_
6 #define SYNC_ENGINE_COMMIT_H_
8 #include "sync/internal_api/public/util/syncer_error.h"
18 // 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 // encountered. A request to exit early will be treated as an error and will
21 // abort any blocking operations.
23 // The Syncer parameter is provided only for access to its ExitRequested()
24 // method. This is technically unnecessary since an early exit request should
25 // be detected as we attempt to contact the sync server.
27 // The SyncSession parameter contains pointers to various bits of state,
28 // including the syncable::Directory that contains all sync items and the
29 // ServerConnectionManager used to contact the server.
30 SyncerError
BuildAndPostCommits(
32 sessions::SyncSession
* session
);
36 #endif // SYNC_ENGINE_COMMIT_H_