Index: sync/engine/model_type_sync_proxy_impl.h |
diff --git a/sync/engine/model_type_sync_proxy_impl.h b/sync/engine/model_type_sync_proxy_impl.h |
index 2390eda072e0b8840604c118101b5af0d03b56dc..4cf05bd56c885df168be6dea6c9a8a3188c3e9aa 100644 |
--- a/sync/engine/model_type_sync_proxy_impl.h |
+++ b/sync/engine/model_type_sync_proxy_impl.h |
@@ -73,7 +73,16 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe { |
// Informs this object that there are some incoming updates is should |
// handle. |
void OnUpdateReceived(const DataTypeState& type_state, |
- const UpdateResponseDataList& response_list); |
+ const UpdateResponseDataList& response_list, |
+ const UpdateResponseDataList& inapplicable_updates); |
+ |
+ // Returns the list of inapplicable updates. |
+ // |
+ // This is used as a helper function, but it's public mainly for testing. |
+ // The current test harness setup doesn't allow us to test the data that the |
+ // proxy sends to the worker during initialization, so we use this to inspect |
+ // its state instead. |
+ UpdateResponseDataList GetInapplicableUpdates(); |
// Returns the long-lived WeakPtr that is intended to be registered with the |
// ProfileSyncService. |
@@ -81,6 +90,7 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe { |
private: |
typedef std::map<std::string, ModelTypeEntity*> EntityMap; |
+ typedef std::map<std::string, UpdateResponseData*> UpdateMap; |
// Sends all commit requests that are due to be sent to the sync thread. |
void FlushPendingCommitRequests(); |
@@ -123,6 +133,12 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe { |
EntityMap entities_; |
STLValueDeleter<EntityMap> entities_deleter_; |
+ // A set of updates that can not be applied at this time. These are never |
+ // used by the model. They are kept here only so we can save and restore |
+ // them across restarts, and keep them in sync with our progress markers. |
+ UpdateMap inapplicable_updates_; |
+ STLValueDeleter<UpdateMap> inapplicable_updates_deleter_; |
stanisc
2014/07/30 00:30:04
Since we seem to be using this map/deleted pair a
rlarocque
2014/07/30 21:56:01
Done: crbug.com/398944
|
+ |
// We use two different WeakPtrFactories because we want the pointers they |
// issue to have different lifetimes. When asked to disconnect from the sync |
// thread, we want to make sure that no tasks generated as part of the |