Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: sync/engine/syncer.h

Issue 15764010: Experimental functionize patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync: Expose sync functionality as functions Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/sync_scheduler_unittest.cc ('k') | sync/engine/syncer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer.h
diff --git a/sync/engine/syncer.h b/sync/engine/syncer.h
index 8656e7c2cabf6af93f79601c2725008195558a98..82bbca07acee86967ca734dfad9d5840e3824cd2 100644
--- a/sync/engine/syncer.h
+++ b/sync/engine/syncer.h
@@ -20,21 +20,6 @@
namespace syncer {
-namespace syncable {
-class Entry;
-class MutableEntry;
-} // namespace syncable
-
-enum SyncerStep {
- SYNCER_BEGIN,
- DOWNLOAD_UPDATES,
- PROCESS_UPDATES,
- STORE_TIMESTAMPS,
- APPLY_UPDATES,
- COMMIT,
- SYNCER_END
-};
-
// A Syncer provides a control interface for driving the individual steps
// of the sync cycle. Each cycle (hopefully) moves the client into closer
// synchronization with the server. The individual steps are modeled
@@ -57,14 +42,17 @@ class SYNC_EXPORT_PRIVATE Syncer {
bool ExitRequested();
void RequestEarlyExit();
- // Runs a sync cycle from |first_step| to |last_step|.
- // Returns true if the cycle completed with |last_step|, and false
- // if it terminated early due to error / exit requested.
- virtual bool SyncShare(sessions::SyncSession* session,
- SyncerStep first_step,
- SyncerStep last_step);
+ virtual bool NormalSyncShare(sessions::SyncSession* session,
+ ModelTypeSet request_types,
+ const sessions::NudgeTracker& nudge_tracker);
+ virtual bool ConfigureSyncShare(sessions::SyncSession* session,
+ ModelTypeSet request_types);
+ virtual bool PollSyncShare(sessions::SyncSession* session,
+ ModelTypeSet request_types);
private:
+ void ApplyUpdates(sessions::SyncSession* session);
+
bool early_exit_requested_;
base::Lock early_exit_requested_lock_;
@@ -93,10 +81,6 @@ class SYNC_EXPORT_PRIVATE Syncer {
DISALLOW_COPY_AND_ASSIGN(Syncer);
};
-// Utility function declarations.
-void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest);
-const char* SyncerStepToString(const SyncerStep);
-
} // namespace syncer
#endif // SYNC_ENGINE_SYNCER_H_
« no previous file with comments | « sync/engine/sync_scheduler_unittest.cc ('k') | sync/engine/syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698