Index: components/sync/user_events/user_event_sync_bridge.h |
diff --git a/components/sync/user_events/user_event_sync_bridge.h b/components/sync/user_events/user_event_sync_bridge.h |
index 8f2409a5a03fa0a979f1cbfbca6e141b3bbab090..bbdef87b8604accc209fd9cd1794ee5b859c80fa 100644 |
--- a/components/sync/user_events/user_event_sync_bridge.h |
+++ b/components/sync/user_events/user_event_sync_bridge.h |
@@ -5,19 +5,24 @@ |
#ifndef COMPONENTS_SYNC_USER_EVENTS_USER_EVENT_SYNC_BRIDGE_H_ |
#define COMPONENTS_SYNC_USER_EVENTS_USER_EVENT_SYNC_BRIDGE_H_ |
+#include <stdint.h> |
+ |
+#include <map> |
#include <memory> |
#include <string> |
#include "base/macros.h" |
#include "components/sync/model/model_type_store.h" |
#include "components/sync/model/model_type_sync_bridge.h" |
+#include "components/sync/user_events/global_id_mapper.h" |
namespace syncer { |
class UserEventSyncBridge : public ModelTypeSyncBridge { |
public: |
UserEventSyncBridge(const ModelTypeStoreFactory& store_factory, |
- const ChangeProcessorFactory& change_processor_factory); |
+ const ChangeProcessorFactory& change_processor_factory, |
+ GlobalIdMapper* global_id_mapper); |
~UserEventSyncBridge() override; |
// ModelTypeSyncBridge implementation. |
@@ -53,10 +58,18 @@ class UserEventSyncBridge : public ModelTypeSyncBridge { |
ModelTypeStore::Result result, |
std::unique_ptr<ModelTypeStore::RecordList> data_records); |
+ void HandleGlobalIdChange(int64_t old_global_id, int64_t new_global_id); |
+ |
// Persistent storage for in flight events. Should remain quite small, as we |
// delete upon commit confirmation. |
std::unique_ptr<ModelTypeStore> store_; |
+ // The key is the global_id of the navigation the event is linked to. |
+ std::multimap<int64_t, sync_pb::UserEventSpecifics> |
+ in_flight_nav_linked_events_; |
+ |
+ GlobalIdMapper* global_id_mapper_; |
+ |
DISALLOW_COPY_AND_ASSIGN(UserEventSyncBridge); |
}; |