History log of /system/connectivity/shill/result_aggregator.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 03-Sep-2015 Peter Qiu <zqiu@google.com> License shill to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi, the NOTICE was added with a copy
of the Apache2 license and MODULE_LICENSE_* file was added.

BUG=23587594
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/result_aggregator.h
1a212a6b98b22ad1d69652bb26a9e94138635476 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: Top-level files n-v: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: I8bd6f66ea185ca3a2687986f6f2fd99be957dffe
Reviewed-on: https://chromium-review.googlesource.com/278070
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/result_aggregator.h
fbe8d2b361a51e89fcf1207050729be86a961f5f 16-Sep-2014 Samuel Tan <samueltan@chromium.org> shill: use ResultAggregator for device suspend actions

Use ResultAggregator to have manager asynchronously execute each device's
suspend actions before a system suspend takes place. The previous
implementation executed these suspend actions synchronously and used
a HookTable for other termination/suspend actions. This implementation does
not change the use of the HookTable for termination action, but
uses only a ResultAggregator to wait for asynchronous suspend actions.

Manager now creates a ResultAggregator in OnSuspendImminent() and passes
a callback to every device as an argument to OnBeforeSuspend(). Each
device then performs synchronous actions and/or posts asychronous tasks
in OnBeforeSuspend(), and is responsible for running the received
callback after completing these actions.

Also:
- rename RetrySetWakeOnPacketConnection to RetryApplyWakeOnWiFiSettings
for consistency.
- add detailed documentation to result_aggregator.h explaining and
stating the conventions to be followed when using ResultAggregator.
- remove TerminationActionReason from metrics and add separate
Termination action and Suspend action metrics in preparation for
complete splitting of termination and suspend action codepaths.

BUG=chromium:390668
CQ-DEPEND=CL:223098
TEST='P2_TEST_FILTER="shill::*" FEATURES="test" USE="clang asan"
emerge-samus shill' succeeds.

Change-Id: I5a9d9039669a822e0cb82bf6784522f1ce86a966
Reviewed-on: https://chromium-review.googlesource.com/218551
Reviewed-by: Samuel Tan <samueltan@chromium.org>
Tested-by: Samuel Tan <samueltan@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
/system/connectivity/shill/result_aggregator.h
7c1aacb5cb9b6f960fe7702f40a0c7715e7b12b3 16-Sep-2014 Samuel Tan <samueltan@chromium.org> shill: add timeout support for ResultAggregator

Add a new ResultAggregator constructor, which takes a
callback, event dispatcher, and timeout duration as
parameters. If the operation does not complete (i.e.
ResultAggregator is not destructed) within the specified
time duration, ReusltAggregator will invoke the callback
with the error kOperationTimeout.

BUG=chromium:414524
TEST='P2_TEST_FILTER="shill::* FEATUERS="test" USE="clang asan"
emerge-squawks platform2' succeeds.

Change-Id: I057cd7c1b4864283507952d2ef6a18255fcda32e
Reviewed-on: https://chromium-review.googlesource.com/218328
Reviewed-by: Samuel Tan <samueltan@chromium.org>
Tested-by: Samuel Tan <samueltan@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
/system/connectivity/shill/result_aggregator.h
cc67c52a2c00f90e877971d552208dd99825d84e 03-Sep-2014 Ben Chan <benchan@chromium.org> shill: Include base/macros.h instead of base/basictypes.h

shill no longer uses the integer types from base/basictypes.h. It should
simply include base/macros.h for the DISALLOW_COPY_AND_ASSIGN macro
instead.

BUG=None
TEST=`USE='cellular wimax' FEATURES=test emerge-$BOARD platform2`

Change-Id: I9b350c1bd9eff88e2c87de2ef8d607e90049e102
Reviewed-on: https://chromium-review.googlesource.com/216055
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/result_aggregator.h
46c27cc8f83428ce6b290c4d92e73fbcad899457 11-Jul-2013 mukesh agrawal <quiche@chromium.org> shill: fix DisableTechnology with multiple devices of a technology

For some Devices (e.g. Cellular), EnableTechnology and DisableTechnology are
asynchronous operations. Previously, shill would invoke the completion
callback for these operations, as each Device completed its work.
Unsurprisingly, this would fail on the second device.

Fix this by introducing ResultAggregator, which aggregates the results from
multiple asynchronous operations. Now, if the Devices process
EnableTechnology or DisableTechnology asynchronously, then we will return
only after the final Device has completed the request.

While there: merge the code for EnableTechnology and DisableTechnology,
since the methods were symmetric, but non-trivial.

Note that one ugly case remains: if one or more Devices fails immediately,
but others all succeed asynchronously, we will not report any failure.

BUG=chromium:258206
TEST=new unit tests, manual

Manual testing
--------------
- grab a device with two cellular modems (e.g. on-board and usb)
- disable cellular from the ash tray
-> shill should not crash
- enable cellular from the ash tray
-> shill should not crash

Change-Id: I09f94326342900e4cee6929d9edbe5cf735c92d7
Reviewed-on: https://gerrit.chromium.org/gerrit/62016
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/result_aggregator.h