#ifndef SYNC_INTERNAL_API_PROTOCOL_EVENT_BUFFER_H_
#define SYNC_INTERNAL_API_PROTOCOL_EVENT_BUFFER_H_
#include <deque>
#include "base/memory/scoped_vector.h"
#include "sync/base/sync_export.h"
namespace syncer {
class ProtocolEvent;
class SYNC_EXPORT_PRIVATE ProtocolEventBuffer {
public:
static const size_t kBufferSize;
ProtocolEventBuffer();
~ProtocolEventBuffer();
void RecordProtocolEvent(const ProtocolEvent& event);
ScopedVector<ProtocolEvent> GetBufferedProtocolEvents() const;
private:
std::deque<ProtocolEvent*> buffer_;
STLElementDeleter<std::deque<ProtocolEvent*> > buffer_deleter_;
DISALLOW_COPY_AND_ASSIGN(ProtocolEventBuffer);
};
}
#endif