summaryrefslogtreecommitdiffstats
path: root/dbus
Commit message (Collapse)AuthorAgeFilesLines
* disable flaky dbus_unittests SignalSenderVerificationTest.TestOwnerChangescottmg@chromium.org2012-11-061-1/+1
| | | | | | | | | | TBR=haruki@chromium.org BUG=159639 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11374002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166234 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Make it possible to build as shared_library.tfarina@chromium.org2012-11-0511-22/+83
| | | | | | | | | | 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
* Call dbus_bus_register at the beginning of connection.nona@chromium.org2012-11-021-0/+13
| | | | | | | | | | | | | | | According to dbus specification in "Message Bus Messages" section (http://dbus.freedesktop.org/doc/dbus-specification.html), "Before an application is able to send messages to other applications it must send the org.freedesktop.DBus.Hello message to the message bus to obtain a unique name. " To meets this specification, we should call dbus_bus_register function which call org.freedesktop.DBus.Hello. For the dbus session or system bus, this function is called in dbus_bus_get function. BUG=159088 TEST=ran dbus_unittests Review URL: https://chromiumcodereview.appspot.com/11312036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165641 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Everybody can include from src/base/.tfarina@chromium.org2012-10-311-2/+1
| | | | | | | | | R=satorux@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/11343022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165178 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Reuse is_set() function from ScopedDBusError API.tfarina@chromium.org2012-10-292-3/+3
| | | | | | | | | 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
* Add sender verification of D-Bus signals.haruki@chromium.org2012-10-296-17/+365
| | | | | | | | | | | | | | | | | | 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
* Remove all the "set noparent" directivesdpranke@chromium.org2012-10-191-1/+0
| | | | | | | | | | | | | Now that OWNERS supports per-file owners, we can limit the scope of the top-level wildcard to just DEPS, and make darin and ben owners for everything else and remove the broad use of "set noparent". R=ben@chromium.org, darin@chromium.org BUG=88315 Review URL: https://codereview.chromium.org/11191038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163069 0039d316-1c4b-4281-b951-d872f2087c98
* DBus: declare property specializationskeybuk@chromium.org2012-09-211-0/+60
| | | | | | | | | | | | | Without declaring the property specializations in the header file, the compiler can sometimes generate default constructors that don't initialize the variables correctly. BUG=none TEST=unit_tests pass Review URL: https://chromiumcodereview.appspot.com/10963037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158105 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Fix clang warnings about missing virtual and OVERRIDE annotations.tfarina@chromium.org2012-08-301-3/+3
| | | | | | | | | BUG=115047 TBR=satorux@chromium.org Review URL: https://chromiumcodereview.appspot.com/10900041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154116 0039d316-1c4b-4281-b951-d872f2087c98
* bluetooth: Create stub manager, adapter and device.keybuk@chromium.org2012-08-152-5/+20
| | | | | | | | | | | | | | | | | | | | These stub classes are used when building Chrome on Linux with chromeos=1. They allow sufficient UI to work to show a Bluetooth adapter, enable and disable it, and show an unconnected fake device associated with it. This can be trivially extended to provide all manner of fake Bluetooth information for UI development. BUG=chromium-os:28555 TEST=out/Debug/chrome Change-Id: I7af28be76355fad735389aaf2fa499d0a8dfd76b Review URL: https://chromiumcodereview.appspot.com/10823301 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151621 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2012-07-251-1/+1
| | | | | | | | | | | | | | CID_COUNT=12 CID=104349,104361,104373,104374,104399,104420,104421,104422,104466,104476, 104532,104538 BUG=none TEST=none R=groby TBR=brettw,satorux,mnissler Review URL: https://chromiumcodereview.appspot.com/10833006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148430 0039d316-1c4b-4281-b951-d872f2087c98
* Expose functionality to tests.davemoore@chromium.org2012-07-253-14/+22
| | | | | | | | | | | Second try of https://chromiumcodereview.appspot.com/10815083 BUG=None TEST=None TBR=satorux Review URL: https://chromiumcodereview.appspot.com/10833011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148382 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 148351 - Make dbus file descriptor check dynamicdavemoore@chromium.org2012-07-252-19/+13
| | | | | | | | | | | | | | | Without this change cros builds from outside the chroot can't run tracing code. BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10815083 TBR=davemoore@chromium.org Review URL: https://chromiumcodereview.appspot.com/10822016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148353 0039d316-1c4b-4281-b951-d872f2087c98
* Make dbus file descriptor check dynamicdavemoore@chromium.org2012-07-252-13/+19
| | | | | | | | | | | | Without this change cros builds from outside the chroot can't run tracing code. BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10815083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148351 0039d316-1c4b-4281-b951-d872f2087c98
* Marking BusTest.UnregisterExportedObject as flakyjochen@chromium.org2012-07-181-1/+2
| | | | | | | | | | BUG=137846 TEST=none TBR=keybuk@chromium.org Review URL: https://chromiumcodereview.appspot.com/10797009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147234 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-1114-14/+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
* Switch to TimeDelta interface for TestTimeouts in dbus code.tedvessenes@gmail.com2012-07-091-3/+1
| | | | | | | | | | R=keybuk@chromium.org BUG=108171 Review URL: https://chromiumcodereview.appspot.com/10735022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145714 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: move logic from Property<> to PropertySetkeybuk@chromium.org2012-06-282-149/+147
| | | | | | | | | | | | | | | | | | | | | | Rather than implement Get() and Set() in dbus::Property<> move the code into dbus::PropertySet and pass a pointer to the property to operate on from the wrapper call. The advange of this way of doing things is that it's much easier to make subclasses, since you only need to subclass dbus::PropertySet; and ths makes it possible to mock. BUG=chromium-os:28555 TEST=dbus_unittests Change-Id: I760ca608d1e0a17422c11e0115c053d98be33fe0 R=satorux@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144756 0039d316-1c4b-4281-b951-d872f2087c98
* Add a CONNECT_REQUESTED state to Network ConnectionState.stevenjb@google.com2012-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | When a connection request is made, Chrome now sets the state to CONNECT_REQUESTED and ignores "Idle" state updates while in that state. This informs the UI to show "connecting" icons / text until the connection attempt succeeds or fails. Also: Don't update the network icon while scanning. Also: includes a bunch of logging changes for improved debugging. This alos fixes the mock expectations so that browser_tests should pass. Original CL: https://chromiumcodereview.appspot.com/10554013 BUG=125121 TEST=See issue, test connecting between networks, UI should behave correctly. For chrome/browser/chromeos/gdata: TBR=gspencer@chromium.org, tbarzic@chromium.org Review URL: https://chromiumcodereview.appspot.com/10579022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143072 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 142847 - Add a CONNECT_REQUESTED state to Network ConnectionState.kkania@chromium.org2012-06-191-1/+0
| | | | | | | | | | | | | | | | | | | When a connection request is made, Chrome now sets the state to CONNECT_REQUESTED and ignores "Idle" state updates while in that state. This informs the UI to show "connecting" icons / text until the connection attempt succeeds or fails. Also: Don't update the network icon while scanning. Also: includes a bunch of logging changes for improved debugging. BUG=125121 TEST=See issue, test connecting between networks, UI should behave correctly. For chrome/browser/chromeos/gdata: TBR=tbarzic@chromium.org Review URL: https://chromiumcodereview.appspot.com/10554013 TBR=stevenjb@google.com Review URL: https://chromiumcodereview.appspot.com/10536197 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142889 0039d316-1c4b-4281-b951-d872f2087c98
* Add a CONNECT_REQUESTED state to Network ConnectionState.stevenjb@google.com2012-06-181-0/+1
| | | | | | | | | | | | | | | | When a connection request is made, Chrome now sets the state to CONNECT_REQUESTED and ignores "Idle" state updates while in that state. This informs the UI to show "connecting" icons / text until the connection attempt succeeds or fails. Also: Don't update the network icon while scanning. Also: includes a bunch of logging changes for improved debugging. BUG=125121 TEST=See issue, test connecting between networks, UI should behave correctly. For chrome/browser/chromeos/gdata: TBR=tbarzic@chromium.org Review URL: https://chromiumcodereview.appspot.com/10554013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142847 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Add test_server.cc used for manual testing.satorux@chromium.org2012-06-072-0/+46
| | | | | | | | | | | | | | The server was used for investigating crbug.com/126217. end_to_end_async_unittest.cc runs both the server and the client in the same process. It's useful to have a server program that runs as a separate process. BUG=none TEST=out/Debug/dbus_test_server; (from another terminal) dbus-send --print-reply --type=method_call --dest=org.chromium.TestService /org/chromium/TestObject org.chromium.TestInterface.SlowEcho string:hello Review URL: https://chromiumcodereview.appspot.com/10540032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141023 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Truncate strings in dbus::Message::ToString() if too longsatorux@chromium.org2012-06-073-2/+28
| | | | | | | | | | | To prevent long strings from polluting logs. BUG=131261 TEST=added a unit test Review URL: https://chromiumcodereview.appspot.com/10537033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141021 0039d316-1c4b-4281-b951-d872f2087c98
* Explicitly CHECK arguments in dbus::MessageWriter::AppendString/ObjectPathhashimoto@chromium.org2012-06-057-0/+109
| | | | | | | | | | | | Add dbus::IsStringValidObjectPath() and dbus::ObjectPath::IsValid() BUG=129335 TEST=dbus_unittests Review URL: https://chromiumcodereview.appspot.com/10502011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140489 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Fix a subtle butterfly-effect bug in handling incoming messagessatorux@chromium.org2012-06-022-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* dbus: Fix a crash in dbus_unittests that happens on Ubuntu 11.10satorux@chromium.org2012-06-011-1/+1
| | | | | | | | | | | AppendObjectPath() can crash on some systems if an invalid object path is given. TEST=run dbus_unittests on Ubuntu 11.10 BUG=none Review URL: https://chromiumcodereview.appspot.com/10440131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139977 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Fix a bunch of memory leaks in dbus_unittestssatorux@chromium.org2012-05-312-27/+49
| | | | | | | | | BUG=none TEST=time tools/valgrind/valgrind.sh --leak-check=full out/Release/dbus_unittests Review URL: https://chromiumcodereview.appspot.com/10454083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139747 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: Include method names in error messages for method call failuressatorux@chromium.org2012-05-312-7/+23
| | | | | | | | | | | | | | | | | | | 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
* Change setters of dbus::Message to return false instead of aborting on errorshashimoto@chromium.org2012-05-237-47/+148
| | | | | | | | | | | | 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
* RefCounted types should not have public destructors, Linux fixesrsleevi@chromium.org2012-05-183-3/+9
| | | | | | | | | | 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
* dbus: revamp fd passing support for i/o restrictionssleffler@chromium.org2012-05-104-20/+51
| | | | | | | | | | | | | | Encapsulate file descriptor validity checking and status in the companion FileDescriptor class so callers can do descriptor checking in a context where i/o is allowed. Update the debug daemon client support to validate the pipe descriptors in a worker thread so it is not done on the UI thread. BUG=126142 TEST=new unit tests + collect trace data on chrome os and verify no assert is triggered Review URL: https://chromiumcodereview.appspot.com/10382021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136331 0039d316-1c4b-4281-b951-d872f2087c98
* DBus: Remove 'return' from void methods.jhawkins@chromium.org2012-04-271-5/+5
| | | | | | | | | | | | BUG=none TEST=none R=groby TBR=keybuk Review URL: http://codereview.chromium.org/10241003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134332 0039d316-1c4b-4281-b951-d872f2087c98
* Add more allow-wait suppressions on cros.jam@chromium.org2012-04-261-0/+3
| | | | | | | TBR=brettw Review URL: https://chromiumcodereview.appspot.com/10198034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134132 0039d316-1c4b-4281-b951-d872f2087c98
* Add MockObjectProxy::CallMethodWithErrorCallbackhashimoto@chromium.org2012-04-241-0/+4
| | | | | | | | | BUG=chromium-os:27899 TEST=build success Review URL: https://chromiumcodereview.appspot.com/10168027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133608 0039d316-1c4b-4281-b951-d872f2087c98
* Add dbus::ObjectProxy::CallMethodWithErrorCallbackhashimoto@chromium.org2012-04-203-11/+227
| | | | | | | | | | | | | 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
* Extends dbus module to accept user specified addresses.nona@chromium.org2012-04-192-7/+38
| | | | | | | | | | | | | | To connect ibus-daemon, needs to extend dbus module to accept user specified addresses. The ibus provides text inputting features and it is already used in Chrome OS. The ibus uses dbus protocol but using the ibus-daemon instead of the dbus-daemon. BUG=chromium-os:26334 TEST=ran dbus_unittests Review URL: http://codereview.chromium.org/10021044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132933 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: add support for passing file descriptorssleffler@chromium.org2012-03-307-0/+171
| | | | | | | | | | | | | | Add support for passing file descriptors in messages. BUG=chromium-os:27809 TEST=run unit tests Change-Id: I48e52e52ea1e1a4b96bb0dbec7242337e5871510 Review URL: http://codereview.chromium.org/9700072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129801 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Fix memory leak in blocking Cryptohome method callhashimoto@chromium.org2012-03-291-0/+1
| | | | | | | | | 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
* Checked the return values of function calls.khorimoto@chromium.org2012-03-281-4/+8
| | | | | | | | | | CID=103653,103654,103655 BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/9863050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129454 0039d316-1c4b-4281-b951-d872f2087c98
* Correcting the copy right message for this filerharrison@chromium.org2012-03-271-1/+1
| | | | | | | | | | | | | I used a ChromeOS protobuf definition as a template and I didn't update the copyright information. steveblock@ caught this and asked me to correct it. BUG=chromium:112127 TEST=None, this a comment change. It has no functional effect. Review URL: http://codereview.chromium.org/9834013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129250 0039d316-1c4b-4281-b951-d872f2087c98
* Add dbus::AppendBasicTypeValueDatahashimoto@chromium.org2012-03-243-24/+151
| | | | | | | | | | BUG=chromium-os:16557 TEST=dbus_unittests --gtest_filter="ValuesUtilTest.Append*" Review URL: http://codereview.chromium.org/9826044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128771 0039d316-1c4b-4281-b951-d872f2087c98
* READABILITY for Keybukkeybuk@chromium.org2012-03-223-34/+36
| | | | | | | | | | | | BUG=none TEST=dbus_unittests & emerge chromeos-chrome change-Id: I111b9e60a2c6c35edd9e0ea9f6976928c6c6474b Review URL: http://codereview.chromium.org/9407019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128286 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: clear array values before reading from variantkeybuk@google.com2012-03-214-11/+108
| | | | | | | | | | | | | | | | | | PopArrayFromVariant() appends values to the existing value, rather than clearing first like I expected, so using this without clear() first means the property value accumulates all values and never loses them. BUG=none TEST=unit test included Change-Id: Ie392a89190f4ad8570a905f24b2f446e1f2bed81 R=satorux@chromium.org Review URL: https://chromiumcodereview.appspot.com/9809001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128108 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: don't fail when reconnecting object signalskeybuk@chromium.org2012-03-213-8/+61
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a new 'run_all_unittests' target in baseakalin@chromium.org2012-03-211-1/+1
| | | | | | | | | | | | | Make all the places that include run_all_unittests.cc manually depend on this target instead. BUG= TEST= Review URL: http://codereview.chromium.org/9691067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127911 0039d316-1c4b-4281-b951-d872f2087c98
* Fix dbus::PopDataAsValue's behavior when a dictionary's keys including dotshashimoto@chromium.org2012-03-202-2/+46
| | | | | | | | | | BUG=None TEST=dbus_unittests --gtest_filter="ValuesUtilTest.PopDictinoaryWithDottedStringKey" Review URL: http://codereview.chromium.org/9732029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127727 0039d316-1c4b-4281-b951-d872f2087c98
* Add dbus::PopDataAsValuehashimoto@chromium.org2012-03-164-0/+534
| | | | | | | | | | BUG=chromium-os:16557 TEST=dbus_unittests --gtest_filter="ValuesUtilTest.*" Review URL: http://codereview.chromium.org/9702094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127287 0039d316-1c4b-4281-b951-d872f2087c98
* dbus: allow unregistering of exported objectskeybuk@chromium.org2012-03-143-0/+73
| | | | | | | | | | | | | | | | Not all objects are permanent, some are transient and if we ever re-use the object path, we want a new instance of the exported object to be created rather than re-use an existing one. BUG=chromium-os:21320 TEST=dbus_unittests and included change to agent service provider Change-Id: I09882bbe2f70356182ac301c4260473051333424 Review URL: http://codereview.chromium.org/9691025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126527 0039d316-1c4b-4281-b951-d872f2087c98
* Convert uses of int ms to TimeDelta in dbus.tedvessenes@gmail.com2012-03-115-11/+12
| | | | | | | | | | 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: fix base class of ErrorResponsekeybuk@chromium.org2012-03-112-3/+4
| | | | | | | | | | | | | | | dbus::ErrorResponse needs to be a subclass of dbus::Response otherwise you can't pass it to a dbus::ExportedObject::ResponseSender. BUG=none TEST=my code now compiles Change-Id: I1efba7c2cd9aaed937cac75133ab6b695aeac63b Review URL: http://codereview.chromium.org/9675002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126053 0039d316-1c4b-4281-b951-d872f2087c98