| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate callers of {MessageLoop,Thread}::message_loop_proxy() to
{MessageLoop,Thread}::task_runner(). Since the types at the call sites
have already been updated, this is just a bulk rename.
BUG=465354
TBR=armansito@chromium.org
Review URL: https://codereview.chromium.org/1179163002
Cr-Commit-Position: refs/heads/master@{#334840}
|
|
|
|
|
|
|
|
|
|
|
|
| |
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}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Google C++ style guide states:
Explicitly annotate overrides of virtual functions or virtual
destructors with an override or (less frequently) final specifier.
Older (pre-C++11) code will use the virtual keyword as an inferior
alternative annotation. For clarity, use exactly one of override,
final, or virtual when declaring an override.
To better conform to these guidelines, the following constructs have
been rewritten:
- if a base class has a virtual destructor, then:
virtual ~Foo(); -> ~Foo() override;
- virtual void Foo() override; -> void Foo() override;
- virtual void Foo() override final; -> void Foo() final;
This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.
Several formatting edits by clang-format were manually reverted, due to
mangling of some of the more complicate IPC macros.
BUG=417463
Review URL: https://codereview.chromium.org/802213003
Cr-Commit-Position: refs/heads/master@{#309710}
|
|
|
|
|
|
|
|
| |
BUG=432980
Review URL: https://codereview.chromium.org/746373003
Cr-Commit-Position: refs/heads/master@{#307419}
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, remove the deprecated base::MessageLoop::Run() calls
everywhere in dbus unittests.
BUG=365669
R=armansito@chromium.org
Review URL: https://codereview.chromium.org/523623003
Cr-Commit-Position: refs/heads/master@{#293113}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
extensions/, google_apis/, gpu/, ipc/, jingle/.
BUG=260807
TEST=none
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19607005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212157 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
write dbus:: everywhere. Remove some other dbus:: usages in the dbus namespace.
Review URL: https://chromiumcodereview.appspot.com/16012018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206010 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=236029
R=keybuk@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14386016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197629 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.
BUG=none
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020
Review URL: https://codereview.chromium.org/13145003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6.
Revert "Fix build after r193020."
This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a.
Revert "Really fix build after r193020."
This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.
BUG=none
Review URL: https://codereview.chromium.org/13145003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://chromiumcodereview.appspot.com/12255043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183362 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the connection with dbus-daemon is closed, callback function set with
SetDisconnectedCallback will be called.
BUG=None
TEST=ran dbus_unittests
Review URL: https://chromiumcodereview.appspot.com/12224139
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182736 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libdbus does bookkeeping of the number of bytes in the incoming message
queue implicitly, and asks client code (chrome) to stop monitoring the
underlying socket, as soon as it exceeds a certain number, which is set
to 63MB as of now.
This caused a DCHECK failure (and could break the D-Bus message
dispatching with Release builds) because the bookkeeping happned on the
UI thread via a seemingly harmless call to dbus_message_unref(), but we
cannot stop monitoring from UI thread.
This patch fixes (or works around) the problem by deleting incoming
messages on D-Bus thread, so the bookkeeping is done on D-Bus thread.
Note that we don't have to change exported_object.cc, as the method call
message is deleted on the D-Bus thread in
ExportedObject::OnMethodCompleted()
The following is a stacktrace of the DCHECK failure. Here,
dbus::Response (method reply) is deleted on UI thread, that results
in a call to dbus::Bus::OnToggleWatch, which should only be called on
the D-Bus thread, hence crashed as a DCHECK failure
Backtrace:
base::debug::StackTrace::StackTrace() [0x517972]
logging::LogMessage::~LogMessage() [0x4b3a57] <- crashing because we are not
base::ThreadRestrictions::AssertIOAllowed() [0x4f0b35]
dbus::Bus::AssertOnDBusThread() [0x45ceb6] <- checking if we are on the right thread
dbus::Bus::OnToggleWatch() [0x45d0c1]
dbus::Bus::OnToggleWatchThunk() [0x45d45d] <-- the change is notified.
_dbus_watch_list_toggle_watch [0x7f35e0a15245]
protected_change_watch [0x7f35e09f2eef]
_dbus_connection_toggle_watch_unlocked [0x7f35e09f302e]
check_read_watch [0x7f35e0a1332d] <-- what? why checking socket status here??
socket_live_messages_changed [0x7f35e0a1436c]
live_messages_size_notify [0x7f35e0a11996]
_dbus_counter_adjust [0x7f35e0a0c098]
free_size_counter [0x7f35e0a04423]
_dbus_list_foreach [0x7f35e0a180d9]
dbus_message_cache_or_finalize [0x7f35e0a0446b]
dbus_message_unref [0x7f35e0a05e7e] <-- releasing a message
dbus::Message::~Message() [0x46abbb]
dbus::Response::~Response() [0x470478]
scoped_ptr<>::~scoped_ptr() [0x41e99f]
dbus::ObjectProxy::RunResponseCallback() [0x472095]
BUG=126217
TEST=added unit tests
Review URL: https://chromiumcodereview.appspot.com/10492005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140165 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, we can safely return error for invalid object path and service name.
It still crashes on invalid method name and interface name if we use MethodCall::MethodCall for setting those parameters.
BUG=128967
TEST=dbus_unittests
Review URL: https://chromiumcodereview.appspot.com/10409065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138441 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing behavior, while convenient for debugging, is wrong.
D-Bus will not call any further filter functions once one returns
DBUS_HANDLER_RESULT_HANDLED, in order for the next to be called a
filter must return DBUS_HANDLER_RESULT_NOT_YET_HANDLED if it does
not handle the incoming signal.
We also can't defer this to the signal function since we have to
post that to a different thread, and return values get hard.
Since object proxies are constructed per-path, and match common
interfaces and members, this means signals must be matched on an
object otherwise only the first registered object proxy for any
client will be called, and will be called for all signals.
BUG=chromium-os:27113
TEST=ran unit tests, and manually verified existing code that uses ConnectToSignal
Change-Id: Ia4cbc064dff0421a37fe4c4b7c719acf25eb630c
Review URL: http://codereview.chromium.org/9508005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124357 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should wait for signal connection, for each signal.
Otherwise, 2nd call to OnConnected() may quit the message
loop instead of OnTestSignal().
FWIW, the flakiness was introduced in crrev.com/111423
BUG=106796,107301
TEST=confirm the test no longer fails by: while true; do out/Release/dbus_unittests --gtest_filter=EndToEndAsyncTest.TestSignal || break ; done
Review URL: http://codereview.chromium.org/8907010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114223 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=107301
TEST=none
Review URL: http://codereview.chromium.org/8926009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114166 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=106796
TEST=none
Review URL: http://codereview.chromium.org/8866009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113516 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:23241
TEST=Unit tests and manual testing on device.
Change-Id: Iab009ddbd12dea1e12299ae0ddccd4e430d9cf97
Review URL: http://codereview.chromium.org/8728020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112131 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:23241
TEST=Unit tests and manual testing on device.
Change-Id: I4d665897687030f4ab2379e4f6ddb9b3ebe02af4
Review URL: http://codereview.chromium.org/8637002
TBR=vlaviano@chromium.org
Review URL: http://codereview.chromium.org/8682032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111487 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium-os:23241
TEST=Unit tests and manual testing on device.
Change-Id: I4d665897687030f4ab2379e4f6ddb9b3ebe02af4
Review URL: http://codereview.chromium.org/8637002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111479 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Restricting the sender path makes it impossible to test
signal handling with dbus-send --type=signal, as it uses
"/" as the sender object path.
For now, let's remove the restriction. We can make this restriction
customizable when it becomes necessary.
This is for http://codereview.chromium.org/7862020/
TEST=dbus_unittests
BUG=none
Review URL: http://codereview.chromium.org/7845029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101171 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
This allows us to use BrowserThread::GetMessageLoopProxyForThread() to specify the DBus thread.
Also do a little bit of unrelated comment cleanup.
BUG=90036
Review URL: http://codereview.chromium.org/7800023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99794 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just wanted to remove the blank line in bus.h, but
fixed typos along the way.
BUG=chromium:90036
TEST=dbus_unittests
Review URL: http://codereview.chromium.org/7792049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99006 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add mock_export_object.{cc,h} to dbus.gyp, which were missing.
- Add a comment about shutdown of Bus in bus.h.
- Update mock_unittest.cc to call ShutdownAndBlock().
- Replace DCHECKs with LOG(ERROR)s followed by early exit.
- Add virtual to SetUp() and TearDown() in tests.
- Renamed a member variable to make it clearer.
BUG=chromium:90036
TEST=dbus_unittests
Review URL: http://codereview.chromium.org/7745044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98560 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is to to exercise asynchronos API of ExportedObject.
The asynchronos API is implemented on top the synchronos API,
hence the synchronos API code is also covered.
Along the way, change EndToEndAsyncTest to use the D-Bus thread.
Simplified the test code per phajdan.jr's comments as well.
TEST=dbus_unittests
BUG=90036
Review URL: http://codereview.chromium.org/7671028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97540 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
|