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

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

Issue 1811433002: [mojo-edk] Expose notification source to MojoWatch callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/edk/system/watcher.h ('k') | mojo/public/c/system/functions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/watcher.cc
diff --git a/mojo/edk/system/watcher.cc b/mojo/edk/system/watcher.cc
index 4bc9dbbede1e0c485421cf00623b54d4375406cd..25c227641efafc4f09081efbad8c037e15f99c1d 100644
--- a/mojo/edk/system/watcher.cc
+++ b/mojo/edk/system/watcher.cc
@@ -15,12 +15,13 @@ Watcher::Watcher(MojoHandleSignals signals, const WatchCallback& callback)
}
void Watcher::MaybeInvokeCallback(MojoResult result,
- const HandleSignalsState& state) {
+ const HandleSignalsState& state,
+ MojoWatchNotificationFlags flags) {
base::AutoLock lock(lock_);
if (is_cancelled_)
return;
- callback_.Run(result, state);
+ callback_.Run(result, state, flags);
}
void Watcher::NotifyForStateChange(const HandleSignalsState& signals_state) {
@@ -29,9 +30,9 @@ void Watcher::NotifyForStateChange(const HandleSignalsState& signals_state) {
request_context->AddWatchNotifyFinalizer(
make_scoped_refptr(this), MOJO_RESULT_OK, signals_state);
} else if (!signals_state.can_satisfy(signals_)) {
- request_context->AddWatchNotifyFinalizer(make_scoped_refptr(this),
- MOJO_RESULT_FAILED_PRECONDITION,
- signals_state);
+ request_context->AddWatchNotifyFinalizer(
+ make_scoped_refptr(this), MOJO_RESULT_FAILED_PRECONDITION,
+ signals_state);
}
}
« no previous file with comments | « mojo/edk/system/watcher.h ('k') | mojo/public/c/system/functions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698