| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/host/native_messaging/pipe_messaging_channel.h" | 5 #include "remoting/host/native_messaging/pipe_messaging_channel.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | |
| 8 #include "base/bind.h" | 7 #include "base/bind.h" |
| 9 #include "base/callback.h" | 8 #include "base/callback.h" |
| 10 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 11 #include "base/location.h" | 10 #include "base/location.h" |
| 12 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "build/build_config.h" |
| 13 | 13 |
| 14 #if defined(OS_POSIX) | 14 #if defined(OS_POSIX) |
| 15 #include <unistd.h> | 15 #include <unistd.h> |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 base::File DuplicatePlatformFile(base::File file) { | 20 base::File DuplicatePlatformFile(base::File file) { |
| 21 base::PlatformFile result; | 21 base::PlatformFile result; |
| 22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // object, |event_handler_| will become a dangling pointer after | 100 // object, |event_handler_| will become a dangling pointer after |
| 101 // OnDisconnect() returns. Therefore, we set |event_handler_| to nullptr | 101 // OnDisconnect() returns. Therefore, we set |event_handler_| to nullptr |
| 102 // beforehand. | 102 // beforehand. |
| 103 EventHandler* handler = event_handler_; | 103 EventHandler* handler = event_handler_; |
| 104 event_handler_ = nullptr; | 104 event_handler_ = nullptr; |
| 105 handler->OnDisconnect(); | 105 handler->OnDisconnect(); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace remoting | 109 } // namespace remoting |
| OLD | NEW |