| 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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 } | 936 } |
| 937 omnibox_event->set_current_page_classification( | 937 omnibox_event->set_current_page_classification( |
| 938 log.current_page_classification); | 938 log.current_page_classification); |
| 939 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type)); | 939 omnibox_event->set_input_type(AsOmniboxEventInputType(log.input_type)); |
| 940 for (AutocompleteResult::const_iterator i(log.result.begin()); | 940 for (AutocompleteResult::const_iterator i(log.result.begin()); |
| 941 i != log.result.end(); ++i) { | 941 i != log.result.end(); ++i) { |
| 942 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); | 942 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); |
| 943 suggestion->set_provider(i->provider->AsOmniboxEventProviderType()); | 943 suggestion->set_provider(i->provider->AsOmniboxEventProviderType()); |
| 944 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); | 944 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); |
| 945 suggestion->set_relevance(i->relevance); | 945 suggestion->set_relevance(i->relevance); |
| 946 if (i->typed_count != -1) |
| 947 suggestion->set_typed_count(i->typed_count); |
| 946 suggestion->set_is_starred(i->starred); | 948 suggestion->set_is_starred(i->starred); |
| 947 } | 949 } |
| 948 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); | 950 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); |
| 949 i != log.providers_info.end(); ++i) { | 951 i != log.providers_info.end(); ++i) { |
| 950 OmniboxEventProto::ProviderInfo* provider_info = | 952 OmniboxEventProto::ProviderInfo* provider_info = |
| 951 omnibox_event->add_provider_info(); | 953 omnibox_event->add_provider_info(); |
| 952 provider_info->CopyFrom(*i); | 954 provider_info->CopyFrom(*i); |
| 953 } | 955 } |
| 954 | 956 |
| 955 ++num_events_; | 957 ++num_events_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 977 ProductDataToProto(google_update_metrics.google_update_data, | 979 ProductDataToProto(google_update_metrics.google_update_data, |
| 978 google_update->mutable_google_update_status()); | 980 google_update->mutable_google_update_status()); |
| 979 } | 981 } |
| 980 | 982 |
| 981 if (!google_update_metrics.product_data.version.empty()) { | 983 if (!google_update_metrics.product_data.version.empty()) { |
| 982 ProductDataToProto(google_update_metrics.product_data, | 984 ProductDataToProto(google_update_metrics.product_data, |
| 983 google_update->mutable_client_status()); | 985 google_update->mutable_client_status()); |
| 984 } | 986 } |
| 985 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 987 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
| 986 } | 988 } |
| OLD | NEW |