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

Side by Side Diff: components/omnibox/browser/physical_web_provider.h

Issue 2689803002: Ensure nearby URL count metric is properly initialized (Closed)
Patch Set: remove BeginOmniboxSession, re-add histogram description Created 3 years, 10 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
« no previous file with comments | « no previous file | components/omnibox/browser/physical_web_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #ifndef COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_ 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_ 6 #define COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void AppendOverflowItem(int additional_url_count, 72 void AppendOverflowItem(int additional_url_count,
73 int relevance, 73 int relevance,
74 const base::string16& title); 74 const base::string16& title);
75 75
76 AutocompleteProviderClient* client_; 76 AutocompleteProviderClient* client_;
77 77
78 // Used for efficiency when creating the verbatim match. Can be null. 78 // Used for efficiency when creating the verbatim match. Can be null.
79 HistoryURLProvider* history_url_provider_; 79 HistoryURLProvider* history_url_provider_;
80 80
81 // The number of nearby Physical Web URLs when the provider last constructed 81 // The number of nearby Physical Web URLs when the provider last constructed
82 // matches. 82 // matches. Initialized to string::npos.
83 size_t nearby_url_count_; 83 size_t nearby_url_count_;
84 84
85 // The number of nearby Physical Web URLs when the omnibox input was last
86 // focused. Initialized to string::npos.
87 // This value is set when the omnibox is focused and recorded when the user
88 // selects an omnibox suggestion. If the value is still string::npos when the
89 // user makes a selection, it indicates the omnibox was never focused.
90 size_t nearby_url_count_at_focus_;
91
85 // If true, provide suggestions when the user has focused the omnibox but has 92 // If true, provide suggestions when the user has focused the omnibox but has
86 // not typed anything. 93 // not typed anything.
87 bool zero_suggest_enabled_; 94 bool zero_suggest_enabled_;
88 95
89 // If true, provide suggestions when the user has entered a query into the 96 // If true, provide suggestions when the user has entered a query into the
90 // omnibox. 97 // omnibox.
91 bool after_typing_enabled_; 98 bool after_typing_enabled_;
92 99
93 // The base relevance score for Physical Web URL suggestions when the user has 100 // The base relevance score for Physical Web URL suggestions when the user has
94 // not typed anything into the omnibox. 101 // not typed anything into the omnibox.
(...skipping 10 matching lines...) Expand all
105 112
106 // Set to true if at least one suggestion was created since the last time the 113 // Set to true if at least one suggestion was created since the last time the
107 // omnibox was focused, even if the suggestion could not be displayed due to 114 // omnibox was focused, even if the suggestion could not be displayed due to
108 // a field trial. 115 // a field trial.
109 bool had_physical_web_suggestions_at_focus_or_later_; 116 bool had_physical_web_suggestions_at_focus_or_later_;
110 117
111 DISALLOW_COPY_AND_ASSIGN(PhysicalWebProvider); 118 DISALLOW_COPY_AND_ASSIGN(PhysicalWebProvider);
112 }; 119 };
113 120
114 #endif // COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_ 121 #endif // COMPONENTS_OMNIBOX_BROWSER_PHYSICAL_WEB_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | components/omnibox/browser/physical_web_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698