Index: mojo/edk/system/request_context.h |
diff --git a/mojo/edk/system/request_context.h b/mojo/edk/system/request_context.h |
index 56b849870e33ba07048d5f450e911880be51b045..85cfe78cb8522858e9f8b5a3f698eb4c3b08c2a3 100644 |
--- a/mojo/edk/system/request_context.h |
+++ b/mojo/edk/system/request_context.h |
@@ -8,6 +8,7 @@ |
#include "base/containers/stack_container.h" |
#include "base/macros.h" |
#include "mojo/edk/system/handle_signals_state.h" |
+#include "mojo/edk/system/system_impl_export.h" |
#include "mojo/edk/system/watcher.h" |
namespace base { |
@@ -27,14 +28,25 @@ namespace edk { |
// for any reason. Therefore it is important to always use |
// |RequestContext::current()| rather than referring to any local instance |
// directly. |
-class RequestContext { |
+class MOJO_SYSTEM_IMPL_EXPORT RequestContext { |
public: |
+ // Identifies the source of the current stack frame's RequestContext. |
+ enum class Source { |
+ LOCAL_API_CALL, |
+ SYSTEM, |
+ }; |
+ |
+ // Constructs a RequestContext with a LOCAL_API_CALL Source. |
RequestContext(); |
+ |
+ explicit RequestContext(Source source); |
~RequestContext(); |
// Returns the current thread-local RequestContext. |
static RequestContext* current(); |
+ Source source() const { return source_; } |
+ |
// Adds a finalizer to this RequestContext corresponding to a watch callback |
// which should be triggered in response to some handle state change. If |
// the Watcher hasn't been cancelled by the time this RequestContext is |
@@ -74,6 +86,8 @@ class RequestContext { |
using WatchCancelFinalizerList = |
base::StackVector<scoped_refptr<Watcher>, kStaticWatchFinalizersCapacity>; |
+ Source source_; |
Anand Mistry (off Chromium)
2016/03/17 01:53:09
nit: const
Ken Rockot(use gerrit already)
2016/03/17 15:44:29
done
|
+ |
WatchNotifyFinalizerList watch_notify_finalizers_; |
WatchCancelFinalizerList watch_cancel_finalizers_; |