| Index: device/serial/data_source_sender.cc
|
| diff --git a/device/serial/data_source_sender.cc b/device/serial/data_source_sender.cc
|
| index 97029dda656e490603edea3c7d9b73161157bf4c..f9cc4f1bd2c393fd24c94af085a146a643393efd 100644
|
| --- a/device/serial/data_source_sender.cc
|
| +++ b/device/serial/data_source_sender.cc
|
| @@ -71,22 +71,15 @@
|
| uint32_t buffer_size_;
|
| };
|
|
|
| -DataSourceSender::DataSourceSender(
|
| - mojo::InterfaceRequest<serial::DataSource> source,
|
| - mojo::InterfacePtr<serial::DataSourceClient> client,
|
| - const ReadyCallback& ready_callback,
|
| - const ErrorCallback& error_callback)
|
| - : binding_(this, source.Pass()),
|
| - client_(client.Pass()),
|
| - ready_callback_(ready_callback),
|
| +DataSourceSender::DataSourceSender(const ReadyCallback& ready_callback,
|
| + const ErrorCallback& error_callback)
|
| + : ready_callback_(ready_callback),
|
| error_callback_(error_callback),
|
| available_buffer_capacity_(0),
|
| paused_(false),
|
| shut_down_(false),
|
| weak_factory_(this) {
|
| DCHECK(!ready_callback.is_null() && !error_callback.is_null());
|
| - binding_.set_error_handler(this);
|
| - client_.set_error_handler(this);
|
| }
|
|
|
| void DataSourceSender::ShutDown() {
|
| @@ -145,7 +138,7 @@
|
| int32_t error) {
|
| DoneInternal(data);
|
| if (!shut_down_)
|
| - client_->OnError(error);
|
| + client()->OnError(error);
|
| paused_ = true;
|
| // We don't call GetMoreData here so we don't send any additional data until
|
| // Resume() is called.
|
| @@ -160,7 +153,7 @@
|
| if (!data.empty()) {
|
| mojo::Array<uint8_t> data_to_send(data.size());
|
| std::copy(data.begin(), data.end(), &data_to_send[0]);
|
| - client_->OnData(data_to_send.Pass());
|
| + client()->OnData(data_to_send.Pass());
|
| }
|
| pending_send_.reset();
|
| }
|
|
|