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

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

Issue 354773002: Reduces dependency from AutocompleteMatch to Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 e92766ae9999422ce2f56f8d3838869726ce20b4..fed520699e1492c1b9a657c11fe759490e93ba2f 100644
--- a/chrome/browser/autocomplete/autocomplete_match.h
+++ b/chrome/browser/autocomplete/autocomplete_match.h
@@ -16,8 +16,8 @@
#include "url/gurl.h"
class AutocompleteProvider;
-class Profile;
class TemplateURL;
+class TemplateURLService;
namespace base {
class Time;
@@ -174,11 +174,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.
- // 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);
+ // If |template_url_service| 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(TemplateURLService* template_url_service);
// 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.
@@ -192,7 +192,7 @@ struct AutocompleteMatch {
// is non-empty -- such as with non-substituting keywords or matches that
// represent searches using the default search engine. See also
// GetSubstitutingExplicitlyInvokedKeyword().
- void GetKeywordUIState(Profile* profile,
+ void GetKeywordUIState(TemplateURLService* template_url_service,
base::string16* keyword,
bool* is_keyword_hint) const;
@@ -203,7 +203,7 @@ struct AutocompleteMatch {
// this function returns a non-empty string in the same cases as when the UI
// should show up as being "in keyword mode".
base::string16 GetSubstitutingExplicitlyInvokedKeyword(
- Profile* profile) const;
+ TemplateURLService* template_url_service) const;
// 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
@@ -211,7 +211,7 @@ struct AutocompleteMatch {
// 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,
+ TemplateURL* GetTemplateURL(TemplateURLService* template_url_service,
bool allow_fallback_to_destination_host) const;
// Adds optional information to the |additional_info| dictionary.
« 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