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

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

Issue 9982018: Move most TemplateURL data members to a new struct, TemplateURLData. This allows us to eliminate t… (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 130759)
+++ chrome/browser/instant/instant_browsertest.cc (working copy)
@@ -68,19 +68,15 @@
observer.Wait();
}
+ TemplateURLData data;
+ data.short_name = ASCIIToUTF16("foo");
+ data.SetKeyword(ASCIIToUTF16("foo"));
+ data.SetURL(base::StringPrintf("http://%s:%d/files/%s?q={searchTerms}",
+ test_server()->host_port_pair().host().c_str(),
+ test_server()->host_port_pair().port(), page.c_str()));
+ data.instant_url = data.url();
// TemplateURLService takes ownership of this.
- TemplateURL* template_url = new TemplateURL();
-
- std::string url = base::StringPrintf(
- "http://%s:%d/files/%s?q={searchTerms}",
- test_server()->host_port_pair().host().c_str(),
- test_server()->host_port_pair().port(),
- page.c_str());
- template_url->SetURL(url);
- template_url->SetInstantURL(url);
- template_url->set_keyword(ASCIIToUTF16("foo"));
- template_url->set_short_name(ASCIIToUTF16("foo"));
-
+ TemplateURL* template_url = new TemplateURL(data);
model->Add(template_url);
model->SetDefaultSearchProvider(template_url);
}
« no previous file with comments | « chrome/browser/importer/profile_import_process_messages.h ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698