-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prior to importing the DBus interface into the Policy Manager, this removes some clutter and fixes some behaviors. * Switch from using dbus_g_proxy_new_for_name_owner() to using dbus_g_proxy_new_for_name() instead. This has been advised in the past (see chromium:209102) as the _owner version is mostly used for binding to interfaces that do not retain the well-known name. It is not appropriate for our use cases, where the provider inhibits the well-known location constantly, nor is it a good thing given that providers (e.g. Chrome) could get recycled. * More consistent abstraction for variadic DBus functions: (a) We now distinguish between different numbers of input/output arguments by appending these numbers to the names of interface functions (e.g. ProxyCall_3_0 delegates 3 input arguments and zero outputs); (b) We drop G_TYPE arguments and embed them as constants in the delegating code. This makes more sense because these types are constants and depend on the actual values, which are bound to predetermined C/C++ types anyway; (c) It is still possible to override such functions by variating the types of actual arguments (currently not exercised). * The above also shortens the argument list for several DBus interface functions, saving us from needing to prune them to fit in mock methods with a maximum of 10 arguments (as was previously necessary). * Removed an unnecessary #include; better comments; more descriptive argument names. Other notable changes in client code: * Some cleaup in chrome_browser_proxy_resolver.cc, removing unnecessary functions and reverting the proxy reacquisition logic introduced in CL:15693, which is now redundant. BUG=None TEST=Unit tests. Change-Id: I8063bb3e35c34212a8be1ae507834c931ee5a0b0 Reviewed-on: https://chromium-review.googlesource.com/188560 Tested-by: Gilad Arnold <[email protected]> Reviewed-by: David Zeuthen <[email protected]> Reviewed-by: Alex Deymo <[email protected]> Commit-Queue: Gilad Arnold <[email protected]>
- Loading branch information
Gilad Arnold
authored and
chrome-internal-fetch
committed
Mar 10, 2014
1 parent
01ca1fb
commit b752fb3
Showing
6 changed files
with
185 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.