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

Unified Diff: chrome/browser/search_engines/search_host_to_urls_map.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/search_host_to_urls_map.cc
diff --git a/chrome/browser/search_engines/search_host_to_urls_map.cc b/chrome/browser/search_engines/search_host_to_urls_map.cc
index cb91724a0bb10044d9667a4f5c95fbb5f6644799..639c7c631a928680d3e04e04055aa68d79576cd5 100644
--- a/chrome/browser/search_engines/search_host_to_urls_map.cc
+++ b/chrome/browser/search_engines/search_host_to_urls_map.cc
@@ -41,11 +41,12 @@ void SearchHostToURLsMap::Add(const TemplateURL* template_url,
host_to_urls_map_[url.host()].insert(template_url);
}
-void SearchHostToURLsMap::Remove(const TemplateURL* template_url) {
+void SearchHostToURLsMap::Remove(const TemplateURL* template_url,
+ Profile* profile) {
DCHECK(initialized_);
DCHECK(template_url);
- const GURL url(TemplateURLService::GenerateSearchURL(template_url));
+ const GURL url(TemplateURLService::GenerateSearchURL(template_url, profile));
if (!url.is_valid() || !url.has_host())
return;
@@ -62,11 +63,12 @@ void SearchHostToURLsMap::Remove(const TemplateURL* template_url) {
void SearchHostToURLsMap::Update(const TemplateURL* existing_turl,
const TemplateURL& new_values,
- const SearchTermsData& search_terms_data) {
+ const SearchTermsData& search_terms_data,
+ Profile* profile) {
DCHECK(initialized_);
DCHECK(existing_turl);
- Remove(existing_turl);
+ Remove(existing_turl, profile);
// Use the information from new_values but preserve existing_turl's id.
TemplateURLID previous_id = existing_turl->id();

Powered by Google App Engine
This is Rietveld 408576698