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

Unified Diff: chrome/browser/autocomplete/autocomplete_match.h

Issue 11198074: Initial implementation of dedupping search provider's URLs. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add a missing include. Created 8 years, 2 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: chrome/browser/autocomplete/autocomplete_match.h
diff --git a/chrome/browser/autocomplete/autocomplete_match.h b/chrome/browser/autocomplete/autocomplete_match.h
index a587df440bb2556731ed51f36b09a33b515253c5..3e7c208a69e1dae5fffcaecc9f98e6f7f17ff734 100644
--- a/chrome/browser/autocomplete/autocomplete_match.h
+++ b/chrome/browser/autocomplete/autocomplete_match.h
@@ -188,7 +188,11 @@ struct AutocompleteMatch {
// remove likely duplicates; these URLs are not used as actual
// destination URLs. This method is invoked internally by the
// AutocompleteResult and does not normally need to be invoked.
- void ComputeStrippedDestinationURL();
+ // If |profile| is not NULL, it is used to get a template URL corresponding
+ // to this match. The template is used to strip off query args other than
+ // the search terms themselves that would otherwise prevent from proper
+ // deduping.
+ void ComputeStrippedDestinationURL(Profile* profile);
// Gets data relevant to whether there should be any special keyword-related
// UI shown for this match. If this match represents a selected keyword, i.e.
@@ -217,7 +221,11 @@ struct AutocompleteMatch {
// Returns the TemplateURL associated with this match. This may be NULL if
// the match has no keyword OR if the keyword no longer corresponds to a valid
// TemplateURL. See comments on |keyword| below.
- TemplateURL* GetTemplateURL(Profile* profile) const;
+ // If |allow_fallback_to_destination_host| is true and the keyword does
+ // not map to a valid TemplateURL, we'll then check for a TemplateURL that
+ // corresponds to the destination_url's hostname.
+ TemplateURL* GetTemplateURL(Profile* profile,
+ bool allow_fallback_to_destination_host) const;
// Adds optional information to the |additional_info| dictionary.
void RecordAdditionalInfo(const std::string& property,
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_controller.cc ('k') | chrome/browser/autocomplete/autocomplete_match.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698