Omnibox metrics logging patch splitout, part 6: Log more omnibox data (client side).

This is the last patch.  It can't go in until Evan and I test it.
Review URL: http://codereview.chromium.org/10666

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7032 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/metrics_log.cc b/chrome/browser/metrics_log.cc
index 01de449..6d8397a 100644
--- a/chrome/browser/metrics_log.cc
+++ b/chrome/browser/metrics_log.cc
@@ -593,12 +593,19 @@
     WriteIntAttribute("selectedindex", static_cast<int>(log.selected_index));
     WriteIntAttribute("completedlength",
                       static_cast<int>(log.inline_autocompleted_length));
+    const std::string input_type(
+        AutocompleteInput::TypeToString(log.input_type));
+    if (!input_type.empty())
+      WriteAttribute("inputtype", input_type);
 
     for (AutocompleteResult::const_iterator i(log.result.begin());
          i != log.result.end(); ++i) {
       OPEN_ELEMENT_FOR_SCOPE("autocompleteitem");
       if (i->provider)
         WriteAttribute("provider", i->provider->name());
+      const std::string result_type(AutocompleteMatch::TypeToString(i->type));
+      if (!result_type.empty())
+        WriteAttribute("resulttype", result_type);
       WriteIntAttribute("relevance", i->relevance);
       WriteIntAttribute("isstarred", i->starred ? 1 : 0);
     }