| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/omnibox_metrics_provider.h" | 5 #include "chrome/browser/metrics/omnibox_metrics_provider.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 case AutocompleteMatchType::SEARCH_SUGGEST: | 46 case AutocompleteMatchType::SEARCH_SUGGEST: |
| 47 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST; | 47 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST; |
| 48 case AutocompleteMatchType::SEARCH_SUGGEST_ENTITY: | 48 case AutocompleteMatchType::SEARCH_SUGGEST_ENTITY: |
| 49 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_ENTITY; | 49 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_ENTITY; |
| 50 case AutocompleteMatchType::SEARCH_SUGGEST_INFINITE: | 50 case AutocompleteMatchType::SEARCH_SUGGEST_INFINITE: |
| 51 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_INFINITE; | 51 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_INFINITE; |
| 52 case AutocompleteMatchType::SEARCH_SUGGEST_PERSONALIZED: | 52 case AutocompleteMatchType::SEARCH_SUGGEST_PERSONALIZED: |
| 53 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PERSONALIZED; | 53 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PERSONALIZED; |
| 54 case AutocompleteMatchType::SEARCH_SUGGEST_PROFILE: | 54 case AutocompleteMatchType::SEARCH_SUGGEST_PROFILE: |
| 55 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PROFILE; | 55 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PROFILE; |
| 56 case AutocompleteMatchType::SEARCH_SUGGEST_ANSWER: | |
| 57 return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_ANSWER; | |
| 58 case AutocompleteMatchType::SEARCH_OTHER_ENGINE: | 56 case AutocompleteMatchType::SEARCH_OTHER_ENGINE: |
| 59 return OmniboxEventProto::Suggestion::SEARCH_OTHER_ENGINE; | 57 return OmniboxEventProto::Suggestion::SEARCH_OTHER_ENGINE; |
| 60 case AutocompleteMatchType::EXTENSION_APP: | 58 case AutocompleteMatchType::EXTENSION_APP: |
| 61 return OmniboxEventProto::Suggestion::EXTENSION_APP; | 59 return OmniboxEventProto::Suggestion::EXTENSION_APP; |
| 62 case AutocompleteMatchType::BOOKMARK_TITLE: | 60 case AutocompleteMatchType::BOOKMARK_TITLE: |
| 63 return OmniboxEventProto::Suggestion::BOOKMARK_TITLE; | 61 return OmniboxEventProto::Suggestion::BOOKMARK_TITLE; |
| 64 case AutocompleteMatchType::NAVSUGGEST_PERSONALIZED: | 62 case AutocompleteMatchType::NAVSUGGEST_PERSONALIZED: |
| 65 return OmniboxEventProto::Suggestion::NAVSUGGEST_PERSONALIZED; | 63 return OmniboxEventProto::Suggestion::NAVSUGGEST_PERSONALIZED; |
| 66 case AutocompleteMatchType::CONTACT_DEPRECATED: | 64 case AutocompleteMatchType::CONTACT_DEPRECATED: |
| 67 case AutocompleteMatchType::NUM_TYPES: | 65 case AutocompleteMatchType::NUM_TYPES: |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 if (i->typed_count != -1) | 159 if (i->typed_count != -1) |
| 162 suggestion->set_typed_count(i->typed_count); | 160 suggestion->set_typed_count(i->typed_count); |
| 163 } | 161 } |
| 164 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); | 162 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); |
| 165 i != log.providers_info.end(); ++i) { | 163 i != log.providers_info.end(); ++i) { |
| 166 OmniboxEventProto::ProviderInfo* provider_info = | 164 OmniboxEventProto::ProviderInfo* provider_info = |
| 167 omnibox_event->add_provider_info(); | 165 omnibox_event->add_provider_info(); |
| 168 provider_info->CopyFrom(*i); | 166 provider_info->CopyFrom(*i); |
| 169 } | 167 } |
| 170 } | 168 } |
| OLD | NEW |