| Index: mojo/public/cpp/bindings/sync_handle_registry.h
|
| diff --git a/mojo/public/cpp/bindings/sync_handle_registry.h b/mojo/public/cpp/bindings/sync_handle_registry.h
|
| index b5415af80dfb64fa20b453b14262e1cc40264a7f..881082ece30a04f31e71cf3a7a38bee7ebc82c4b 100644
|
| --- a/mojo/public/cpp/bindings/sync_handle_registry.h
|
| +++ b/mojo/public/cpp/bindings/sync_handle_registry.h
|
| @@ -10,20 +10,20 @@
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "base/threading/thread_checker.h"
|
| +#include "base/sequence_checker.h"
|
| #include "mojo/public/cpp/bindings/bindings_export.h"
|
| #include "mojo/public/cpp/system/core.h"
|
|
|
| namespace mojo {
|
|
|
| -// SyncHandleRegistry is a thread-local storage to register handles that want to
|
| -// be watched together.
|
| +// SyncHandleRegistry is a sequence-local storage to register handles that want
|
| +// to be watched together.
|
| //
|
| // This class is not thread safe.
|
| class MOJO_CPP_BINDINGS_EXPORT SyncHandleRegistry
|
| - : public base::RefCounted<SyncHandleRegistry> {
|
| + : public base::RefCountedThreadSafe<SyncHandleRegistry> {
|
| public:
|
| - // Returns a thread-local object.
|
| + // Returns a sequence-local object.
|
| static scoped_refptr<SyncHandleRegistry> current();
|
|
|
| using HandleCallback = base::Callback<void(MojoResult)>;
|
| @@ -41,7 +41,7 @@ class MOJO_CPP_BINDINGS_EXPORT SyncHandleRegistry
|
| bool WatchAllHandles(const bool* should_stop[], size_t count);
|
|
|
| private:
|
| - friend class base::RefCounted<SyncHandleRegistry>;
|
| + friend class base::RefCountedThreadSafe<SyncHandleRegistry>;
|
|
|
| struct HandleHasher {
|
| size_t operator()(const Handle& handle) const {
|
| @@ -57,7 +57,7 @@ class MOJO_CPP_BINDINGS_EXPORT SyncHandleRegistry
|
|
|
| ScopedHandle wait_set_handle_;
|
|
|
| - base::ThreadChecker thread_checker_;
|
| + base::SequenceChecker sequence_checker_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SyncHandleRegistry);
|
| };
|
|
|