Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: sync/internal_api/protocol_event_buffer.cc

Issue 1132343003: Passing scoped_ptr into ScopedVector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sync/sessions/model_type_registry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "sync/internal_api/public/events/protocol_event.h" 7 #include "sync/internal_api/public/events/protocol_event.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 10
(...skipping 11 matching lines...) Expand all
22 buffer_.pop_front(); 22 buffer_.pop_front();
23 delete to_delete; 23 delete to_delete;
24 } 24 }
25 } 25 }
26 26
27 ScopedVector<ProtocolEvent> 27 ScopedVector<ProtocolEvent>
28 ProtocolEventBuffer::GetBufferedProtocolEvents() const { 28 ProtocolEventBuffer::GetBufferedProtocolEvents() const {
29 ScopedVector<ProtocolEvent> ret; 29 ScopedVector<ProtocolEvent> ret;
30 for (std::deque<ProtocolEvent*>::const_iterator it = buffer_.begin(); 30 for (std::deque<ProtocolEvent*>::const_iterator it = buffer_.begin();
31 it != buffer_.end(); ++it) { 31 it != buffer_.end(); ++it) {
32 ret.push_back((*it)->Clone().release()); 32 ret.push_back((*it)->Clone().Pass());
33 } 33 }
34 return ret.Pass(); 34 return ret.Pass();
35 } 35 }
36 36
37 } // namespace syncer 37 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | sync/sessions/model_type_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698