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

Unified Diff: dbus/bus.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: dbus/bus.cc
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 186c9380d0f2b955707e8b8f7219177620a37182..26e5273a124dd02727a0607010106055b50dc1a0 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -74,7 +74,8 @@ class Watch : public base::MessagePumpLibevent::Watcher {
const bool persistent = true; // Watch persistently.
const bool success = base::MessageLoopForIO::current()->WatchFileDescriptor(
file_descriptor, persistent, mode, &file_descriptor_watcher_, this);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
}
// Stops watching the underlying file descriptor.
@@ -86,13 +87,15 @@ class Watch : public base::MessagePumpLibevent::Watcher {
// Implement MessagePumpLibevent::Watcher.
void OnFileCanReadWithoutBlocking(int file_descriptor) override {
const bool success = dbus_watch_handle(raw_watch_, DBUS_WATCH_READABLE);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
}
// Implement MessagePumpLibevent::Watcher.
void OnFileCanWriteWithoutBlocking(int file_descriptor) override {
const bool success = dbus_watch_handle(raw_watch_, DBUS_WATCH_WRITABLE);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
}
DBusWatch* raw_watch_;
@@ -168,7 +171,8 @@ class Timeout : public base::RefCountedThreadSafe<Timeout> {
return;
const bool success = dbus_timeout_handle(raw_timeout_);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
}
DBusTimeout* raw_timeout_;
@@ -633,7 +637,8 @@ bool Bus::SetUpAsyncOperations() {
&Bus::OnToggleWatchThunk,
this,
NULL);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
success = dbus_connection_set_timeout_functions(connection_,
&Bus::OnAddTimeoutThunk,
@@ -641,7 +646,8 @@ bool Bus::SetUpAsyncOperations() {
&Bus::OnToggleTimeoutThunk,
this,
NULL);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
dbus_connection_set_dispatch_status_function(
connection_,
@@ -672,7 +678,8 @@ void Bus::SendWithReply(DBusMessage* request,
const bool success = dbus_connection_send_with_reply(
connection_, request, pending_call, timeout_ms);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
}
void Bus::Send(DBusMessage* request, uint32_t* serial) {
@@ -680,7 +687,8 @@ void Bus::Send(DBusMessage* request, uint32_t* serial) {
AssertOnDBusThread();
const bool success = dbus_connection_send(connection_, request, serial);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
}
void Bus::AddFilterFunction(DBusHandleMessageFunction filter_function,
@@ -699,7 +707,8 @@ void Bus::AddFilterFunction(DBusHandleMessageFunction filter_function,
const bool success = dbus_connection_add_filter(
connection_, filter_function, user_data, NULL);
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
filter_functions_added_.insert(filter_data_pair);
}
@@ -798,7 +807,8 @@ void Bus::UnregisterObjectPath(const ObjectPath& object_path) {
const bool success = dbus_connection_unregister_object_path(
connection_,
object_path.value().c_str());
- CHECK(success) << "Unable to allocate memory";
+ // Unable to allocate memory
+ CHECK(success);
registered_object_paths_.erase(object_path);
}

Powered by Google App Engine
This is Rietveld 408576698