shill: Improves logging for scan.
Looking at the logs, it's hard to tell why shill chooses to do a scan.
This CL adds a 'reason' (which is really the name of the calling
function) to Scan calls to make it clear why we're scanning.
BUG=None
TEST=unittest
Change-Id: Ibd128625681fc5d61d359b60953bb78d89e97dfe
Reviewed-on: https://gerrit.chromium.org/gerrit/63357
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
diff --git a/mock_device.h b/mock_device.h
index dc9060b..9e274f5 100644
--- a/mock_device.h
+++ b/mock_device.h
@@ -33,7 +33,8 @@
MOCK_METHOD3(SetEnabledPersistent, void(bool enable,
Error* error,
const ResultCallback &callback));
- MOCK_METHOD2(Scan, void(Device::ScanType scan_type, Error *error));
+ MOCK_METHOD3(Scan, void(Device::ScanType scan_type, Error *error,
+ const std::string &reason));
MOCK_METHOD1(Load, bool(StoreInterface *storage));
MOCK_METHOD1(Save, bool(StoreInterface *storage));
MOCK_METHOD0(DisableIPv6, void());