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

Unified Diff: chrome/browser/ui/search_engines/template_url_table_model.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/ui/search_engines/template_url_table_model.cc
===================================================================
--- chrome/browser/ui/search_engines/template_url_table_model.cc (revision 130759)
+++ chrome/browser/ui/search_engines/template_url_table_model.cc (working copy)
@@ -254,10 +254,11 @@
const std::string& url) {
DCHECK(index >= 0 && index <= RowCount());
template_url_service_->RemoveObserver(this);
- TemplateURL* turl = new TemplateURL();
- turl->set_short_name(short_name);
- turl->set_keyword(keyword);
- turl->SetURL(url);
+ TemplateURLData data;
+ data.short_name = short_name;
+ data.SetKeyword(keyword);
+ data.SetURL(url);
+ TemplateURL* turl = new TemplateURL(data);
template_url_service_->Add(turl);
ModelEntry* entry = new ModelEntry(this, turl);
template_url_service_->AddObserver(this);
« no previous file with comments | « chrome/browser/ui/search_engines/search_engine_tab_helper.cc ('k') | chrome/browser/webdata/keyword_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698