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

Unified Diff: mojo/edk/system/shared_buffer_dispatcher.cc

Issue 1748503002: [mojo-edk] Add MojoWatch and MojoCancelWatch APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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: mojo/edk/system/shared_buffer_dispatcher.cc
diff --git a/mojo/edk/system/shared_buffer_dispatcher.cc b/mojo/edk/system/shared_buffer_dispatcher.cc
index 1805a926019a9a85ec1701dd680283ba32a6654d..d3c9f2eb6b258ea57c2854e5608413522d84b979 100644
--- a/mojo/edk/system/shared_buffer_dispatcher.cc
+++ b/mojo/edk/system/shared_buffer_dispatcher.cc
@@ -154,7 +154,7 @@ Dispatcher::Type SharedBufferDispatcher::GetType() const {
return Type::SHARED_BUFFER;
}
-MojoResult SharedBufferDispatcher::Close() {
+MojoResult SharedBufferDispatcher::Close(RequestContext* request_context) {
base::AutoLock lock(lock_);
if (in_transit_)
return MOJO_RESULT_INVALID_ARGUMENT;
@@ -231,7 +231,7 @@ bool SharedBufferDispatcher::EndSerialize(void* destination,
return true;
}
-bool SharedBufferDispatcher::BeginTransit() {
+bool SharedBufferDispatcher::BeginTransit(RequestContext* request_context) {
base::AutoLock lock(lock_);
if (in_transit_)
return false;
@@ -239,14 +239,16 @@ bool SharedBufferDispatcher::BeginTransit() {
return in_transit_;
}
-void SharedBufferDispatcher::CompleteTransitAndClose() {
+void SharedBufferDispatcher::CompleteTransitAndClose(
+ RequestContext* request_context) {
base::AutoLock lock(lock_);
in_transit_ = false;
shared_buffer_ = nullptr;
ignore_result(handle_for_transit_.release());
}
-void SharedBufferDispatcher::CancelTransit() {
+void SharedBufferDispatcher::CancelTransit(
+ RequestContext* request_context) {
base::AutoLock lock(lock_);
in_transit_ = false;
handle_for_transit_.reset();

Powered by Google App Engine
This is Rietveld 408576698