diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-07 18:13:33 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-07 18:13:33 +0000 |
commit | 8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142 (patch) | |
tree | 969478be1a6f6bf4905f7a95c5bdef91a897b1eb /chrome/browser/autocomplete/keyword_provider.h | |
parent | ce829a60f9df9ca9655f467cdb87dd4b1604fcc1 (diff) | |
download | chromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.zip chromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.tar.gz chromium_src-8e5c89a5218b2cea6c19a0bbec74a6c51bdf1142.tar.bz2 |
Changes TemplateURLModel into TemplateURLService. Changes all access points to go through the newly made ProfileKeyedServiceFactory subclass.
In addition, makes further modifications to the unit testing stuff because the TemplateURL tests change the active TemplateURLService on a profile during the test.
BUG=77155
TEST=unit tests
R=mirandac
Review URL: http://codereview.chromium.org/7056056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/keyword_provider.h')
-rw-r--r-- | chrome/browser/autocomplete/keyword_provider.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/autocomplete/keyword_provider.h b/chrome/browser/autocomplete/keyword_provider.h index abfc029..7e4518c 100644 --- a/chrome/browser/autocomplete/keyword_provider.h +++ b/chrome/browser/autocomplete/keyword_provider.h @@ -6,7 +6,7 @@ // is responsible for remembering/suggesting user "search keyword queries" // (e.g. "imdb Godzilla") and then fixing them up into valid URLs. An // instance of it gets created and managed by the autocomplete controller. -// KeywordProvider uses a TemplateURLModel to find the set of keywords. +// KeywordProvider uses a TemplateURLService to find the set of keywords. // // For more information on the autocomplete system in general, including how // the autocomplete controller and autocomplete providers work, see @@ -24,7 +24,7 @@ class Profile; class TemplateURL; -class TemplateURLModel; +class TemplateURLService; // Autocomplete provider for keyword input. // @@ -53,7 +53,7 @@ class KeywordProvider : public AutocompleteProvider, public: KeywordProvider(ACProviderListener* listener, Profile* profile); // For testing. - KeywordProvider(ACProviderListener* listener, TemplateURLModel* model); + KeywordProvider(ACProviderListener* listener, TemplateURLService* model); // Returns the replacement string from the user input. The replacement // string is the portion of the input that does not contain the keyword. @@ -85,7 +85,7 @@ class KeywordProvider : public AutocompleteProvider, // after the keyword are placed in |remaining_input|. Returns true if |input| // is valid and has a keyword. This makes use of SplitKeywordFromInput to // extract the keyword and remaining string, and uses - // TemplateURLModel::CleanUserInputKeyword to remove unnecessary characters. + // TemplateURLService::CleanUserInputKeyword to remove unnecessary characters. // In general use this instead of SplitKeywordFromInput. // Leading whitespace in |*remaining_input| will be trimmed. static bool ExtractKeywordFromInput(const AutocompleteInput& input, @@ -122,7 +122,7 @@ class KeywordProvider : public AutocompleteProvider, // Creates a fully marked-up AutocompleteMatch from the user's input. // If |relevance| is negative, calculate a relevance based on heuristics. AutocompleteMatch CreateAutocompleteMatch( - TemplateURLModel* model, + TemplateURLService* model, const string16& keyword, const AutocompleteInput& input, size_t prefix_length, @@ -138,8 +138,8 @@ class KeywordProvider : public AutocompleteProvider, const NotificationDetails& details); // Model for the keywords. This is only non-null when testing, otherwise the - // TemplateURLModel from the Profile is used. - TemplateURLModel* model_; + // TemplateURLService from the Profile is used. + TemplateURLService* model_; // Identifies the current input state. This is incremented each time the // autocomplete edit's input changes in any way. It is used to tell whether |