shill: Add support for disable/enable link monitoring through DBUS
This is a per-service setting, with default value set to false
(link monitoring enabled).
BUG=chromium:415367
TEST=unit tests, manual test
Manual Test
1. Get a chrome device, and turn up the logging with
"ff_debug +device" and "ff_debug --level -2".
2. Connect to "GoogleGuest", verify link monitor is enabled
(by default) by examing log file "/var/log/net.log" for following
message "Link Monitor starting".
3. Disable link monitor for "GoogleGuest" with command
"/usr/local/lib/flimflam/test/set-service-property GoogleGuest
LinkMonitorDisable true"
4. Connect to a different network, then connect back to "GoogleGuest".
Verify link monitor is disabled by examing log file
"/var/log/net.log" for following message
"Link Monitor is disabled for the selected service".
CQ-DEPEND=CL:219029
Change-Id: I83aabe035f66eeaa9547a486d4677c7292247561
Reviewed-on: https://chromium-review.googlesource.com/219117
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
diff --git a/mock_service.h b/mock_service.h
index c4f850e..0df41b3 100644
--- a/mock_service.h
+++ b/mock_service.h
@@ -71,6 +71,7 @@
MOCK_METHOD0(ClearExplicitlyDisconnected, void());
MOCK_CONST_METHOD0(is_dns_auto_fallback_allowed, bool());
MOCK_METHOD0(NotifyIPConfigChanges, void());
+ MOCK_CONST_METHOD0(link_monitor_disabled, bool());
// Set a string for this Service via |store|. Can be wired to Save() for
// test purposes.