summaryrefslogtreecommitdiffstats
path: root/sync/engine/commit.h
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-03 03:44:20 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-03 03:44:20 +0000
commitde84cfd7c982067cb1e691d2e983ec95e08b9e1b (patch)
tree645dd94ad7ac7fa4dd3ef45b967b0ad23cf1eb89 /sync/engine/commit.h
parente4784baf717103943f13649a2fd385404d409441 (diff)
downloadchromium_src-de84cfd7c982067cb1e691d2e983ec95e08b9e1b.zip
chromium_src-de84cfd7c982067cb1e691d2e983ec95e08b9e1b.tar.gz
chromium_src-de84cfd7c982067cb1e691d2e983ec95e08b9e1b.tar.bz2
sync: Expose sync functionality as functions
This change is a refactor to clean up ugliness introduced in previous commits and prepare for future features. The most notable change is the removal of "state machine" logic from syncer.cc. This allows us to remove the SyncerSteps enum and related code. The SyncShare function + enum parameters have been replaced with the functions NormalSyncShare(), ConfigureSyncShare() and PollSyncShare(). These changes should make it possible to address crbug.com/109422, and to re-enable commits during poll-triggered sync cycles (if desrired, see r206475). The logic for fetching and applying updates has been modified, too. Since the behaviour of GetUpdates varies depending on the type of cycle (Configure, GetUpdates, or Poll) the logic to build and execute these GetUpdate requests has been split up. This enables us to remove the NudgeTracker from the SyncSession (an ugly hack introduced in r199136). It should make it easier to implement crbug.com/147685. In the interest of keeping this change as small and simple as possible some obvious refactorings have not been intentionally excluded from this CL. For example, the logic around when to send SYNC_CYCLE_ENDED events or when to return true or false frome the SyncShare functions remains very complicated. Untangling that mess would require some non-trivial changes to the SyncScheduler, so they've been deferred until later. BUG=147685,109422 Review URL: https://chromiumcodereview.appspot.com/17052007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/engine/commit.h')
-rw-r--r--sync/engine/commit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sync/engine/commit.h b/sync/engine/commit.h
index d460fec..168d950 100644
--- a/sync/engine/commit.h
+++ b/sync/engine/commit.h
@@ -5,6 +5,7 @@
#ifndef SYNC_ENGINE_COMMIT_H_
#define SYNC_ENGINE_COMMIT_H_
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/syncer_error.h"
namespace syncer {
@@ -28,6 +29,7 @@ class Syncer;
// including the syncable::Directory that contains all sync items and the
// ServerConnectionManager used to contact the server.
SyncerError BuildAndPostCommits(
+ ModelTypeSet request_types,
Syncer* syncer,
sessions::SyncSession* session);