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

Unified Diff: sandbox/linux/syscall_broker/broker_file_permission.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: sandbox/linux/syscall_broker/broker_file_permission.cc
diff --git a/sandbox/linux/syscall_broker/broker_file_permission.cc b/sandbox/linux/syscall_broker/broker_file_permission.cc
index 39073444467070b6f1a0c4b4b22280b7488e5369..8a14c7cb3f5433a2cec5641686929c808cd7ae1f 100644
--- a/sandbox/linux/syscall_broker/broker_file_permission.cc
+++ b/sandbox/linux/syscall_broker/broker_file_permission.cc
@@ -222,23 +222,23 @@ BrokerFilePermission::BrokerFilePermission(const std::string& path,
// Validate this permission and die if invalid!
// Must have enough length for a '/'
- CHECK(path_.length() > 0) << GetErrorMessageForTests();
+ LOG_IF(FATAL, path_.empty()) << GetErrorMessageForTests();
// Whitelisted paths must be absolute.
- CHECK(path_[0] == '/') << GetErrorMessageForTests();
+ LOG_IF(FATAL, path_[0] != '/') << GetErrorMessageForTests();
// Don't allow unlinking on creation without create permission
if (unlink_) {
- CHECK(allow_create) << GetErrorMessageForTests();
+ LOG_IF(FATAL, !allow_create) << GetErrorMessageForTests();
}
const char last_char = *(path_.rbegin());
// Recursive paths must have a trailing slash
if (recursive_) {
- CHECK(last_char == '/') << GetErrorMessageForTests();
+ LOG_IF(FATAL, last_char != '/') << GetErrorMessageForTests();
} else {
- CHECK(last_char != '/') << GetErrorMessageForTests();
+ LOG_IF(FATAL, last_char == '/') << GetErrorMessageForTests();
}
}
} // namespace syscall_broker
-} // namespace sandbox
+} // namespace sandbox

Powered by Google App Engine
This is Rietveld 408576698