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

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: Small fixes and sync. 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..aa27a42ef862dece81231eb0a93bde5eaf0a67a3 100644
--- a/components/omnibox/browser/search_suggestion_parser.h
+++ b/components/omnibox/browser/search_suggestion_parser.h
@@ -42,6 +42,7 @@ class SearchSuggestionParser {
int relevance,
bool relevance_from_server,
AutocompleteMatchType::Type type,
+ int subtype_identifier,
const std::string& deletion_url);
Result(const Result& other);
virtual ~Result();
@@ -54,6 +55,7 @@ class SearchSuggestionParser {
}
AutocompleteMatchType::Type type() const { return type_; }
+ int subtype_identifier() const { return subtype_identifier_; }
int relevance() const { return relevance_; }
void set_relevance(int relevance) { relevance_ = relevance; }
bool received_after_last_keystroke() const {
@@ -88,6 +90,12 @@ class SearchSuggestionParser {
AutocompleteMatchType::Type type_;
+ // Used to identify the specific source / type for suggestions by the
+ // suggest server. See |result_type_identifier| in omnibox.proto for more
+ // details.
+ // The identifier 0 is reserved for cases where this specific type is unset.
+ int subtype_identifier_;
+
// The relevance score.
int relevance_;
@@ -114,6 +122,7 @@ class SearchSuggestionParser {
public:
SuggestResult(const base::string16& suggestion,
AutocompleteMatchType::Type type,
+ int subtype_identifier,
const base::string16& match_contents,
const base::string16& match_contents_prefix,
const base::string16& annotation,
@@ -196,6 +205,7 @@ class SearchSuggestionParser {
NavigationResult(const AutocompleteSchemeClassifier& scheme_classifier,
const GURL& url,
AutocompleteMatchType::Type type,
+ int subtype_identifier,
const base::string16& description,
const std::string& deletion_url,
bool from_keyword_provider,
« no previous file with comments | « components/omnibox/browser/search_provider.cc ('k') | components/omnibox/browser/search_suggestion_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698