commit | 3fbf8bd4508f35cc3aec35e8ec562dd37eeb282c | [log] [tgz] |
---|---|---|
author | Ben Chan <benchan@chromium.org> | Sat Jun 07 20:49:52 2014 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Wed Jun 11 22:09:58 2014 +0000 |
tree | 54884b0d25bb45c7b9537a9eb37700015ea6cda6 | |
parent | f55615c57d6d4474ecf6dec4553f0381ad02860d [diff] |
shill: Clean up HookTable implementation. This CL cleans up the HookTable implementation as follows: 1. Replace base::Callback<void(const Error &)> with shill::ResultCallback. 2. Make HookTable::AllActionsComplete() a const method. 3. Add verbose logging to HookTable::Add() and HookTable::Remove(). 4. Remove iterator-based for-loop with range-based for-loop. 5. Simplify HookTable::Remove() by calling std::map::erase() to remove an entry by key. 6. Fix some typos. 7. Rename some callback variable names to be more consistent with other shill code. 8. Use std::map::emplace() instead of std::map::insert(). BUG=None TEST=Tested the following: 1. `FEATURES=test emerge-$BOARD platform2` 2. Verify that shill executes the termination action upon suspend on a DUT with a cellular device. Change-Id: I5bec3c53ba7cdb9ac5a3f7a5d1f3d765e6402865 Reviewed-on: https://chromium-review.googlesource.com/203191 Reviewed-by: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org>