Chromium Code Reviews| Index: chrome/browser/search_engines/template_url_service.cc |
| diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc |
| index e60357bddb090a03ed32b8b64e33cff1e80d4127..7af6a0fde5cae43126e1f7ade64431818b427f13 100644 |
| --- a/chrome/browser/search_engines/template_url_service.cc |
| +++ b/chrome/browser/search_engines/template_url_service.cc |
| @@ -189,9 +189,10 @@ string16 TemplateURLService::CleanUserInputKeyword(const string16& keyword) { |
| } |
| // static |
| -GURL TemplateURLService::GenerateSearchURL(const TemplateURL* t_url) { |
| +GURL TemplateURLService::GenerateSearchURL(const TemplateURL* t_url, |
| + Profile* profile) { |
|
Peter Kasting
2011/08/10 20:54:06
You don't actually need this, because none of the
|
| DCHECK(t_url); |
| - UIThreadSearchTermsData search_terms_data; |
| + UIThreadSearchTermsData search_terms_data(profile); |
| return GenerateSearchURLUsingTermsData(t_url, search_terms_data); |
| } |
| @@ -714,7 +715,7 @@ void TemplateURLService::RemoveFromMaps(const TemplateURL* template_url) { |
| if (!template_url->keyword().empty()) |
| keyword_to_template_map_.erase(template_url->keyword()); |
| if (loaded_) |
| - provider_map_.Remove(template_url); |
| + provider_map_.Remove(template_url, profile_); |
| } |
| void TemplateURLService::RemoveFromKeywordMapByPointer( |
| @@ -735,7 +736,7 @@ void TemplateURLService::AddToMaps(const TemplateURL* template_url) { |
| if (!template_url->keyword().empty()) |
| keyword_to_template_map_[template_url->keyword()] = template_url; |
| if (loaded_) { |
| - UIThreadSearchTermsData search_terms_data; |
| + UIThreadSearchTermsData search_terms_data(profile_); |
| provider_map_.Add(template_url, search_terms_data); |
| } |
| } |
| @@ -769,7 +770,7 @@ void TemplateURLService::SetTemplateURLs( |
| void TemplateURLService::ChangeToLoadedState() { |
| DCHECK(!loaded_); |
| - UIThreadSearchTermsData search_terms_data; |
| + UIThreadSearchTermsData search_terms_data(profile_); |
| provider_map_.Init(template_urls_, search_terms_data); |
| loaded_ = true; |
| } |
| @@ -935,8 +936,8 @@ void TemplateURLService::UpdateNoNotify(const TemplateURL* existing_turl, |
| keyword_to_template_map_.erase(existing_turl->keyword()); |
| // This call handles copying over the values (while retaining the id). |
| - UIThreadSearchTermsData search_terms_data; |
| - provider_map_.Update(existing_turl, new_values, search_terms_data); |
| + UIThreadSearchTermsData search_terms_data(profile_); |
| + provider_map_.Update(existing_turl, new_values, search_terms_data, profile_); |
| if (!existing_turl->keyword().empty()) |
| keyword_to_template_map_[existing_turl->keyword()] = existing_turl; |
| @@ -1088,7 +1089,7 @@ void TemplateURLService::GoogleBaseURLChanged() { |
| } |
| if (something_changed && loaded_) { |
| - UIThreadSearchTermsData search_terms_data; |
| + UIThreadSearchTermsData search_terms_data(profile_); |
| provider_map_.UpdateGoogleBaseURLs(search_terms_data); |
| NotifyObservers(); |
| } |