diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-26 21:48:00 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-26 21:48:00 +0000 |
commit | a42d4638f0335dbfd14c1c9f6b05a7b09703a78e (patch) | |
tree | 96d7687e21b42cd5b5de4b23b2a1da472572e60c /base/test | |
parent | 1b5eee12138e3963415453974c824472429c4d80 (diff) | |
download | chromium_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/test')
-rw-r--r-- | base/test/test_file_util_mac.cc | 10 | ||||
-rw-r--r-- | base/test/test_file_util_posix.cc | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/base/test/test_file_util_mac.cc b/base/test/test_file_util_mac.cc index 903b475..7145e51 100644 --- a/base/test/test_file_util_mac.cc +++ b/base/test/test_file_util_mac.cc @@ -19,27 +19,27 @@ bool EvictFileFromSystemCache(const FilePath& file) { int64 length; if (!file_util::GetFileSize(file, &length)) { - LOG(ERROR) << "failed to get size of " << file.value(); + DLOG(ERROR) << "failed to get size of " << file.value(); return false; } // When a file is empty, we do not need to evict it from cache. // In fact, an attempt to map it to memory will result in error. if (length == 0) { - LOG(WARNING) << "file size is zero, will not attempt to map to memory"; + DLOG(WARNING) << "file size is zero, will not attempt to map to memory"; return true; } file_util::MemoryMappedFile mapped_file; if (!mapped_file.Initialize(file)) { - LOG(WARNING) << "failed to memory map " << file.value(); + DLOG(WARNING) << "failed to memory map " << file.value(); return false; } if (msync(const_cast<uint8*>(mapped_file.data()), mapped_file.length(), MS_INVALIDATE) != 0) { - LOG(WARNING) << "failed to invalidate memory map of " << file.value() - << ", errno: " << errno; + DLOG(WARNING) << "failed to invalidate memory map of " << file.value() + << ", errno: " << errno; return false; } diff --git a/base/test/test_file_util_posix.cc b/base/test/test_file_util_posix.cc index cca17b59..0096c9e 100644 --- a/base/test/test_file_util_posix.cc +++ b/base/test/test_file_util_posix.cc @@ -73,8 +73,8 @@ bool CopyRecursiveDirNoCache(const FilePath& source_dir, FileEnumerator::FindInfo info; FilePath current = source_dir; if (stat(source_dir.value().c_str(), &info.stat) < 0) { - LOG(ERROR) << "CopyRecursiveDirNoCache() couldn't stat source directory: " - << source_dir.value() << " errno = " << errno; + DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't stat source directory: " + << source_dir.value() << " errno = " << errno; success = false; } @@ -92,8 +92,8 @@ bool CopyRecursiveDirNoCache(const FilePath& source_dir, if (S_ISDIR(info.stat.st_mode)) { if (mkdir(target_path.value().c_str(), info.stat.st_mode & 01777) != 0 && errno != EEXIST) { - LOG(ERROR) << "CopyRecursiveDirNoCache() couldn't create directory: " << - target_path.value() << " errno = " << errno; + DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't create directory: " + << target_path.value() << " errno = " << errno; success = false; } } else if (S_ISREG(info.stat.st_mode)) { @@ -101,13 +101,13 @@ bool CopyRecursiveDirNoCache(const FilePath& source_dir, success = EvictFileFromSystemCache(target_path); DCHECK(success); } else { - LOG(ERROR) << "CopyRecursiveDirNoCache() couldn't create file: " << - target_path.value(); + DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't create file: " + << target_path.value(); success = false; } } else { - LOG(WARNING) << "CopyRecursiveDirNoCache() skipping non-regular file: " << - current.value(); + DLOG(WARNING) << "CopyRecursiveDirNoCache() skipping non-regular file: " + << current.value(); } current = traversal.Next(); |