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

Unified Diff: webrtc/common_types.h

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix compile error in func_test_manager.cc Created 4 years, 6 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: webrtc/common_types.h
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index 02633ba87a481370e3fcb4dcfa8204b63fe35f8c..748bb931b0616067de063cb0d281371f109f8cb3 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -54,28 +54,24 @@ namespace webrtc {
class Config;
-class InStream
-{
-public:
- // Reads |length| bytes from file to |buf|. Returns the number of bytes read
- // or -1 on error.
- virtual int Read(void *buf, size_t len) = 0;
- virtual int Rewind();
- virtual ~InStream() {}
-protected:
- InStream() {}
+class RewindableStream {
+ public:
+ virtual ~RewindableStream() {}
+ virtual int Rewind() = 0;
};
-class OutStream
-{
-public:
- // Writes |length| bytes from |buf| to file. The actual writing may happen
- // some time later. Call Flush() to force a write.
- virtual bool Write(const void *buf, size_t len) = 0;
- virtual int Rewind();
- virtual ~OutStream() {}
-protected:
- OutStream() {}
+class InStream : public RewindableStream {
+ public:
+ // Reads |length| bytes from file to |buf|. Returns the number of bytes read
åsapersson 2016/06/14 15:22:11 |len|
tommi 2016/06/14 20:45:34 Done.
+ // or -1 on error.
+ virtual int Read(void* buf, size_t len) = 0;
+};
+
+class OutStream : public RewindableStream {
+ public:
+ // Writes |length| bytes from |buf| to file. The actual writing may happen
+ // some time later. Call Flush() to force a write.
+ virtual bool Write(const void* buf, size_t len) = 0;
};
enum TraceModule

Powered by Google App Engine
This is Rietveld 408576698