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

Side by Side Diff: base/linux_util.cc

Issue 9271061: Cleanup: Remove static storage for variables in an unnamed namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style change. Created 8 years, 11 months 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/nix/mime_util_xdg.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/linux_util.h" 5 #include "base/linux_util.h"
6 6
7 #include <dirent.h> 7 #include <dirent.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <glib.h> 10 #include <glib.h>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 state_ = STATE_CHECK_FINISHED; 66 state_ = STATE_CHECK_FINISHED;
67 } 67 }
68 68
69 private: 69 private:
70 base::Lock lock_; 70 base::Lock lock_;
71 LinuxDistroState state_; 71 LinuxDistroState state_;
72 }; 72 };
73 #endif // if defined(OS_LINUX) 73 #endif // if defined(OS_LINUX)
74 74
75 // expected prefix of the target of the /proc/self/fd/%d link for a socket 75 // expected prefix of the target of the /proc/self/fd/%d link for a socket
76 static const char kSocketLinkPrefix[] = "socket:["; 76 const char kSocketLinkPrefix[] = "socket:[";
77 77
78 // Parse a symlink in /proc/pid/fd/$x and return the inode number of the 78 // Parse a symlink in /proc/pid/fd/$x and return the inode number of the
79 // socket. 79 // socket.
80 // inode_out: (output) set to the inode number on success 80 // inode_out: (output) set to the inode number on success
81 // path: e.g. /proc/1234/fd/5 (must be a UNIX domain socket descriptor) 81 // path: e.g. /proc/1234/fd/5 (must be a UNIX domain socket descriptor)
82 // log: if true, log messages about failure details 82 // log: if true, log messages about failure details
83 bool ProcPathGetInode(ino_t* inode_out, const char* path, bool log = false) { 83 bool ProcPathGetInode(ino_t* inode_out, const char* path, bool log = false) {
84 DCHECK(inode_out); 84 DCHECK(inode_out);
85 DCHECK(path); 85 DCHECK(path);
86 86
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), 299 if (0 == strncmp(expected_data.c_str(), syscall_data.get(),
300 expected_data.length())) { 300 expected_data.length())) {
301 return current_tid; 301 return current_tid;
302 } 302 }
303 } 303 }
304 return -1; 304 return -1;
305 } 305 }
306 306
307 } // namespace base 307 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/nix/mime_util_xdg.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698