summaryrefslogtreecommitdiffstats
path: root/base/files
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-25 03:06:12 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-25 03:06:12 +0000
commit2f4a8e1220d91ba95c2c46ec232dd53d27807ecd (patch)
treea353800ca5728e7c26423af7cccedf9812404d9a /base/files
parent27488c22fe34d431fa34576032d8a0fc92b61572 (diff)
downloadchromium_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/files')
-rw-r--r--base/files/file_path_watcher_mac.cc14
-rw-r--r--base/files/file_path_watcher_win.cc6
2 files changed, 10 insertions, 10 deletions
diff --git a/base/files/file_path_watcher_mac.cc b/base/files/file_path_watcher_mac.cc
index 07a4dd2..3413e8a 100644
--- a/base/files/file_path_watcher_mac.cc
+++ b/base/files/file_path_watcher_mac.cc
@@ -195,7 +195,7 @@ void FilePathWatcherImpl::CloseFileDescriptor(int *fd) {
}
if (HANDLE_EINTR(close(*fd)) != 0) {
- DPLOG(ERROR) << "close";
+ PLOG(ERROR) << "close";
}
*fd = -1;
}
@@ -203,7 +203,7 @@ void FilePathWatcherImpl::CloseFileDescriptor(int *fd) {
bool FilePathWatcherImpl::AreKeventValuesValid(struct kevent* kevents,
int count) {
if (count < 0) {
- DPLOG(ERROR) << "kevent";
+ PLOG(ERROR) << "kevent";
return false;
}
bool valid = true;
@@ -227,7 +227,7 @@ bool FilePathWatcherImpl::AreKeventValuesValid(struct kevent* kevents,
path_name = base::StringPrintf(
"fd %d", *reinterpret_cast<int*>(&kevents[i].ident));
}
- DLOG(ERROR) << "Error: " << kevents[i].data << " for " << path_name;
+ LOG(ERROR) << "Error: " << kevents[i].data << " for " << path_name;
valid = false;
}
}
@@ -338,8 +338,8 @@ bool FilePathWatcherImpl::UpdateWatches(bool* target_file_affected) {
void FilePathWatcherImpl::OnFileCanReadWithoutBlocking(int fd) {
DCHECK(MessageLoopForIO::current());
- DCHECK_EQ(fd, kqueue_);
- DCHECK(events_.size());
+ CHECK_EQ(fd, kqueue_);
+ CHECK(events_.size());
// Request the file system update notifications that have occurred and return
// them in |updates|. |count| will contain the number of updates that have
@@ -432,12 +432,12 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
kqueue_ = kqueue();
if (kqueue_ == -1) {
- DPLOG(ERROR) << "kqueue";
+ PLOG(ERROR) << "kqueue";
return false;
}
int last_entry = EventsForPath(target_, &events_);
- DCHECK_NE(last_entry, 0);
+ CHECK_NE(last_entry, 0);
EventVector responses(last_entry);
diff --git a/base/files/file_path_watcher_win.cc b/base/files/file_path_watcher_win.cc
index 84a5398..b87654e 100644
--- a/base/files/file_path_watcher_win.cc
+++ b/base/files/file_path_watcher_win.cc
@@ -206,8 +206,8 @@ bool FilePathWatcherImpl::SetupWatchHandle(const FilePath& dir,
error_code != ERROR_SHARING_VIOLATION &&
error_code != ERROR_DIRECTORY) {
using ::operator<<; // Pick the right operator<< below.
- DPLOG(ERROR) << "FindFirstChangeNotification failed for "
- << dir.value();
+ PLOG(ERROR) << "FindFirstChangeNotification failed for "
+ << dir.value();
return false;
}
@@ -241,7 +241,7 @@ bool FilePathWatcherImpl::UpdateWatch() {
child_dirs.push_back(watched_path.BaseName());
FilePath parent(watched_path.DirName());
if (parent == watched_path) {
- DLOG(ERROR) << "Reached the root directory";
+ LOG(ERROR) << "Reached the root directory";
return false;
}
watched_path = parent;