Skip to content

Commit

Permalink
dbus: Reuse is_set() function from ScopedDBusError API.
Browse files Browse the repository at this point in the history
R=satorux@chromium.org
TEST=dbus_unittests

Review URL: https://codereview.chromium.org/11266020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164651 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tfarina@chromium.org committed Oct 29, 2012
1 parent 13b50e6 commit b4a70c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dbus/bus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ bool Bus::Connect() {
}
if (!connection_) {
LOG(ERROR) << "Failed to connect to the bus: "
<< (dbus_error_is_set(error.get()) ? error.message() : "");
<< (error.is_set() ? error.message() : "");
return false;
}
// We shouldn't exit on the disconnected signal.
Expand Down Expand Up @@ -429,7 +429,7 @@ bool Bus::RequestOwnershipAndBlock(const std::string& service_name) {
error.get());
if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
LOG(ERROR) << "Failed to get the ownership of " << service_name << ": "
<< (dbus_error_is_set(error.get()) ? error.message() : "");
<< (error.is_set() ? error.message() : "");
return false;
}
owned_service_names_.insert(service_name);
Expand Down
2 changes: 1 addition & 1 deletion dbus/scoped_dbus_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ScopedDBusError {
}

DBusError* get() { return &error_; }
bool is_set() { return dbus_error_is_set(&error_); }
bool is_set() const { return dbus_error_is_set(&error_); }
const char* name() { return error_.name; }
const char* message() { return error_.message; }

Expand Down

0 comments on commit b4a70c3

Please sign in to comment.