summaryrefslogtreecommitdiffstats
path: root/base/linux_util.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 21:48:00 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 21:48:00 +0000
commita42d4638f0335dbfd14c1c9f6b05a7b09703a78e (patch)
tree96d7687e21b42cd5b5de4b23b2a1da472572e60c /base/linux_util.cc
parent1b5eee12138e3963415453974c824472429c4d80 (diff)
downloadchromium_src-a42d4638f0335dbfd14c1c9f6b05a7b09703a78e.zip
chromium_src-a42d4638f0335dbfd14c1c9f6b05a7b09703a78e.tar.gz
chromium_src-a42d4638f0335dbfd14c1c9f6b05a7b09703a78e.tar.bz2
Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.
[ Reland of 107042 http://codereview.chromium.org/8368009 ] I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8341026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linux_util.cc')
-rw-r--r--base/linux_util.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/base/linux_util.cc b/base/linux_util.cc
index c0757fa..6751469 100644
--- a/base/linux_util.cc
+++ b/base/linux_util.cc
@@ -88,7 +88,7 @@ bool ProcPathGetInode(ino_t* inode_out, const char* path, bool log = false) {
const ssize_t n = readlink(path, buf, sizeof(buf) - 1);
if (n == -1) {
if (log) {
- LOG(WARNING) << "Failed to read the inode number for a socket from /proc"
+ DLOG(WARNING) << "Failed to read the inode number for a socket from /proc"
"(" << errno << ")";
}
return false;
@@ -97,8 +97,8 @@ bool ProcPathGetInode(ino_t* inode_out, const char* path, bool log = false) {
if (memcmp(kSocketLinkPrefix, buf, sizeof(kSocketLinkPrefix) - 1)) {
if (log) {
- LOG(WARNING) << "The descriptor passed from the crashing process wasn't a"
- " UNIX domain socket.";
+ DLOG(WARNING) << "The descriptor passed from the crashing process wasn't "
+ " a UNIX domain socket.";
}
return false;
}
@@ -111,8 +111,8 @@ bool ProcPathGetInode(ino_t* inode_out, const char* path, bool log = false) {
if (inode_ul == ULLONG_MAX) {
if (log) {
- LOG(WARNING) << "Failed to parse a socket's inode number: the number was "
- "too large. Please report this bug: " << buf;
+ DLOG(WARNING) << "Failed to parse a socket's inode number: the number "
+ "was too large. Please report this bug: " << buf;
}
return false;
}
@@ -201,7 +201,7 @@ bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode) {
DIR* proc = opendir("/proc");
if (!proc) {
- LOG(WARNING) << "Cannot open /proc";
+ DLOG(WARNING) << "Cannot open /proc";
return false;
}
@@ -263,7 +263,7 @@ pid_t FindThreadIDWithSyscall(pid_t pid, const std::string& expected_data,
DIR* task = opendir(buf);
if (!task) {
- LOG(WARNING) << "Cannot open " << buf;
+ DLOG(WARNING) << "Cannot open " << buf;
return -1;
}