shill: Add metric to track corrupted profiles
New metric Network.Shill.CorruptedProfile.
BUG=chromium-os:38669
TEST=1. Unit tests
2. Stop shill
Corrupt /var/cache/shill/default.profile by adding junk
Start shill
Verify new metric appears in chrome://histograms
Change-Id: I629ed00884ecd2d2fe90744583bd72bf2e9e6af4
Reviewed-on: https://gerrit.chromium.org/gerrit/43556
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Thieu Le <thieule@chromium.org>
diff --git a/mock_profile.cc b/mock_profile.cc
index 1c36d8e..797d172 100644
--- a/mock_profile.cc
+++ b/mock_profile.cc
@@ -14,14 +14,17 @@
namespace shill {
-MockProfile::MockProfile(ControlInterface *control, Manager *manager)
- : Profile(control, manager, Identifier("mock"), "", false) {
+MockProfile::MockProfile(ControlInterface *control,
+ Metrics *metrics,
+ Manager *manager)
+ : Profile(control, metrics, manager, Identifier("mock"), "", false) {
}
MockProfile::MockProfile(ControlInterface *control,
+ Metrics *metrics,
Manager *manager,
const std::string &identifier)
- : Profile(control, manager, Identifier(identifier), "", false) {
+ : Profile(control, metrics, manager, Identifier(identifier), "", false) {
}
MockProfile::~MockProfile() {}