diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 03:06:12 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 03:06:12 +0000 |
commit | 2f4a8e1220d91ba95c2c46ec232dd53d27807ecd (patch) | |
tree | a353800ca5728e7c26423af7cccedf9812404d9a /base/test | |
parent | 27488c22fe34d431fa34576032d8a0fc92b61572 (diff) | |
download | chromium_src-2f4a8e1220d91ba95c2c46ec232dd53d27807ecd.zip chromium_src-2f4a8e1220d91ba95c2c46ec232dd53d27807ecd.tar.gz chromium_src-2f4a8e1220d91ba95c2c46ec232dd53d27807ecd.tar.bz2 |
Revert 107042 - Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.
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/8368009
TBR=brettw@chromium.org
Review URL: http://codereview.chromium.org/8351025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107051 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 7145e51..903b475 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)) { - DLOG(ERROR) << "failed to get size of " << file.value(); + LOG(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) { - DLOG(WARNING) << "file size is zero, will not attempt to map to memory"; + LOG(WARNING) << "file size is zero, will not attempt to map to memory"; return true; } file_util::MemoryMappedFile mapped_file; if (!mapped_file.Initialize(file)) { - DLOG(WARNING) << "failed to memory map " << file.value(); + LOG(WARNING) << "failed to memory map " << file.value(); return false; } if (msync(const_cast<uint8*>(mapped_file.data()), mapped_file.length(), MS_INVALIDATE) != 0) { - DLOG(WARNING) << "failed to invalidate memory map of " << file.value() - << ", errno: " << errno; + LOG(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 0096c9e..cca17b59 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) { - DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't stat source directory: " - << source_dir.value() << " errno = " << errno; + LOG(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) { - DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't create directory: " - << target_path.value() << " errno = " << errno; + LOG(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 { - DLOG(ERROR) << "CopyRecursiveDirNoCache() couldn't create file: " - << target_path.value(); + LOG(ERROR) << "CopyRecursiveDirNoCache() couldn't create file: " << + target_path.value(); success = false; } } else { - DLOG(WARNING) << "CopyRecursiveDirNoCache() skipping non-regular file: " - << current.value(); + LOG(WARNING) << "CopyRecursiveDirNoCache() skipping non-regular file: " << + current.value(); } current = traversal.Next(); |