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

Unified Diff: dbus/object_proxy.h

Issue 9373039: Allow dbus clients to silence logging when a service is unavailable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove string.h include Created 8 years, 10 months 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/object_proxy.h
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h
index ef453054915786accb66d82268a22506b6a69240..e9135f2d0e799c564b99d7e7a3d00598e532cc40 100644
--- a/dbus/object_proxy.h
+++ b/dbus/object_proxy.h
@@ -30,11 +30,20 @@ class Signal;
// object is is alive when callbacks referencing |this| are called.
class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
public:
- // Client code should use Bus::GetObjectProxy() instead of this
- // constructor.
+ // Client code should use Bus::GetObjectProxy() or
+ // Bus::GetObjectProxyWithOptions() instead of this constructor.
ObjectProxy(Bus* bus,
const std::string& service_name,
- const std::string& object_path);
+ const std::string& object_path,
+ int options);
+
+ // Options to be OR-ed together when calling Bus::GetObjectProxyWithOptions().
+ // Set the IGNORE_SERVICE_UNKNOWN_ERRORS option to silence logging of
+ // org.freedesktop.DBus.Error.ServiceUnknown errors.
+ enum Options {
+ DEFAULT_OPTIONS = 0,
+ IGNORE_SERVICE_UNKNOWN_ERRORS = 1 << 0
+ };
// Special timeout constants.
//
@@ -194,6 +203,8 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
std::set<std::string> match_rules_;
+ const bool log_unknown_service_errors_;
+
DISALLOW_COPY_AND_ASSIGN(ObjectProxy);
};

Powered by Google App Engine
This is Rietveld 408576698