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

Unified Diff: chrome/browser/importer/firefox2_importer.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/importer/firefox2_importer.cc
===================================================================
--- chrome/browser/importer/firefox2_importer.cc (revision 130759)
+++ chrome/browser/importer/firefox2_importer.cc (working copy)
@@ -134,13 +134,13 @@
if (keyword.empty() || !url.is_valid())
return NULL;
- TemplateURL* t_url = new TemplateURL();
+ TemplateURLData data;
// We set short name by using the title if it exists.
// Otherwise, we use the shortcut.
- t_url->set_short_name(title.empty() ? keyword : title);
- t_url->set_keyword(keyword);
- t_url->SetURL(TemplateURLRef::DisplayURLToURLRef(UTF8ToUTF16(url.spec())));
- return t_url;
+ data.short_name = title.empty() ? keyword : title;
+ data.SetKeyword(keyword);
+ data.SetURL(TemplateURLRef::DisplayURLToURLRef(UTF8ToUTF16(url.spec())));
+ return new TemplateURL(data);
}
// static
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/importer/firefox_importer_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698