| Index: chrome/browser/ui/search_engines/search_engine_tab_helper.cc | 
| =================================================================== | 
| --- chrome/browser/ui/search_engines/search_engine_tab_helper.cc	(revision 130759) | 
| +++ chrome/browser/ui/search_engines/search_engine_tab_helper.cc	(working copy) | 
| @@ -171,11 +171,10 @@ | 
| url_service->Remove(current_url); | 
| } | 
|  | 
| -  TemplateURL* new_url = new TemplateURL(); | 
| -  new_url->set_short_name(keyword); | 
| -  new_url->set_keyword(keyword); | 
| -  new_url->set_safe_for_autoreplace(true); | 
| -  new_url->add_input_encoding(params.searchable_form_encoding); | 
| +  TemplateURLData data; | 
| +  data.short_name = keyword; | 
| +  data.SetKeyword(keyword); | 
| +  data.SetURL(url.spec()); | 
| DCHECK(controller.GetLastCommittedEntry()); | 
| const GURL& current_favicon = | 
| controller.GetLastCommittedEntry()->GetFavicon().url; | 
| @@ -184,9 +183,9 @@ | 
| // latter. | 
| // TODO(sky): Need a way to set the favicon that doesn't involve generating | 
| // its url. | 
| -  const GURL& favicon_url = current_favicon.is_valid() ? | 
| +  data.favicon_url = current_favicon.is_valid() ? | 
| current_favicon : TemplateURL::GenerateFaviconURL(params.referrer.url); | 
| -  new_url->SetURL(url.spec()); | 
| -  new_url->set_favicon_url(favicon_url); | 
| -  url_service->Add(new_url); | 
| +  data.safe_for_autoreplace = true; | 
| +  data.input_encodings.push_back(params.searchable_form_encoding); | 
| +  url_service->Add(new TemplateURL(data)); | 
| } | 
|  |