| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/metrics/metrics_log.h" | 5 #include "chrome/browser/metrics/metrics_log.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 } | 926 } |
| 927 const std::string input_type( | 927 const std::string input_type( |
| 928 AutocompleteInput::TypeToString(log.input_type)); | 928 AutocompleteInput::TypeToString(log.input_type)); |
| 929 if (!input_type.empty()) | 929 if (!input_type.empty()) |
| 930 WriteAttribute("inputtype", input_type); | 930 WriteAttribute("inputtype", input_type); |
| 931 | 931 |
| 932 for (AutocompleteResult::const_iterator i(log.result.begin()); | 932 for (AutocompleteResult::const_iterator i(log.result.begin()); |
| 933 i != log.result.end(); ++i) { | 933 i != log.result.end(); ++i) { |
| 934 OPEN_ELEMENT_FOR_SCOPE("autocompleteitem"); | 934 OPEN_ELEMENT_FOR_SCOPE("autocompleteitem"); |
| 935 if (i->provider) | 935 if (i->provider) |
| 936 WriteAttribute("provider", i->provider->name()); | 936 WriteAttribute("provider", i->provider->GetName()); |
| 937 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); | 937 const std::string result_type(AutocompleteMatch::TypeToString(i->type)); |
| 938 if (!result_type.empty()) | 938 if (!result_type.empty()) |
| 939 WriteAttribute("resulttype", result_type); | 939 WriteAttribute("resulttype", result_type); |
| 940 WriteIntAttribute("relevance", i->relevance); | 940 WriteIntAttribute("relevance", i->relevance); |
| 941 WriteIntAttribute("isstarred", i->starred ? 1 : 0); | 941 WriteIntAttribute("isstarred", i->starred ? 1 : 0); |
| 942 } | 942 } |
| 943 } | 943 } |
| 944 | 944 |
| 945 // Write the protobuf version. | 945 // Write the protobuf version. |
| 946 OmniboxEventProto* omnibox_event = uma_proto()->add_omnibox_event(); | 946 OmniboxEventProto* omnibox_event = uma_proto()->add_omnibox_event(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 ProductDataToProto(google_update_metrics.google_update_data, | 1005 ProductDataToProto(google_update_metrics.google_update_data, |
| 1006 google_update->mutable_google_update_status()); | 1006 google_update->mutable_google_update_status()); |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 if (!google_update_metrics.product_data.version.empty()) { | 1009 if (!google_update_metrics.product_data.version.empty()) { |
| 1010 ProductDataToProto(google_update_metrics.product_data, | 1010 ProductDataToProto(google_update_metrics.product_data, |
| 1011 google_update->mutable_client_status()); | 1011 google_update->mutable_client_status()); |
| 1012 } | 1012 } |
| 1013 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 1013 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
| 1014 } | 1014 } |
| OLD | NEW |