summaryrefslogtreecommitdiffstats
path: root/base/file_util_win.cc
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/file_util_win.cc
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/file_util_win.cc')
-rw-r--r--base/file_util_win.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 8d9fbdef..19e15fc 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -44,7 +44,7 @@ bool DevicePathToDriveLetterPath(const FilePath& device_path,
const int kDriveMappingSize = 1024;
wchar_t drive_mapping[kDriveMappingSize] = {'\0'};
if (!::GetLogicalDriveStrings(kDriveMappingSize - 1, drive_mapping)) {
- DLOG(ERROR) << "Failed to get drive mapping.";
+ LOG(ERROR) << "Failed to get drive mapping.";
return false;
}
@@ -603,13 +603,13 @@ bool CreateTemporaryFileInDir(const FilePath& dir,
wchar_t temp_name[MAX_PATH + 1];
if (!GetTempFileName(dir.value().c_str(), L"", 0, temp_name)) {
- DPLOG(WARNING) << "Failed to get temporary file name in " << dir.value();
+ PLOG(WARNING) << "Failed to get temporary file name in " << dir.value();
return false;
}
DWORD path_len = GetLongPathName(temp_name, temp_name, MAX_PATH);
if (path_len > MAX_PATH + 1 || path_len == 0) {
- DPLOG(WARNING) << "Failed to get long path name for " << temp_name;
+ PLOG(WARNING) << "Failed to get long path name for " << temp_name;
return false;
}
@@ -667,8 +667,8 @@ bool CreateDirectory(const FilePath& full_path) {
<< "directory already exists.";
return true;
}
- DLOG(WARNING) << "CreateDirectory(" << full_path_str << "), "
- << "conflicts with existing file.";
+ LOG(WARNING) << "CreateDirectory(" << full_path_str << "), "
+ << "conflicts with existing file.";
return false;
}
@@ -695,8 +695,8 @@ bool CreateDirectory(const FilePath& full_path) {
// race to create the same directory.
return true;
} else {
- DLOG(WARNING) << "Failed to create directory " << full_path_str
- << ", last error is " << error_code << ".";
+ LOG(WARNING) << "Failed to create directory " << full_path_str
+ << ", last error is " << error_code << ".";
return false;
}
} else {
@@ -773,8 +773,8 @@ int WriteFile(const FilePath& filename, const char* data, int size) {
0,
NULL));
if (!file) {
- DLOG(WARNING) << "CreateFile failed for path " << filename.value()
- << " error code=" << GetLastError();
+ LOG(WARNING) << "CreateFile failed for path " << filename.value()
+ << " error code=" << GetLastError();
return -1;
}
@@ -785,12 +785,12 @@ int WriteFile(const FilePath& filename, const char* data, int size) {
if (!result) {
// WriteFile failed.
- DLOG(WARNING) << "writing file " << filename.value()
- << " failed, error code=" << GetLastError();
+ LOG(WARNING) << "writing file " << filename.value()
+ << " failed, error code=" << GetLastError();
} else {
// Didn't write all the bytes.
- DLOG(WARNING) << "wrote" << written << " bytes to "
- << filename.value() << " expected " << size;
+ LOG(WARNING) << "wrote" << written << " bytes to " <<
+ filename.value() << " expected " << size;
}
return -1;
}
@@ -967,7 +967,7 @@ bool MemoryMappedFile::InitializeAsImageSection(const FilePath& file_name) {
NULL, NULL);
if (file_ == base::kInvalidPlatformFileValue) {
- DLOG(ERROR) << "Couldn't open " << file_name.value();
+ LOG(ERROR) << "Couldn't open " << file_name.value();
return false;
}