summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines/template_url_service.h
diff options
context:
space:
mode:
authorstevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 19:52:14 +0000
committerstevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 19:52:14 +0000
commita1eecd41143e253a8cb2b24bf160c0ea56ca64f1 (patch)
tree5ef83747163a14ed62350a87dfb4ea7e58784fdb /chrome/browser/search_engines/template_url_service.h
parent35cbc937387aa5e6fe821d81e5c5d656a7348447 (diff)
downloadchromium_src-a1eecd41143e253a8cb2b24bf160c0ea56ca64f1.zip
chromium_src-a1eecd41143e253a8cb2b24bf160c0ea56ca64f1.tar.gz
chromium_src-a1eecd41143e253a8cb2b24bf160c0ea56ca64f1.tar.bz2
Move the sync_guid patching from the web data service level up to the TemplateURLService level. Ensure that TemplateURLs loaded from the database without a sync_guid is assigned one in memory and updated in the database. Update unit tests to reflect this.
BUG=102038 TEST=Ensure that you can sync a basic set of Search Engines without any sync errors. Ensure that TemplateURLServiceTest.PatchEmptySyncGUID passes. Review URL: http://codereview.chromium.org/8496018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url_service.h')
-rw-r--r--chrome/browser/search_engines/template_url_service.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h
index fa2f381..0eb95b2 100644
--- a/chrome/browser/search_engines/template_url_service.h
+++ b/chrome/browser/search_engines/template_url_service.h
@@ -496,6 +496,11 @@ class TemplateURLService : public WebDataServiceConsumer,
TemplateURL* local_url,
SyncChangeList* change_list);
+ // Goes through a vector of TemplateURLs and ensure that both the in-memory
+ // and database copies have valid sync_guids. This is to fix crbug.com/102038,
+ // where old entries were being pushed to Sync without a sync_guid.
+ void PatchMissingSyncGUIDs(std::vector<TemplateURL*>* template_urls);
+
content::NotificationRegistrar registrar_;
// Mapping from keyword to the TemplateURL.