Add UpdateEngine.Attempt.ConnectionType metric.

This adds a new metric so we can track the how the device is connected
to the Internet when an attempt starts.

BUG=chromium:358339
TEST=New unit test + unit tests pass.

Change-Id: Ic5c2f50e2396e6baa288aca70906f7112ef7bca9
Reviewed-on: https://chromium-review.googlesource.com/192864
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
diff --git a/payload_state.h b/payload_state.h
index 1035404..d0211c5 100644
--- a/payload_state.h
+++ b/payload_state.h
@@ -8,6 +8,7 @@
 #include <base/time/time.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
+#include "update_engine/metrics.h"
 #include "update_engine/payload_state_interface.h"
 #include "update_engine/prefs_interface.h"
 
@@ -502,6 +503,9 @@
   // The monotonic time when the attempt was started.
   base::Time attempt_start_time_monotonic_;
 
+  // The connection type when the attempt started.
+  metrics::ConnectionType attempt_connection_type_;
+
   DISALLOW_COPY_AND_ASSIGN(PayloadState);
 };