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

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

Issue 2755503002: Add a new entry to omnibox_event.proto to log specific type of contextual suggestions (Closed)
Patch Set: Add unit test for parsing and use type specifier for search 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 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 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 std::unique_ptr<SuggestionAnswer> answer; 360 std::unique_ptr<SuggestionAnswer> answer;
361 361
362 // The transition type to use when the user opens this match. By default 362 // The transition type to use when the user opens this match. By default
363 // this is TYPED. Providers whose matches do not look like URLs should set 363 // this is TYPED. Providers whose matches do not look like URLs should set
364 // it to GENERATED. 364 // it to GENERATED.
365 ui::PageTransition transition; 365 ui::PageTransition transition;
366 366
367 // Type of this match. 367 // Type of this match.
368 Type type; 368 Type type;
369 369
370 // Used to identify the specific source / type of suggestion for suggestions
371 // provided by the suggest server. For meaning of individual values, see
372 // the server-side enum.
Mark P 2017/03/23 22:49:53 add Only used for logging.
gcomanici 2017/03/24 16:24:59 Done.
373 // The identifier 0 is reserved for cases where this specific type is unset.
374 int specific_type_identifier = 0;
Mark P 2017/03/23 22:49:53 nit: omit "=0" (chromium style I think)
gcomanici 2017/03/24 16:24:59 Done.
375
370 // Set with a keyword provider match if this match can show a keyword hint. 376 // Set with a keyword provider match if this match can show a keyword hint.
371 // For example, if this is a SearchProvider match for "www.amazon.com", 377 // For example, if this is a SearchProvider match for "www.amazon.com",
372 // |associated_keyword| could be a KeywordProvider match for "amazon.com". 378 // |associated_keyword| could be a KeywordProvider match for "amazon.com".
373 // 379 //
374 // When this is set, the popup will show a ">" symbol at the right edge of the 380 // When this is set, the popup will show a ">" symbol at the right edge of the
375 // line for this match, and tab/shift-tab will toggle in and out of keyword 381 // line for this match, and tab/shift-tab will toggle in and out of keyword
376 // mode without disturbing the rest of the popup. See also 382 // mode without disturbing the rest of the popup. See also
377 // OmniboxPopupModel::SetSelectedLineState(). 383 // OmniboxPopupModel::SetSelectedLineState().
378 std::unique_ptr<AutocompleteMatch> associated_keyword; 384 std::unique_ptr<AutocompleteMatch> associated_keyword;
379 385
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 const base::string16& text, 425 const base::string16& text,
420 const ACMatchClassifications& classifications) const; 426 const ACMatchClassifications& classifications) const;
421 #endif 427 #endif
422 }; 428 };
423 429
424 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; 430 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification;
425 typedef std::vector<ACMatchClassification> ACMatchClassifications; 431 typedef std::vector<ACMatchClassification> ACMatchClassifications;
426 typedef std::vector<AutocompleteMatch> ACMatches; 432 typedef std::vector<AutocompleteMatch> ACMatches;
427 433
428 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ 434 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698