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

Unified Diff: components/sync/core_impl/protocol_event_buffer.h

Issue 2284283002: Remove stl_util's STLElementDeleter from sync. (Closed)
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/core/test/fake_sync_manager.h ('k') | components/sync/core_impl/protocol_event_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core_impl/protocol_event_buffer.h
diff --git a/components/sync/core_impl/protocol_event_buffer.h b/components/sync/core_impl/protocol_event_buffer.h
index 521cc2fc2602483c4fe5045c04cb231bf7c0f080..f0c07a52b24098066fe0268cc632a71012c69e63 100644
--- a/components/sync/core_impl/protocol_event_buffer.h
+++ b/components/sync/core_impl/protocol_event_buffer.h
@@ -8,9 +8,10 @@
#include <stddef.h>
#include <deque>
+#include <memory>
+#include <vector>
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
namespace syncer {
@@ -29,12 +30,11 @@ class ProtocolEventBuffer {
// Records an event. May cause the oldest event to be dropped.
void RecordProtocolEvent(const ProtocolEvent& event);
- // Returns the buffered contents. Will not clear the buffer.
- ScopedVector<ProtocolEvent> GetBufferedProtocolEvents() const;
+ // Returns copies of the buffered contents. Will not clear the buffer.
+ std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() const;
private:
- std::deque<ProtocolEvent*> buffer_;
- base::STLElementDeleter<std::deque<ProtocolEvent*>> buffer_deleter_;
+ std::deque<std::unique_ptr<ProtocolEvent>> buffer_;
DISALLOW_COPY_AND_ASSIGN(ProtocolEventBuffer);
};
« no previous file with comments | « components/sync/core/test/fake_sync_manager.h ('k') | components/sync/core_impl/protocol_event_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698