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

Unified Diff: mojo/system/local_data_pipe.h

Issue 129163003: Mojo: DataPipe: Implement "may discard" for two-phase writes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 6 years, 11 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 | « mojo/system/data_pipe.cc ('k') | mojo/system/local_data_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/local_data_pipe.h
diff --git a/mojo/system/local_data_pipe.h b/mojo/system/local_data_pipe.h
index f9c0aae1f75b634e5680c47c33a486c4edfa5fd5..97d108e4bdd71a32ddd643b4b9e35b08f1f1814a 100644
--- a/mojo/system/local_data_pipe.h
+++ b/mojo/system/local_data_pipe.h
@@ -65,6 +65,10 @@ class MOJO_SYSTEM_IMPL_EXPORT LocalDataPipe : public DataPipe {
size_t GetMaxNumBytesToWriteNoLock();
size_t GetMaxNumBytesToReadNoLock();
+ // Marks the given number of bytes as consumed/discarded. |num_bytes| must be
+ // greater than |current_num_bytes_|.
+ void MarkDataAsConsumedNoLock(size_t num_bytes);
+
// The members below are protected by |DataPipe|'s |lock_|:
scoped_ptr_malloc<char, base::ScopedPtrAlignedFree> buffer_;
// Circular buffer.
« no previous file with comments | « mojo/system/data_pipe.cc ('k') | mojo/system/local_data_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698