| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
BUG=138542
TBR=hashimoto@chromium.org
Review URL: https://codereview.chromium.org/1541193002
Cr-Commit-Position: refs/heads/master@{#366617}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation for ObjectProxy::ConnectToSignal() differs
from the method's actual behavior. Fix this, by updating
the documentation.
BUG=545139
R=hashimoto@chromium.org
TEST=compile
Review URL: https://codereview.chromium.org/1406923005
Cr-Commit-Position: refs/heads/master@{#355785}
|
|
|
|
|
|
|
|
|
|
|
|
| |
After this change, it is guaranteed that no callback is called for method calls after
RemoveObjectProxy() is called.
BUG=471175
TEST=dbus_unittests
Review URL: https://codereview.chromium.org/1040683002
Cr-Commit-Position: refs/heads/master@{#322747}
|
|
|
|
|
|
|
|
|
|
| |
Bus::Add/RemoveFilterFunction is already performing duplication check.
BUG=None
Review URL: https://codereview.chromium.org/747903004
Cr-Commit-Position: refs/heads/master@{#306781}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, ObjectProxy::CallMethodAndBlock() returns NULL on
failure but the D-Bus error details are not passed to the caller.
Added a method that would return the D-Bus error information
to the caller and switched ObjectProxy::CallMethodAndBlock()
to use the new method instead.
BUG=chromium:414838
TEST=Build Chrome
TEST=ninja -C out/Debug dbus_unittests && out/Debug/dbus_unittests
Review URL: https://codereview.chromium.org/563763004
Cr-Commit-Position: refs/heads/master@{#295212}
|
|
|
|
|
|
|
|
|
| |
BUG=401571
Review URL: https://codereview.chromium.org/455533002
Cr-Commit-Position: refs/heads/master@{#288446}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288446 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To prevent Shill Service DBus ObjectProxy instances from accumulating,
remove them when the service becomes inactive.
Hopefully includes ASAN fixes.
BUG=223483
TBR=hashimoto@chromium.org
Review URL: https://codereview.chromium.org/26289002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227371 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Track active references in ShillClientHelper (Take 2)
> To prevent Shill Service DBus ObjectProxy instances from accumulating,
> remove them when the service becomes inactive.
>
> Original CL: https://codereview.chromium.org/23658053/
>
> BUG=223483
> TBR=hashimoto@chromium.org
>
> Review URL: https://codereview.chromium.org/24558004
Failure:
http://build.chromium.org/p/chromium.memory/builders/Chromium%20OS%20%28amd64%29%20ASAN/builds/6931
TBR=stevenjb@chromium.org
Review URL: https://codereview.chromium.org/26075002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227139 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To prevent Shill Service DBus ObjectProxy instances from accumulating,
remove them when the service becomes inactive.
Original CL: https://codereview.chromium.org/23658053/
BUG=223483
TBR=hashimoto@chromium.org
Review URL: https://codereview.chromium.org/24558004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227100 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split ConnectToNameOwnerChangedSignal() from ConnectToSignalInternal().
Add WaitForServiceToBeAvailable()
Add test.
BUG=141009
TEST=dbus_unittests
R=satorux@chromium.org
Review URL: https://codereview.chromium.org/25488002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226428 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
thread
Accessing the callback on the D-Bus thread while changing its value may result in a race condition.
Change the type of SetNameOwnerChangedCallback's argument from Signal to strings to stop worrying about on which thread the Signal gets released.
BUG=298747
TEST=dbus_unittests
R=satorux@chromium.org
Review URL: https://codereview.chromium.org/24673006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225675 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=dbus_unittests
R=satorux@chromium.org
Review URL: https://codereview.chromium.org/24557002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225362 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use after free on ASAN chromiumos.
> Track active references in ShillClientHelper
> To prevent Shill Service DBus ObjectProxy instances from accumulating,
> remove them when the service becomes inactive.
>
> BUG=223483
>
> Review URL: https://chromiumcodereview.appspot.com/23658053
TBR=stevenjb@chromium.org
Review URL: https://codereview.chromium.org/24293002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224204 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
To prevent Shill Service DBus ObjectProxy instances from accumulating,
remove them when the service becomes inactive.
BUG=223483
Review URL: https://chromiumcodereview.appspot.com/23658053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224179 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
google_apis/, gpu/, ipc/, jingle/.
BUG=254986
TEST=none
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/18156002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209149 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the org.freedesktop.DBus.Properties.PropertyChanged signal, all
relevant clients will share a single ObjectProxy since they share
the same path and interface; the actual destination client for the
signal is determined by its arguments.
This means that we must support multiple signal handlers for a single
object proxy, the previous fix of replacing with the latest was not
sufficient for this case.
Due to issue 223483, this is not a complete fix. Property objects
coming and going will leave signal handlers in the ObjectProxy with
NULLd weak pointer references - they will be harmless, but use up
memory.
BUG=234380
TEST=dbus_unittests
R=satorux@chromium.org
Review URL: https://codereview.chromium.org/14333009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195953 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
string_piece.h was moved into base/strings/ in r191206 -
https://chromiumcodereview.appspot.com/12982018/
TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/14272007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194693 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ownership in comments.
Replaces Response* with scoped_ptr<Response> in dbus code and its related code.
BUG=163231
TEST=no regression / no behavior changes
Review URL: https://chromiumcodereview.appspot.com/12092061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181266 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add more assertions and a callback to check the result of RequestOwnership.
Original test can hang when test_service2_ tries to acquire the ownership before D-Bus recognizes test_service_'s disconnection.
In that situation, test_service2_ cannot own the name and cannot send a message.
BUG=158689
TEST=unittests
Review URL: https://chromiumcodereview.appspot.com/11358111
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167649 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=158887
R=satorux@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11364033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165893 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The CL does the following:
- Add a match rule for NameOwnerChanged signal from org.freedesktop.DBus.
- Update the owner of the well-known bus name when a NameOwnerChanged comes.
- Call GetNameOwner method to update the latest if ObjectProxy instance does not know the owner.
- Verify the sender of the signal and reject the unknown senders.
- Add UMA_HISTOGRAM_COUNTS "DBus.RejectedSignalCount" for rejected signals.
and a unittest.
BUG=140938
TEST=manual, unittests
Review URL: https://chromiumcodereview.appspot.com/11199007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164597 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To make it easier to investigate method call failures.
BUG=126217
TEST=run EndToEndAsyncTest.Timeout and confirm the error message is changed ("org.chromium.TestInterface.SlowEcho" is now included):
BEFORE
[ RUN ] EndToEndAsyncTest.Timeout
[24410:24410:0530/105557:701377078661:ERROR:object_proxy.cc(456)] Failed to call method: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
AFTER
[ RUN ] EndToEndAsyncTest.Timeout
[24959:24959:0530/110437:701896995336:ERROR:object_proxy.cc(462)] Failed to call method: org.chromium.TestInterface.SlowEcho: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Review URL: https://chromiumcodereview.appspot.com/10456030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139745 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add CallMethodWithErrorCallback
Add EndToEndAsyncTest.BrokenBus
Fix leak in StartAsyncMethodCall
BUG=chromium-os:27899
TEST=dbus_unittests --gtest_filter="EndToEndAsyncTest.*"
Review URL: https://chromiumcodereview.appspot.com/10121005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133140 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=Can browse chromeos://cryptohome
Review URL: https://chromiumcodereview.appspot.com/9891001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129565 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since dbus::ObjectProxy is silently cached, with no way to invalidate,
it's possible that individual instances of objects will come and go
using the same underlying object proxy. i.e. dbus::PropertySet
These will need to change the signal callbacks to be bound to their
own instance, so the current behaviour of failing in this case with
a log message is pessimal.
Change dbus::ObjectProxy to overwrite the existing signal callbacks
with the new ones on repeated calls, rather than preserve the first.
BUG=chromium-os:28064
TEST=unit test included, and we receive property notifications on devices after connection now
Change-Id: Ic4ae092163a364c53bdfcf88f4ce8f74b110b5cb
R=satorux@chromium.org
Review URL: http://codereview.chromium.org/9808001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128100 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error messages like "Requested to remove an unknown match rule:
type='signal', interface='...'" were emitted at shutdown of Bus
object if an object proxy was connected to more than one signal of
the same interface.
TEST=changed the end_to_end_async_unittest to reproduce this bug, and confirm that the error messages were gone after fixing object_proxy.{cc,h}
BUG=chromium-os:23382
Review URL: http://codereview.chromium.org/8681002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111423 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
jingle, and media.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8511045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109998 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can be used when the caller is not interested in the response
from the D-bus method.
BUG=none
TEST=added a unit test
Review URL: http://codereview.chromium.org/8536007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109598 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They should own Bus as scoped_refptr, rather than raw pointer.
Otherwise, they may reference |bus_| after Bus is deleted.
I know this is convoluted. I'm planning to minimize use of
scoped_refptr from dbus/* but this change is necessary until then.
TEST=run dbus_unittest under valgrind and confirm no memory leaks
BUG=chromium-os:21379
Review URL: http://codereview.chromium.org/8201023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105222 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
base::Bind() used to be unable to handle opaque type pointers, but the
limitation was fixed in crrev.com/103627.
BUG=crosbug.com/21166
TEST=build and run dbus_unittests
Review URL: http://codereview.chromium.org/8124002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103881 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- DBus.SyncMethodCallTime: time spent to perform synchronos method calls
- DBus.AsyncMethodCallTime: time spent to perform asynchronos method calls
- DBus.SyncMethodCallSuccess: success ratio of synchronous method calls
- DBus.AsyncMethodCallSuccess: success ratio of asynchronous method calls
- DBus.ExportedMethodHandleTime: time spent to handle calls to export methods
- DBus.ExportedMethodHandleSuccess: success ratio of the exported method calls
- DBus.SignalHandleTime: time spent to handle signals
- DBus.SignalSendTime: time spent to send signals
BUG=chromium:90036
TEST=dbus_unittests
Review URL: http://codereview.chromium.org/7824054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99811 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Prohibit to instantiate Message class.
Rationale: this is not corresponding to any D-Bus message types.
- Get rid of Message::reset_raw_message()
Rationale: this was breaking encapsulation. For instance, It was possible
to inject a DBUS_MESSAGE_TYPE_ERROR raw message to a MethodCall message,
which should not be allowed.
- Prohibit to instantiate Response/ErrorResponse with NULL raw message.
Rationale: Message objects should be backed up by valid raw messages.
- Change Object::CallMethodAndBlock() to return Response*.
Rationale: the original API requred a Response object with raw_message_ set
to NULL, which we no longer allow.
- Add message_type header to ToString().
BUG=90036
TEST=dbus_unittests
Review URL: http://codereview.chromium.org/7709009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97983 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjectProxy is used to receive signals from the remote object.
ExportedObject is used to send signals from the exported object.
Note that signals are asynchronos so we don't have a test in
end_to_end_sync_unittest.cc
BUG=90036
TEST=run unit tests
Review URL: http://codereview.chromium.org/7655033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97831 0039d316-1c4b-4281-b951-d872f2087c98
|
|
ObjectProxy is used to access remote objects.
ExportedObject is used to export objects to other D-Bus
BUG=90036
TEST=run unit tests. The code is not yet used in Chrome.
Review URL: http://codereview.chromium.org/7491029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97204 0039d316-1c4b-4281-b951-d872f2087c98
|