Index: mojo/android/system/watcher_impl.cc |
diff --git a/mojo/android/system/watcher_impl.cc b/mojo/android/system/watcher_impl.cc |
index 28d8c9f1e7a04bddf0c7758da1c2f6b7d9089c39..139dfb4ef4bf5244f2a9a12a96b5e5b6e57d8d52 100644 |
--- a/mojo/android/system/watcher_impl.cc |
+++ b/mojo/android/system/watcher_impl.cc |
@@ -15,7 +15,7 @@ |
#include "base/bind.h" |
#include "jni/WatcherImpl_jni.h" |
#include "mojo/public/cpp/system/handle.h" |
-#include "mojo/public/cpp/system/watcher.h" |
+#include "mojo/public/cpp/system/simple_watcher.h" |
namespace mojo { |
namespace android { |
@@ -26,7 +26,7 @@ namespace { |
class WatcherImpl { |
public: |
- WatcherImpl() : watcher_(FROM_HERE) {} |
+ WatcherImpl() : watcher_(FROM_HERE, SimpleWatcher::ArmingPolicy::AUTOMATIC) {} |
~WatcherImpl() = default; |
@@ -40,9 +40,8 @@ class WatcherImpl { |
base::Bind(&WatcherImpl::OnHandleReady, base::Unretained(this)); |
MojoResult result = |
- watcher_.Start(mojo::Handle(static_cast<MojoHandle>(mojo_handle)), |
+ watcher_.Watch(mojo::Handle(static_cast<MojoHandle>(mojo_handle)), |
static_cast<MojoHandleSignals>(signals), ready_callback); |
- |
if (result != MOJO_RESULT_OK) |
java_watcher_.Reset(); |
@@ -68,7 +67,7 @@ class WatcherImpl { |
result); |
} |
- Watcher watcher_; |
+ SimpleWatcher watcher_; |
base::android::ScopedJavaGlobalRef<jobject> java_watcher_; |
DISALLOW_COPY_AND_ASSIGN(WatcherImpl); |