diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 16:43:26 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 16:43:26 +0000 |
commit | b4a70c353fe2ea1119eb9d1165d92d473a55fc04 (patch) | |
tree | f57febdf29701528cde591e9416c9182e1f3c90c /dbus | |
parent | 13b50e6ea63c955afefc636732e9156ff3efbfae (diff) | |
download | chromium_src-b4a70c353fe2ea1119eb9d1165d92d473a55fc04.zip chromium_src-b4a70c353fe2ea1119eb9d1165d92d473a55fc04.tar.gz chromium_src-b4a70c353fe2ea1119eb9d1165d92d473a55fc04.tar.bz2 |
dbus: Reuse is_set() function from ScopedDBusError API.
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
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/bus.cc | 4 | ||||
-rw-r--r-- | dbus/scoped_dbus_error.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/dbus/bus.cc b/dbus/bus.cc index 73122c2..988a7c1f 100644 --- a/dbus/bus.cc +++ b/dbus/bus.cc @@ -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. @@ -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); diff --git a/dbus/scoped_dbus_error.h b/dbus/scoped_dbus_error.h index 6705647..c15c443 100644 --- a/dbus/scoped_dbus_error.h +++ b/dbus/scoped_dbus_error.h @@ -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; } |