Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1546)

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 10008102: gdata: Use PLOG() instead of strerror() when logging system errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index dd2ed256ae88be849e6c3baca1d3dc83fc6ca550..9b440406e492192d58db9df0aceb3a11c8c32878 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -193,11 +193,9 @@ base::PlatformFileError CreateCacheDirectories(
if (!file_util::CreateDirectory(paths_to_create[i])) {
// Error creating this directory, record error and proceed with next one.
error = SystemToPlatformError(errno);
- LOG(ERROR) << "Error creating dir " << paths_to_create[i].value()
- << ": \"" << strerror(errno)
- << "\", " << error;
+ PLOG(ERROR) << "Error creating directory " << paths_to_create[i].value();
} else {
- DVLOG(1) << "Created dir " << paths_to_create[i].value();
+ DVLOG(1) << "Created directory " << paths_to_create[i].value();
}
}
@@ -226,13 +224,12 @@ base::PlatformFileError ModifyCacheState(
success = file_util::CopyFile(source_path, dest_path);
if (!success) {
base::PlatformFileError error = SystemToPlatformError(errno);
- LOG(ERROR) << "Error "
- << (file_operation_type ==
- GDataFileSystem::FILE_OPERATION_MOVE ?
- "moving " : "copying ")
- << source_path.value()
- << " to " << dest_path.value()
- << ": " << strerror(errno);
+ PLOG(ERROR) << "Error "
+ << (file_operation_type ==
+ GDataFileSystem::FILE_OPERATION_MOVE ?
+ "moving " : "copying ")
+ << source_path.value()
+ << " to " << dest_path.value();
return error;
} else {
DVLOG(1) << (file_operation_type ==
@@ -279,10 +276,8 @@ base::PlatformFileError ModifyCacheState(
} else {
// Since we didn't check if symlink exists before deleting it, don't log
// if symlink doesn't exist.
- if (errno != ENOENT) {
- LOG(WARNING) << "Error deleting symlink " << symlink_path.value()
- << ": " << strerror(errno);
- }
+ if (errno != ENOENT)
+ PLOG(WARNING) << "Error deleting symlink " << symlink_path.value();
}
if (!create_symlink)
@@ -291,9 +286,8 @@ base::PlatformFileError ModifyCacheState(
// Create new symlink to |dest_path|.
if (!file_util::CreateSymbolicLink(dest_path, symlink_path)) {
base::PlatformFileError error = SystemToPlatformError(errno);
- LOG(ERROR) << "Error creating symlink " << symlink_path.value()
- << " for " << dest_path.value()
- << ": " << strerror(errno);
+ PLOG(ERROR) << "Error creating symlink " << symlink_path.value()
+ << " for " << dest_path.value();
return error;
} else {
DVLOG(1) << "Created symlink " << symlink_path.value()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698