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

Unified Diff: chrome/browser/process_singleton_posix.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
Index: chrome/browser/process_singleton_posix.cc
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
index 17c9b88606ee89b9570bb517942a9339e1a3f016..d5e16163cad0c3e7cf3bcfd29183e902f22f32cf 100644
--- a/chrome/browser/process_singleton_posix.cc
+++ b/chrome/browser/process_singleton_posix.cc
@@ -220,15 +220,16 @@ ssize_t ReadFromSocket(int fd,
// Set up a sockaddr appropriate for messaging.
void SetupSockAddr(const std::string& path, struct sockaddr_un* addr) {
addr->sun_family = AF_UNIX;
- CHECK(path.length() < arraysize(addr->sun_path))
- << "Socket path too long: " << path;
+ // Socket path too long.
+ CHECK(path.length() < arraysize(addr->sun_path));
base::strlcpy(addr->sun_path, path.c_str(), arraysize(addr->sun_path));
}
// Set up a socket appropriate for messaging.
int SetupSocketOnly() {
int sock = socket(PF_UNIX, SOCK_STREAM, 0);
- PCHECK(sock >= 0) << "socket() failed";
+ // socket() failed
+ CHECK(sock >= 0);
DCHECK(base::SetNonBlocking(sock)) << "Failed to make non-blocking socket.";
int rv = SetCloseOnExec(sock);
@@ -976,11 +977,10 @@ bool ProcessSingleton::Create() {
return false;
}
- // Check that the directory was created with the correct permissions.
+ // Check that the directory was created with the correct permissions (0700).
int dir_mode = 0;
CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) &&
- dir_mode == base::FILE_PERMISSION_USER_MASK)
- << "Temp directory mode is not 700: " << std::oct << dir_mode;
+ dir_mode == base::FILE_PERMISSION_USER_MASK);
// Setup the socket symlink and the two cookies.
base::FilePath socket_target_path =

Powered by Google App Engine
This is Rietveld 408576698