Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: components/omnibox/browser/omnibox_metrics_provider.cc

Issue 2203993002: Add a Physical Web omnibox autocomplete provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make overflow item localizable Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/omnibox/browser/omnibox_metrics_provider.h" 5 #include "components/omnibox/browser/omnibox_metrics_provider.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 case AutocompleteMatchType::SEARCH_OTHER_ENGINE: 57 case AutocompleteMatchType::SEARCH_OTHER_ENGINE:
58 return OmniboxEventProto::Suggestion::SEARCH_OTHER_ENGINE; 58 return OmniboxEventProto::Suggestion::SEARCH_OTHER_ENGINE;
59 case AutocompleteMatchType::EXTENSION_APP: 59 case AutocompleteMatchType::EXTENSION_APP:
60 return OmniboxEventProto::Suggestion::EXTENSION_APP; 60 return OmniboxEventProto::Suggestion::EXTENSION_APP;
61 case AutocompleteMatchType::BOOKMARK_TITLE: 61 case AutocompleteMatchType::BOOKMARK_TITLE:
62 return OmniboxEventProto::Suggestion::BOOKMARK_TITLE; 62 return OmniboxEventProto::Suggestion::BOOKMARK_TITLE;
63 case AutocompleteMatchType::NAVSUGGEST_PERSONALIZED: 63 case AutocompleteMatchType::NAVSUGGEST_PERSONALIZED:
64 return OmniboxEventProto::Suggestion::NAVSUGGEST_PERSONALIZED; 64 return OmniboxEventProto::Suggestion::NAVSUGGEST_PERSONALIZED;
65 case AutocompleteMatchType::CLIPBOARD: 65 case AutocompleteMatchType::CLIPBOARD:
66 return OmniboxEventProto::Suggestion::CLIPBOARD; 66 return OmniboxEventProto::Suggestion::CLIPBOARD;
67 case AutocompleteMatchType::PHYSICAL_WEB:
68 return OmniboxEventProto::Suggestion::PHYSICAL_WEB;
69 case AutocompleteMatchType::PHYSICAL_WEB_OVERFLOW:
70 return OmniboxEventProto::Suggestion::PHYSICAL_WEB_OVERFLOW;
67 case AutocompleteMatchType::VOICE_SUGGEST: 71 case AutocompleteMatchType::VOICE_SUGGEST:
68 // VOICE_SUGGEST matches are only used in Java and are not logged, 72 // VOICE_SUGGEST matches are only used in Java and are not logged,
69 // so we should never reach this case. 73 // so we should never reach this case.
70 case AutocompleteMatchType::CONTACT_DEPRECATED: 74 case AutocompleteMatchType::CONTACT_DEPRECATED:
71 case AutocompleteMatchType::NUM_TYPES: 75 case AutocompleteMatchType::NUM_TYPES:
72 break; 76 break;
73 } 77 }
74 NOTREACHED(); 78 NOTREACHED();
75 return OmniboxEventProto::Suggestion::UNKNOWN_RESULT_TYPE; 79 return OmniboxEventProto::Suggestion::UNKNOWN_RESULT_TYPE;
76 } 80 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (i->typed_count != -1) 160 if (i->typed_count != -1)
157 suggestion->set_typed_count(i->typed_count); 161 suggestion->set_typed_count(i->typed_count);
158 } 162 }
159 for (ProvidersInfo::const_iterator i(log.providers_info.begin()); 163 for (ProvidersInfo::const_iterator i(log.providers_info.begin());
160 i != log.providers_info.end(); ++i) { 164 i != log.providers_info.end(); ++i) {
161 OmniboxEventProto::ProviderInfo* provider_info = 165 OmniboxEventProto::ProviderInfo* provider_info =
162 omnibox_event->add_provider_info(); 166 omnibox_event->add_provider_info();
163 provider_info->CopyFrom(*i); 167 provider_info->CopyFrom(*i);
164 } 168 }
165 } 169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698