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

Unified Diff: sync/sessions/data_type_tracker.h

Issue 322333004: sync: Inject sync/'s dependency on invalidations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing files Created 6 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
Index: sync/sessions/data_type_tracker.h
diff --git a/sync/sessions/data_type_tracker.h b/sync/sessions/data_type_tracker.h
index 59ec9932d0659d65492744672dd4bc3d866b5b01..cfe0e9489b2485cda337a188ed2dbe7aadf7f581 100644
--- a/sync/sessions/data_type_tracker.h
+++ b/sync/sessions/data_type_tracker.h
@@ -6,27 +6,26 @@
#ifndef SYNC_SESSIONS_DATA_TYPE_TRACKER_H_
#define SYNC_SESSIONS_DATA_TYPE_TRACKER_H_
-#include <deque>
+#include <list>
#include <string>
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
-#include "sync/notifier/dropped_invalidation_tracker.h"
-#include "sync/notifier/single_object_invalidation_set.h"
+#include "sync/internal_api/public/base/invalidation_interface.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
namespace syncer {
-class Invalidation;
-class SingleObjectInvalidationSet;
+class InvalidationInterface;
namespace sessions {
-typedef std::deque<std::string> PayloadList;
-
class DataTypeTracker {
public:
- explicit DataTypeTracker(const invalidation::ObjectId& object_id);
+ explicit DataTypeTracker();
~DataTypeTracker();
// For STL compatibility, we do not forbid the creation of a default copy
@@ -39,8 +38,7 @@ class DataTypeTracker {
void RecordLocalRefreshRequest();
// Tracks that we received invalidation notifications for this type.
- void RecordRemoteInvalidations(
- const SingleObjectInvalidationSet& invalidations);
+ void RecordRemoteInvalidation(scoped_ptr<InvalidationInterface> incoming);
// Records that a sync cycle has been performed successfully.
// Generally, this means that all local changes have been committed and all
@@ -105,7 +103,7 @@ class DataTypeTracker {
// The list of invalidations received since the last successful sync cycle.
// This list may be incomplete. See also:
// drop_tracker_.IsRecoveringFromDropEvent() and server_payload_overflow_.
- SingleObjectInvalidationSet pending_invalidations_;
+ std::list<scoped_ptr<InvalidationInterface> > pending_invalidations_;
size_t payload_buffer_size_;
@@ -114,10 +112,12 @@ class DataTypeTracker {
base::TimeTicks unthrottle_time_;
// A helper to keep track invalidations we dropped due to overflow.
- DroppedInvalidationTracker drop_tracker_;
+ scoped_ptr<InvalidationInterface> last_dropped_invalidation_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataTypeTracker);
};
-} // namespace syncer
} // namespace sessions
+} // namespace syncer
#endif // SYNC_SESSIONS_DATA_TYPE_TRACKER_H_

Powered by Google App Engine
This is Rietveld 408576698