| Index: chrome/browser/search_engines/template_url_service.cc
|
| ===================================================================
|
| --- chrome/browser/search_engines/template_url_service.cc (revision 208572)
|
| +++ chrome/browser/search_engines/template_url_service.cc (working copy)
|
| @@ -410,7 +410,7 @@
|
| void TemplateURLService::FindMatchingKeywords(
|
| const string16& prefix,
|
| bool support_replacement_only,
|
| - std::vector<string16>* matches) const {
|
| + TemplateURLVector* matches) const {
|
| // Sanity check args.
|
| if (prefix.empty())
|
| return;
|
| @@ -434,7 +434,7 @@
|
| for (KeywordToTemplateMap::const_iterator i(match_range.first);
|
| i != match_range.second; ++i) {
|
| if (!support_replacement_only || i->second->url_ref().SupportsReplacement())
|
| - matches->push_back(i->first);
|
| + matches->push_back(i->second);
|
| }
|
| }
|
|
|
| @@ -1391,7 +1391,12 @@
|
| data.short_name = UTF8ToUTF16(initializers[i].content);
|
| data.SetKeyword(UTF8ToUTF16(initializers[i].keyword));
|
| data.SetURL(osd_url);
|
| - AddNoNotify(new TemplateURL(profile_, data), true);
|
| + TemplateURL* template_url = new TemplateURL(profile_, data);
|
| + AddNoNotify(template_url, true);
|
| +
|
| + // Set the first provided identifier to be the default.
|
| + if (!i)
|
| + SetDefaultSearchProviderNoNotify(template_url);
|
| }
|
| }
|
|
|
|
|