OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ipc/ipc_channel_posix.h" | 5 #include "ipc/ipc_channel_posix.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 delete m; | 573 delete m; |
574 } | 574 } |
575 | 575 |
576 // Close any outstanding, received file descriptors. | 576 // Close any outstanding, received file descriptors. |
577 ClearInputFDs(); | 577 ClearInputFDs(); |
578 } | 578 } |
579 | 579 |
580 // static | 580 // static |
581 bool Channel::ChannelImpl::IsNamedServerInitialized( | 581 bool Channel::ChannelImpl::IsNamedServerInitialized( |
582 const std::string& channel_id) { | 582 const std::string& channel_id) { |
583 return file_util::PathExists(base::FilePath(channel_id)); | 583 return base::PathExists(base::FilePath(channel_id)); |
584 } | 584 } |
585 | 585 |
586 #if defined(OS_LINUX) | 586 #if defined(OS_LINUX) |
587 // static | 587 // static |
588 void Channel::ChannelImpl::SetGlobalPid(int pid) { | 588 void Channel::ChannelImpl::SetGlobalPid(int pid) { |
589 global_pid_ = pid; | 589 global_pid_ = pid; |
590 } | 590 } |
591 #endif // OS_LINUX | 591 #endif // OS_LINUX |
592 | 592 |
593 // Called by libevent when we can read from the pipe without blocking. | 593 // Called by libevent when we can read from the pipe without blocking. |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 | 1019 |
1020 | 1020 |
1021 #if defined(OS_LINUX) | 1021 #if defined(OS_LINUX) |
1022 // static | 1022 // static |
1023 void Channel::SetGlobalPid(int pid) { | 1023 void Channel::SetGlobalPid(int pid) { |
1024 ChannelImpl::SetGlobalPid(pid); | 1024 ChannelImpl::SetGlobalPid(pid); |
1025 } | 1025 } |
1026 #endif // OS_LINUX | 1026 #endif // OS_LINUX |
1027 | 1027 |
1028 } // namespace IPC | 1028 } // namespace IPC |
OLD | NEW |