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

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 use of ASSERT instead of ASSERT_TRUE in test 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
« no previous file with comments | « webrtc/call/rtc_event_log_helper_thread.cc ('k') | webrtc/common_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_types.h
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index 02633ba87a481370e3fcb4dcfa8204b63fe35f8c..4c77c7794490c261174712196b29398c30515d0b 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 |len| bytes from file to |buf|. Returns the number of bytes read
+ // or -1 on error.
+ virtual int Read(void* buf, size_t len) = 0;
+};
+
+class OutStream : public RewindableStream {
+ public:
+ // Writes |len| 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
« no previous file with comments | « webrtc/call/rtc_event_log_helper_thread.cc ('k') | webrtc/common_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698