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

Unified Diff: chrome/browser/search_engines/template_url_service.cc

Issue 7558014: Add a URL param to indicate group selection in Instant field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thread safe handling of Profiles Created 9 years, 4 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/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();
}

Powered by Google App Engine
This is Rietveld 408576698