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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/omnibox/browser/physical_web_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/physical_web_provider.h
diff --git a/components/omnibox/browser/physical_web_provider.h b/components/omnibox/browser/physical_web_provider.h
index cab09c5c98296ab58b1616f2d42abdacdf80101c..f316c6e8937fa854a25a423d23e9941c938e0c5f 100644
--- a/components/omnibox/browser/physical_web_provider.h
+++ b/components/omnibox/browser/physical_web_provider.h
@@ -79,9 +79,16 @@ class PhysicalWebProvider : public AutocompleteProvider {
HistoryURLProvider* history_url_provider_;
// The number of nearby Physical Web URLs when the provider last constructed
- // matches.
+ // matches. Initialized to string::npos.
size_t nearby_url_count_;
+ // The number of nearby Physical Web URLs when the omnibox input was last
+ // focused. Initialized to string::npos.
+ // This value is set when the omnibox is focused and recorded when the user
+ // selects an omnibox suggestion. If the value is still string::npos when the
+ // user makes a selection, it indicates the omnibox was never focused.
+ size_t nearby_url_count_at_focus_;
+
// If true, provide suggestions when the user has focused the omnibox but has
// not typed anything.
bool zero_suggest_enabled_;
« 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