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

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

Issue 2413313004: [Sync] Move the last things out of core/. (Closed)
Patch Set: Address comments. Created 4 years, 2 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
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
deleted file mode 100644
index f0c07a52b24098066fe0268cc632a71012c69e63..0000000000000000000000000000000000000000
--- a/components/sync/core_impl/protocol_event_buffer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_SYNC_CORE_IMPL_PROTOCOL_EVENT_BUFFER_H_
-#define COMPONENTS_SYNC_CORE_IMPL_PROTOCOL_EVENT_BUFFER_H_
-
-#include <stddef.h>
-
-#include <deque>
-#include <memory>
-#include <vector>
-
-#include "base/macros.h"
-
-namespace syncer {
-
-class ProtocolEvent;
-
-// A container for ProtocolEvents.
-//
-// Stores at most kBufferSize events, then starts dropping the oldest events.
-class ProtocolEventBuffer {
- public:
- static const size_t kBufferSize;
-
- ProtocolEventBuffer();
- ~ProtocolEventBuffer();
-
- // Records an event. May cause the oldest event to be dropped.
- void RecordProtocolEvent(const ProtocolEvent& event);
-
- // Returns copies of the buffered contents. Will not clear the buffer.
- std::vector<std::unique_ptr<ProtocolEvent>> GetBufferedProtocolEvents() const;
-
- private:
- std::deque<std::unique_ptr<ProtocolEvent>> buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(ProtocolEventBuffer);
-};
-
-} // namespace syncer
-
-#endif // COMPONENTS_SYNC_CORE_IMPL_PROTOCOL_EVENT_BUFFER_H_
« no previous file with comments | « components/sync/core_impl/model_type_connector_proxy.cc ('k') | components/sync/core_impl/protocol_event_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698