Measure and send update time to UMA.

BUG=4852
TEST=unit tests, gmerged, force update, looked at about:histograms.

Review URL: http://codereview.chromium.org/2868061
diff --git a/main.cc b/main.cc
index 52ace9a..268bcc0 100644
--- a/main.cc
+++ b/main.cc
@@ -5,10 +5,13 @@
 #include <string>
 #include <tr1/memory>
 #include <vector>
+
 #include <gflags/gflags.h>
 #include <glib.h>
+
 #include "base/command_line.h"
 #include "chromeos/obsolete_logging.h"
+#include "metrics/metrics_library.h"
 #include "update_engine/dbus_constants.h"
 #include "update_engine/dbus_service.h"
 #include "update_engine/update_attempter.h"
@@ -102,8 +105,11 @@
   // Create the single GMainLoop
   GMainLoop* loop = g_main_loop_new(g_main_context_default(), FALSE);
 
+  MetricsLibrary metrics_lib;
+  metrics_lib.Init();
+
   // Create the update attempter:
-  chromeos_update_engine::UpdateAttempter update_attempter;
+  chromeos_update_engine::UpdateAttempter update_attempter(&metrics_lib);
 
   // Create the dbus service object:
   dbus_g_object_type_install_info(UPDATE_ENGINE_TYPE_SERVICE,