| Index: remoting/host/native_messaging/native_messaging_pipe.cc
|
| diff --git a/remoting/host/native_messaging/native_messaging_pipe.cc b/remoting/host/native_messaging/native_messaging_pipe.cc
|
| index 13abc35d4ddc821e7d99a3bb04193dbbb5be63a4..8521472df0873dfbba833d043a5925431cd67e2e 100644
|
| --- a/remoting/host/native_messaging/native_messaging_pipe.cc
|
| +++ b/remoting/host/native_messaging/native_messaging_pipe.cc
|
| @@ -19,11 +19,9 @@ NativeMessagingPipe::~NativeMessagingPipe() {
|
|
|
| void NativeMessagingPipe::Start(
|
| scoped_ptr<extensions::NativeMessageHost> host,
|
| - scoped_ptr<extensions::NativeMessagingChannel> channel,
|
| - const base::Closure& quit_closure) {
|
| + scoped_ptr<extensions::NativeMessagingChannel> channel) {
|
| host_ = host.Pass();
|
| channel_ = channel.Pass();
|
| - quit_closure_ = quit_closure;
|
| channel_->Start(this);
|
| }
|
|
|
| @@ -34,8 +32,8 @@ void NativeMessagingPipe::OnMessage(scoped_ptr<base::Value> message) {
|
| }
|
|
|
| void NativeMessagingPipe::OnDisconnect() {
|
| - if (!quit_closure_.is_null())
|
| - base::ResetAndReturn(&quit_closure_).Run();
|
| + host_.reset();
|
| + channel_.reset();
|
| }
|
|
|
| void NativeMessagingPipe::PostMessageFromNativeHost(
|
| @@ -45,8 +43,8 @@ void NativeMessagingPipe::PostMessageFromNativeHost(
|
| }
|
|
|
| void NativeMessagingPipe::CloseChannel(const std::string& error_message) {
|
| - if (!quit_closure_.is_null())
|
| - base::ResetAndReturn(&quit_closure_).Run();
|
| + host_.reset();
|
| + channel_.reset();
|
| }
|
|
|
| } // namespace remoting
|
|
|