Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: base/linux_util.h

Issue 312002: Move FileDescriptorGetInode() and FindProcessHoldingSocket() into base/linux_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/linux_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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__
OLDNEW
« no previous file with comments | « no previous file | base/linux_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698