| Index: mojo/public/cpp/bindings/interface_endpoint_client.h
|
| diff --git a/mojo/public/cpp/bindings/interface_endpoint_client.h b/mojo/public/cpp/bindings/interface_endpoint_client.h
|
| index 5c5243ca2145f76bcc21b0e268d3a483ab44d981..7f35270aef92df2424c02c4d4414ee8acf3717ba 100644
|
| --- a/mojo/public/cpp/bindings/interface_endpoint_client.h
|
| +++ b/mojo/public/cpp/bindings/interface_endpoint_client.h
|
| @@ -17,8 +17,8 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/optional.h"
|
| -#include "base/single_thread_task_runner.h"
|
| -#include "base/threading/thread_checker.h"
|
| +#include "base/sequence_checker.h"
|
| +#include "base/sequenced_task_runner.h"
|
| #include "mojo/public/cpp/bindings/bindings_export.h"
|
| #include "mojo/public/cpp/bindings/connection_error_callback.h"
|
| #include "mojo/public/cpp/bindings/disconnect_reason.h"
|
| @@ -46,34 +46,34 @@ class MOJO_CPP_BINDINGS_EXPORT InterfaceEndpointClient
|
| MessageReceiverWithResponderStatus* receiver,
|
| std::unique_ptr<MessageReceiver> payload_validator,
|
| bool expect_sync_requests,
|
| - scoped_refptr<base::SingleThreadTaskRunner> runner,
|
| + scoped_refptr<base::SequencedTaskRunner> runner,
|
| uint32_t interface_version);
|
| ~InterfaceEndpointClient() override;
|
|
|
| // Sets the error handler to receive notifications when an error is
|
| // encountered.
|
| void set_connection_error_handler(const base::Closure& error_handler) {
|
| - DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK(sequence_checker_.CalledOnValidSequence());
|
| error_handler_ = error_handler;
|
| error_with_reason_handler_.Reset();
|
| }
|
|
|
| void set_connection_error_with_reason_handler(
|
| const ConnectionErrorWithReasonCallback& error_handler) {
|
| - DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK(sequence_checker_.CalledOnValidSequence());
|
| error_with_reason_handler_ = error_handler;
|
| error_handler_.Reset();
|
| }
|
|
|
| // Returns true if an error was encountered.
|
| bool encountered_error() const {
|
| - DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK(sequence_checker_.CalledOnValidSequence());
|
| return encountered_error_;
|
| }
|
|
|
| // Returns true if this endpoint has any pending callbacks.
|
| bool has_pending_responders() const {
|
| - DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK(sequence_checker_.CalledOnValidSequence());
|
| return !async_responders_.empty() || !sync_responses_.empty();
|
| }
|
|
|
| @@ -169,12 +169,12 @@ class MOJO_CPP_BINDINGS_EXPORT InterfaceEndpointClient
|
| ConnectionErrorWithReasonCallback error_with_reason_handler_;
|
| bool encountered_error_;
|
|
|
| - scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
| + scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
|
|
| internal::ControlMessageProxy control_message_proxy_;
|
| internal::ControlMessageHandler control_message_handler_;
|
|
|
| - base::ThreadChecker thread_checker_;
|
| + base::SequenceChecker sequence_checker_;
|
|
|
| base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_;
|
|
|
|
|