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

Unified Diff: sync/sessions/data_type_tracker.h

Issue 387983004: sync: Support non-blocking initial sync in proto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix comment Created 6 years, 5 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
Index: sync/sessions/data_type_tracker.h
diff --git a/sync/sessions/data_type_tracker.h b/sync/sessions/data_type_tracker.h
index 8d78cde2bd020877e5b3f25693a9b26262f4546d..7b0aba82bca096685c66f4e24b67f5f729e0dad5 100644
--- a/sync/sessions/data_type_tracker.h
+++ b/sync/sessions/data_type_tracker.h
@@ -39,6 +39,9 @@ class DataTypeTracker {
// Tracks that we received invalidation notifications for this type.
void RecordRemoteInvalidation(scoped_ptr<InvalidationInterface> incoming);
+ // Takes note that initial sync is pending for this type.
+ void RecordInitialSyncRequired();
+
// Records that a sync cycle has been performed successfully.
// Generally, this means that all local changes have been committed and all
// remote changes have been downloaded, so we can clear any flags related to
@@ -67,6 +70,9 @@ class DataTypeTracker {
// Returns true if an explicit refresh request is still outstanding.
bool HasRefreshRequestPending() const;
+ // Returns true if this type is requesting an initial sync.
+ bool IsInitialSyncRequired() const;
+
// Fills in the legacy invalidaiton payload information fields.
void SetLegacyNotificationHint(
sync_pb::DataTypeProgressMarker* progress) const;
@@ -108,6 +114,10 @@ class DataTypeTracker {
size_t payload_buffer_size_;
+ // Set to true if this type is ready for, but has not yet completed initial
+ // sync.
+ bool initial_sync_required_;
+
// If !unthrottle_time_.is_null(), this type is throttled and may not download
// or commit data until the specified time.
base::TimeTicks unthrottle_time_;

Powered by Google App Engine
This is Rietveld 408576698