Chromium Code Reviews| Index: components/search_engines/template_url_service.cc |
| diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc |
| index 18f5d5585c522b8d9e45da6c5214531c89da3dc4..06b055ae9ef32bfb5929c4bf70e3681e4934a2fc 100644 |
| --- a/components/search_engines/template_url_service.cc |
| +++ b/components/search_engines/template_url_service.cc |
| @@ -1344,15 +1344,18 @@ TemplateURLService::CreateTemplateURLFromTemplateURLAndSyncData( |
| UpdateTemplateURLIfPrepopulated(turl.get(), prefs); |
| // We used to sync keywords associated with omnibox extensions, but no longer |
| - // want to. However, if we delete these keywords from sync, we'll break any |
| - // synced old versions of Chrome which were relying on them. Instead, for now |
| - // we simply ignore these. |
| - // TODO(vasilii): After a few Chrome versions, change this to go ahead and |
| - // delete these from sync. |
| + // want to. Delete them from the server. |
| + // TODO(vasilii): After a few Chrome versions, delete this code together with |
| + // RestoreExtensionInfoIfNecessary(). |
|
Peter Kasting
2016/09/22 19:01:44
Just to make sure I understand: is RestoreExtensio
vasilii
2016/09/28 10:00:11
Until few days ago there was no |type_| in the Tem
Peter Kasting
2016/09/28 19:34:34
What I'm thinking is, we don't actually need Resto
vasilii
2016/09/29 11:48:06
We could but it's a layering violation. The compon
|
| DCHECK(client); |
| client->RestoreExtensionInfoIfNecessary(turl.get()); |
| - if (turl->GetType() == TemplateURL::OMNIBOX_API_EXTENSION) |
| + if (turl->GetType() == TemplateURL::OMNIBOX_API_EXTENSION) { |
| + change_list->push_back( |
| + syncer::SyncChange(FROM_HERE, |
| + syncer::SyncChange::ACTION_DELETE, |
| + sync_data)); |
| return nullptr; |
| + } |
| DCHECK_EQ(TemplateURL::NORMAL, turl->GetType()); |
| if (reset_keyword || deduped) { |