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

Unified Diff: chrome/browser/search_engines/util.cc

Issue 10381016: Remove the "autogenerate keyword" bit on TemplateURL. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/search_engines/util.cc
===================================================================
--- chrome/browser/search_engines/util.cc (revision 135424)
+++ chrome/browser/search_engines/util.cc (working copy)
@@ -130,18 +130,17 @@
if (!existing_url->safe_for_autoreplace()) {
data.safe_for_autoreplace = false;
data.SetKeyword(existing_url->keyword());
- data.SetAutogenerateKeyword(existing_url->autogenerate_keyword());
data.short_name = existing_url->short_name();
}
data.id = existing_url->id();
- url_in_vector = new TemplateURL(profile, data);
if (service)
- service->UpdateKeyword(*url_in_vector);
+ service->UpdateKeyword(data);
// Replace the entry in |template_urls| with the updated one.
std::vector<TemplateURL*>::iterator j = std::find(template_urls->begin(),
template_urls->end(), existing_url.get());
- *j = url_in_vector;
+ *j = new TemplateURL(profile, data);
+ url_in_vector = *j;
if (*default_search_provider == existing_url.get())
*default_search_provider = url_in_vector;
} else {

Powered by Google App Engine
This is Rietveld 408576698