shill: EthernetService: Fix auto-connect-by-default
Fix a nasty typo which prevented EthernetService from overriding
the parent class IsAutoConnectByDefault. Add unit tests. Add
belt-and-suspenders by also overriding the SetAutoConnect RPC
settter to prevent AutoConnect from being set over the control
interface.
BUG=chromium-os:32709
TEST=Unit tests
Change-Id: I683333b915cb747ccb241512f66d2fb3f1efca3a
Reviewed-on: https://gerrit.chromium.org/gerrit/30557
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/ethernet_service.h b/ethernet_service.h
index 599b1cb..82c156d 100644
--- a/ethernet_service.h
+++ b/ethernet_service.h
@@ -29,7 +29,8 @@
// ethernet_<MAC>
virtual std::string GetStorageIdentifier() const;
- virtual bool IsAutoDetectByDefault() const { return true; }
+ virtual bool IsAutoConnectByDefault() const { return true; }
+ virtual void SetAutoConnect(const bool &connect, Error *error);
private:
static const char kServiceType[];