| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 class EnvVarGetter; | |
| 14 class FilePath; | 13 class FilePath; |
| 15 | 14 |
| 16 namespace base { | 15 namespace base { |
| 17 | 16 |
| 17 class EnvVarGetter; |
| 18 |
| 18 static const char kFindInodeSwitch[] = "--find-inode"; | 19 static const char kFindInodeSwitch[] = "--find-inode"; |
| 19 | 20 |
| 20 // Makes a copy of |pixels| with the ordering changed from BGRA to RGBA. | 21 // Makes a copy of |pixels| with the ordering changed from BGRA to RGBA. |
| 21 // The caller is responsible for free()ing the data. If |stride| is 0, | 22 // The caller is responsible for free()ing the data. If |stride| is 0, |
| 22 // it's assumed to be 4 * |width|. | 23 // it's assumed to be 4 * |width|. |
| 23 uint8_t* BGRAToRGBA(const uint8_t* pixels, int width, int height, int stride); | 24 uint8_t* BGRAToRGBA(const uint8_t* pixels, int width, int height, int stride); |
| 24 | 25 |
| 25 // Get the Linux Distro if we can, or return "Unknown", similar to | 26 // Get the Linux Distro if we can, or return "Unknown", similar to |
| 26 // GetWinVersion() in base/win_util.h. | 27 // GetWinVersion() in base/win_util.h. |
| 27 std::string GetLinuxDistro(); | 28 std::string GetLinuxDistro(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // Return the inode number for the UNIX domain socket |fd|. | 69 // Return the inode number for the UNIX domain socket |fd|. |
| 69 bool FileDescriptorGetInode(ino_t* inode_out, int fd); | 70 bool FileDescriptorGetInode(ino_t* inode_out, int fd); |
| 70 | 71 |
| 71 // Find the process which holds the given socket, named by inode number. If | 72 // Find the process which holds the given socket, named by inode number. If |
| 72 // multiple processes hold the socket, this function returns false. | 73 // multiple processes hold the socket, this function returns false. |
| 73 bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode); | 74 bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode); |
| 74 | 75 |
| 75 } // namespace base | 76 } // namespace base |
| 76 | 77 |
| 77 #endif // BASE_LINUX_UTIL_H_ | 78 #endif // BASE_LINUX_UTIL_H_ |
| OLD | NEW |