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

Unified Diff: chrome/browser/ui/search_engines/keyword_editor_controller.cc

Issue 9811022: Misc. small cleanups to minimize TemplateURL refactoring diffs: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/keyword_editor_controller.cc
===================================================================
--- chrome/browser/ui/search_engines/keyword_editor_controller.cc (revision 128075)
+++ chrome/browser/ui/search_engines/keyword_editor_controller.cc (working copy)
@@ -39,18 +39,13 @@
content::RecordAction(UserMetricsAction("KeywordEditor_AddKeyword"));
- TemplateURL* template_url = new TemplateURL();
- template_url->set_short_name(title);
- template_url->set_keyword(keyword);
- template_url->SetURL(url, 0, 0);
-
// There's a bug (1090726) in TableView with groups enabled such that newly
// added items in groups ALWAYS appear at the end, regardless of the index
// passed in. Worse yet, the selected rows get messed up when this happens
// causing other problems. As a work around we always add the item to the end
// of the list.
const int new_index = table_model_->RowCount();
- table_model_->Add(new_index, template_url);
+ table_model_->Add(new_index, title, keyword, url);
return new_index;
}

Powered by Google App Engine
This is Rietveld 408576698