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

Unified Diff: chrome/browser/sync/test/integration/search_engines_helper.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/sync/test/integration/search_engines_helper.cc
===================================================================
--- chrome/browser/sync/test/integration/search_engines_helper.cc (revision 130759)
+++ chrome/browser/sync/test/integration/search_engines_helper.cc (working copy)
@@ -177,25 +177,25 @@
TemplateURL* CreateTestTemplateURL(int seed,
const string16& keyword,
const std::string& sync_guid) {
- return CreateTestTemplateURL(seed,
- base::StringPrintf("http://www.test%d.com/", seed), keyword, sync_guid);
+ return CreateTestTemplateURL(seed, keyword,
+ base::StringPrintf("http://www.test%d.com/", seed), sync_guid);
}
TemplateURL* CreateTestTemplateURL(int seed,
+ const string16& keyword,
const std::string& url,
- const string16& keyword,
const std::string& sync_guid) {
- TemplateURL* turl = new TemplateURL();
- turl->set_short_name(CreateKeyword(seed));
- turl->set_keyword(keyword);
- turl->set_safe_for_autoreplace(true);
- turl->set_date_created(base::Time::FromTimeT(100));
- turl->set_last_modified(base::Time::FromTimeT(100));
- turl->SetPrepopulateId(999999);
- turl->set_sync_guid(sync_guid);
- turl->SetURL(url);
- turl->set_favicon_url(GURL("http://favicon.url"));
- return turl;
+ TemplateURLData data;
+ data.short_name = CreateKeyword(seed);
+ data.SetKeyword(keyword);
+ data.safe_for_autoreplace = true;
+ data.SetURL(url);
+ data.favicon_url = GURL("http://favicon.url");
+ data.date_created = base::Time::FromTimeT(100);
+ data.last_modified = base::Time::FromTimeT(100);
+ data.prepopulate_id = 999999;
+ data.sync_guid = sync_guid;
+ return new TemplateURL(data);
}
void AddSearchEngine(int profile, int seed) {

Powered by Google App Engine
This is Rietveld 408576698