summaryrefslogtreecommitdiffstats
path: root/dbus/mock_bus.h
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in dbus/.avi2015-12-221-2/+3
| | | | | | | | | BUG=138542 TBR=hashimoto@chromium.org Review URL: https://codereview.chromium.org/1541193002 Cr-Commit-Position: refs/heads/master@{#366617}
* dbus: Replace PostTaskTo*Thread methods with Get*TaskRunnerhashimoto@chromium.org2013-09-261-10/+2
| | | | | | | | | | | | | By exposing TaskRunners, we'll be able to use utility functions like base::PostTaskAndReplyWithResult BUG=None TEST=git cl try R=satorux@chromium.org Review URL: https://codereview.chromium.org/24554002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225324 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Chromium's DBus service ownership to be stealablecmasone@chromium.org2013-07-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | We've seen some cases in tests where a Chromium process winds up in a temporarily unkillable state, causing the dbus-daemon to believe that it still actively owns org.chromium.LibCrosService. This makes attempts to restart the UI fail, as the browser dies when it cannot take ownership of this service name. The reason it can't is because Chromium currently doesn't allow other processes to steal ownership -- and the unkillable process is holding onto the token. This can be remedied by providing certain options when ownership of the service name is taken, options that allow other processes to seize ownership if they so choose. The ramifications of this are discussed further in the bug. BUG=chromium:261381 TEST=new unit test in dbus_unittest TEST=run the following as chronos on a device: "gdbus call --system --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.RequestName org.chromium.LibCrosService 7" TEST=This should return (uint32 1,) Review URL: https://chromiumcodereview.appspot.com/20555003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214589 0039d316-1c4b-4281-b951-d872f2087c98
* Support D-Bus Object Managerkeybuk@chromium.org2013-03-251-0/+2
| | | | | | | | | | | | | | | | | Object Manager is a new standard D-Bus interface, closely related to the Properties interface. It is used by BlueZ 5.x thus the need to implement it now. The intended use is that Chrome D-Bus Client singletons set up a link to an object manager in their constructor and register themselves to handle their particular interface. BUG=220951 TEST=dbus_unittests Review URL: https://codereview.chromium.org/12491014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190440 0039d316-1c4b-4281-b951-d872f2087c98
* DBus: Use TaskRunners instead of MessageLoopProxies.thestig@chromium.org2013-02-201-1/+1
| | | | | | Review URL: https://chromiumcodereview.appspot.com/12255043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183362 0039d316-1c4b-4281-b951-d872f2087c98
* DBus: Bus::AddMatch and RemoveMatch support repeated rules.deymo@chromium.org2013-01-311-1/+1
| | | | | | | | | | | | | | This fix counts the number of times the same rule is added to a dbus::Bus and removes the rule from the real DBus connection when all the copies of the same match rule have been removed. BUG=chromium:173054 TEST=BusTest.DoubleAddAndRemoveMatch passes. Review URL: https://chromiumcodereview.appspot.com/12088068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179809 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructors, Linux fixesrsleevi@chromium.org2012-05-181-1/+3
| | | | | | | | | | BUG=123295 TEST=none Review URL: https://chromiumcodereview.appspot.com/10392152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137893 0039d316-1c4b-4281-b951-d872f2087c98
* Convert uses of int ms to TimeDelta in dbus.tedvessenes@gmail.com2012-03-111-1/+1
| | | | | | | | | | R=satorux@chromium.org BUG=108171 Review URL: http://codereview.chromium.org/9582044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126055 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: remove service name from ExportedObjectkeybuk@chromium.org2012-03-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Well-known names in D-Bus are merely aliases to unique connection ids maintained by the bus, they have no purpose in qualifying object paths or interfaces and it's perfectly legimiate for a client to make requests to the unique connection id (e.g. in response to a signal, which does not reference the well-known name of the origin connection). Remove the service_name member from dbus::ExportedObject, from its constructor and from dbus::Bus::GetExportedObject and require code to call dbus::Bus::RequestOwnership if a well-known name is desired. This requires making that function callable from the origin thread with a callback for the return value. BUG=chromium-os:27101 TEST=dbus_unittests Change-Id: Ib91de8b68ad9c3b432e224a2c715f0c2ca1af463 Review URL: http://codereview.chromium.org/9668018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125970 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: add ObjectPath typekeybuk@google.com2012-02-141-5/+6
| | | | | | | | | | | | | | | | | | Rather than use std::string for object paths, add a dbus::ObjectPath type that wraps one while allowing more type-safety. This solves all sorts of issues with confusing object paths for strings, and allows us to do Properties code using templates disambiguating them from strings. BUG=chromium:109194 TEST=built and run tests Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121920 Review URL: https://chromiumcodereview.appspot.com/9378039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121941 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 121920 - dbus: add ObjectPath typedpapad@chromium.org2012-02-141-6/+5
| | | | | | | | | | | | | | | | | | | | Rather than use std::string for object paths, add a dbus::ObjectPath type that wraps one while allowing more type-safety. This solves all sorts of issues with confusing object paths for strings, and allows us to do Properties code using templates disambiguating them from strings. BUG=chromium:109194 TEST=built and run tests Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e Review URL: http://codereview.chromium.org/9378039 TBR=keybuk@chromium.org Review URL: https://chromiumcodereview.appspot.com/9363045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121923 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: add ObjectPath typekeybuk@chromium.org2012-02-141-5/+6
| | | | | | | | | | | | | | | | | Rather than use std::string for object paths, add a dbus::ObjectPath type that wraps one while allowing more type-safety. This solves all sorts of issues with confusing object paths for strings, and allows us to do Properties code using templates disambiguating them from strings. BUG=chromium:109194 TEST=built and run tests Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e Review URL: http://codereview.chromium.org/9378039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121920 0039d316-1c4b-4281-b951-d872f2087c98
* Allow dbus clients to silence logging when a service is unavailable.adamk@chromium.org2012-02-101-1/+5
| | | | | | | | BUG=109696 Review URL: https://chromiumcodereview.appspot.com/9373039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121544 0039d316-1c4b-4281-b951-d872f2087c98
* Add Bus::ShutdownOnDBusThreadAndBlock() and remove bus::Shutdown()satorux@chromium.org2011-09-021-1/+1
| | | | | | | | | | | | | | | | This function is intended to use at the the very end of the browser shutdown, where it it makes more sense to shut down the bus synchronously, than trying to make it asynchronous. Remove Bus::Shutdown() as we are unlikely to need it for the production code. BUG=chromium:90036 TEST=dbus_unittests Review URL: http://codereview.chromium.org/7830009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99331 0039d316-1c4b-4281-b951-d872f2087c98
* Add mock classes for Bus, ObjectProxy, and ExportedObject.satorux@chromium.org2011-08-251-0/+71
Also add mock_unittest.cc that demonstrates how to mock synchronos and asynchronos D-Bus method calls. BUG=90036 TEST=dbus_unittests Review URL: http://codereview.chromium.org/7714030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98188 0039d316-1c4b-4281-b951-d872f2087c98