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

Unified Diff: webrtc/base/stream.h

Issue 1245143005: Remove CircularFileStream / replace it with CallSessionFileRotatingStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add GetSize to FileRotatingStream Created 5 years, 5 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 | « webrtc/base/logsinks.cc ('k') | webrtc/base/stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/stream.h
diff --git a/webrtc/base/stream.h b/webrtc/base/stream.h
index f67c704aa5155f8ed64cbc2cd2a32e4c6b376efd..b3317663b5e3327cf4fc45ce06383aca9339ba8b 100644
--- a/webrtc/base/stream.h
+++ b/webrtc/base/stream.h
@@ -418,39 +418,6 @@ class FileStream : public StreamInterface {
DISALLOW_COPY_AND_ASSIGN(FileStream);
};
-// A stream that caps the output at a certain size, dropping content from the
-// middle of the logical stream and maintaining equal parts of the start/end of
-// the logical stream.
-class CircularFileStream : public FileStream {
- public:
- explicit CircularFileStream(size_t max_size);
-
- bool Open(const std::string& filename, const char* mode, int* error) override;
- StreamResult Read(void* buffer,
- size_t buffer_len,
- size_t* read,
- int* error) override;
- StreamResult Write(const void* data,
- size_t data_len,
- size_t* written,
- int* error) override;
-
- private:
- enum ReadSegment {
- READ_MARKED, // Read 0 .. marked_position_
- READ_MIDDLE, // Read position_ .. file_size
- READ_LATEST, // Read marked_position_ .. position_ if the buffer was
- // overwritten or 0 .. position_ otherwise.
- };
-
- size_t max_write_size_;
- size_t position_;
- size_t marked_position_;
- size_t last_write_position_;
- ReadSegment read_segment_;
- size_t read_segment_available_;
-};
-
///////////////////////////////////////////////////////////////////////////////
// MemoryStream is a simple implementation of a StreamInterface over in-memory
// data. Data is read and written at the current seek position. Reads return
« no previous file with comments | « webrtc/base/logsinks.cc ('k') | webrtc/base/stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698