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

Unified Diff: components/omnibox/browser/search_suggestion_parser.h

Issue 2755503002: Add a new entry to omnibox_event.proto to log specific type of contextual suggestions (Closed)
Patch Set: specific_type_identifier can be used outside of contextual suggestions. Created 3 years, 9 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
Index: components/omnibox/browser/search_suggestion_parser.h
diff --git a/components/omnibox/browser/search_suggestion_parser.h b/components/omnibox/browser/search_suggestion_parser.h
index 9a1ddd49ba43f86bf67ebe083cfad6a6ae62872e..5879acdee080de735f68691c295538a810c91a41 100644
--- a/components/omnibox/browser/search_suggestion_parser.h
+++ b/components/omnibox/browser/search_suggestion_parser.h
@@ -201,12 +201,15 @@ class SearchSuggestionParser {
bool from_keyword_provider,
int relevance,
bool relevance_from_server,
- const base::string16& input_text);
+ const base::string16& input_text,
+ int specific_type_identifier);
Mark P 2017/03/21 19:54:25 Please hoist this logic up to SuggestResult. Ther
gcomanici 2017/03/22 02:39:03 Done.
+ NavigationResult(const NavigationResult& nav);
Mark P 2017/03/21 19:54:25 Curious: why do you need to add a copy constructor
gcomanici 2017/03/22 02:39:03 I removed it. It was there because the compiler wa
~NavigationResult() override;
const GURL& url() const { return url_; }
const base::string16& description() const { return description_; }
const base::string16& formatted_url() const { return formatted_url_; }
+ int specific_type_identifier() const { return specific_type_identifier_; }
// Fills in |match_contents_| and |match_contents_class_| to reflect how
// the URL should be displayed and bolded against the current |input_text|.
@@ -229,6 +232,11 @@ class SearchSuggestionParser {
// The suggested navigational result description; generally the site name.
base::string16 description_;
+
+ // Used to identify the specific source / type of suggestion for suggestions
+ // provided by the suggest server. For meaning of individual values, see
+ // the server-side enum.
+ int specific_type_identifier_;
};
typedef std::vector<SuggestResult> SuggestResults;

Powered by Google App Engine
This is Rietveld 408576698