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

Unified Diff: chrome/browser/instant/instant_browsertest.cc

Issue 10173001: Add a Profile* member to TemplateURL. This makes some invocations of ReplaceSearchTerms() a bit le… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/instant/instant_browsertest.cc
===================================================================
--- chrome/browser/instant/instant_browsertest.cc (revision 132905)
+++ chrome/browser/instant/instant_browsertest.cc (working copy)
@@ -57,8 +57,9 @@
}
void SetupInstantProvider(const std::string& page) {
+ Profile* profile = browser()->profile();
TemplateURLService* model =
- TemplateURLServiceFactory::GetForProfile(browser()->profile());
+ TemplateURLServiceFactory::GetForProfile(profile);
ui_test_utils::WindowedNotificationObserver observer(
chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED,
@@ -76,7 +77,7 @@
test_server()->host_port_pair().port(), page.c_str()));
data.instant_url = data.url();
// TemplateURLService takes ownership of this.
- TemplateURL* template_url = new TemplateURL(data);
+ TemplateURL* template_url = new TemplateURL(profile, data);
model->Add(template_url);
model->SetDefaultSearchProvider(template_url);
}

Powered by Google App Engine
This is Rietveld 408576698