commit | bdb02e664f79f29b3bce9be4ca05c82d8ede697f | [log] [tgz] |
---|---|---|
author | Paul Stewart <pstew@chromium.org> | Wed Feb 22 16:24:33 2012 -0800 |
committer | Gerrit <chrome-bot@google.com> | Thu Feb 23 06:58:11 2012 -0800 |
tree | 38ddcea4237562f5c7749b45c6d7eb8b5c4e2b28 | |
parent | d4ef677ad36ef34f59529af557adbe77b2c29c80 [diff] |
shill: Prepare DNSClient and HTTPRequest for destroy-on-callback Refactor both classes so that it's okay for the callback to destroy the object (i.e., do nothing to the object after the callback is called). As a part of this, clean up some of the callback semantics, so, for example, DNSClient callbacks are passed an Error reference and an IP Address instead of having to use a getter. Additionally remove the blemish where an immediate timeout in Start() both returned failure and called the callback. BUG=chromium-os:23318 TEST=Fixed unit tests, manual Change-Id: Ib7787a7aa6f7f3d00caa539d6b0221ff5f3d60b3 Reviewed-on: https://gerrit.chromium.org/gerrit/16435 Commit-Ready: Paul Stewart <pstew@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>