| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef BASE_LINUX_UTIL_H__ | 5 #ifndef BASE_LINUX_UTIL_H__ |
| 6 #define BASE_LINUX_UTIL_H__ | 6 #define BASE_LINUX_UTIL_H__ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // to attempt to use preferences from the desktop environment -- | 46 // to attempt to use preferences from the desktop environment -- |
| 47 // proxy settings, password manager, etc. | 47 // proxy settings, password manager, etc. |
| 48 DesktopEnvironment GetDesktopEnvironment(EnvironmentVariableGetter* env); | 48 DesktopEnvironment GetDesktopEnvironment(EnvironmentVariableGetter* env); |
| 49 | 49 |
| 50 // Return a string representation of the given desktop environment. | 50 // Return a string representation of the given desktop environment. |
| 51 // May return NULL in the case of DESKTOP_ENVIRONMENT_OTHER. | 51 // May return NULL in the case of DESKTOP_ENVIRONMENT_OTHER. |
| 52 const char* GetDesktopEnvironmentName(DesktopEnvironment env); | 52 const char* GetDesktopEnvironmentName(DesktopEnvironment env); |
| 53 // Convenience wrapper that calls GetDesktopEnvironment() first. | 53 // Convenience wrapper that calls GetDesktopEnvironment() first. |
| 54 const char* GetDesktopEnvironmentName(EnvironmentVariableGetter* env); | 54 const char* GetDesktopEnvironmentName(EnvironmentVariableGetter* env); |
| 55 | 55 |
| 56 // Return the inode number for the UNIX domain socket |fd|. |
| 57 bool FileDescriptorGetInode(ino_t* inode_out, int fd); |
| 58 |
| 59 // Find the process which holds the given socket, named by inode number. If |
| 60 // multiple processes hold the socket, this function returns false. |
| 61 bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode); |
| 62 |
| 56 } // namespace base | 63 } // namespace base |
| 57 | 64 |
| 58 #endif // BASE_LINUX_UTIL_H__ | 65 #endif // BASE_LINUX_UTIL_H__ |
| OLD | NEW |