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

Unified Diff: chrome/browser/importer/ie_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/ie_importer.cc
===================================================================
--- chrome/browser/importer/ie_importer.cc (revision 130759)
+++ chrome/browser/importer/ie_importer.cc (working copy)
@@ -584,14 +584,13 @@
// First time we see that URL.
GURL gurl(url);
if (gurl.is_valid()) {
- TemplateURL* template_url = new TemplateURL();
- template_url->set_short_name(name);
- template_url->SetURL(url);
- // Give this a keyword to facilitate tab-to-search, if possible.
- template_url->set_keyword(TemplateURLService::GenerateKeyword(gurl,
- false));
- template_url->set_show_in_default_list(true);
- search_engines_map.insert(std::make_pair(url, template_url));
+ TemplateURLData data;
+ data.short_name = name;
+ data.SetKeyword(TemplateURLService::GenerateKeyword(gurl, false));
+ data.SetURL(url);
+ data.show_in_default_list = true;
+ t_iter = search_engines_map.insert(std::make_pair(url,
+ new TemplateURL(data))).first;
}
}
}
« no previous file with comments | « chrome/browser/importer/firefox_importer_utils.cc ('k') | chrome/browser/importer/profile_import_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698