-typedef std::map<uint32, linked_ptr<StoredPacket> > PacketMap;
-typedef std::multimap<base::TimeTicks, uint32> TimeToPacketMap;
+
+// StorageIndex contains {frame_id, packet_id}.
+typedef std::pair<uint32, uint16> StorageIndex;
+typedef std::map<StorageIndex, std::pair<PacketKey, PacketRef> > PacketMap;
+
+// Frame IDs are generally stored as 8-bit values when sent over the
+// wire. This means that having a history longer than 255 frames makes
+// no sense.
+const int kMaxStoredFrames = 255;