| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sync/internal_api/protocol_event_buffer.h" | 5 #include "sync/internal_api/protocol_event_buffer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "sync/internal_api/public/events/protocol_event.h" | 9 #include "sync/internal_api/public/events/protocol_event.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 buffer_.pop_front(); | 24 buffer_.pop_front(); |
| 25 delete to_delete; | 25 delete to_delete; |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 ScopedVector<ProtocolEvent> | 29 ScopedVector<ProtocolEvent> |
| 30 ProtocolEventBuffer::GetBufferedProtocolEvents() const { | 30 ProtocolEventBuffer::GetBufferedProtocolEvents() const { |
| 31 ScopedVector<ProtocolEvent> ret; | 31 ScopedVector<ProtocolEvent> ret; |
| 32 for (std::deque<ProtocolEvent*>::const_iterator it = buffer_.begin(); | 32 for (std::deque<ProtocolEvent*>::const_iterator it = buffer_.begin(); |
| 33 it != buffer_.end(); ++it) { | 33 it != buffer_.end(); ++it) { |
| 34 ret.push_back((*it)->Clone().Pass()); | 34 ret.push_back((*it)->Clone()); |
| 35 } | 35 } |
| 36 return ret.Pass(); | 36 return ret; |
| 37 } | 37 } |
| 38 | 38 |
| 39 } // namespace syncer | 39 } // namespace syncer |
| OLD | NEW |