From 651da6252ac3c36ec5d85b338f1fb0df16e940f4 Mon Sep 17 00:00:00 2001 From: "zea@chromium.org" Date: Tue, 2 Jul 2013 23:24:04 +0000 Subject: [Sync] Add support for sync Persistence Errors Persistence errors are those detected by the native model's transaction version being newer than sync's. They currently have no effect beyond a normal association error, but will eventually result in delayed association after a sync update. BUG=239828 TBR=atwilson@chromium.org, sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/15701022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209810 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/search_engines/template_url_service.cc | 6 ++++-- chrome/browser/search_engines/template_url_service_sync_unittest.cc | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'chrome/browser/search_engines') diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc index bde41b0..b809632 100644 --- a/chrome/browser/search_engines/template_url_service.cc +++ b/chrome/browser/search_engines/template_url_service.cc @@ -890,8 +890,10 @@ syncer::SyncError TemplateURLService::ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) { if (!models_associated_) { - syncer::SyncError error(FROM_HERE, "Models not yet associated.", - syncer::SEARCH_ENGINES); + syncer::SyncError error(FROM_HERE, + syncer::SyncError::DATATYPE_ERROR, + "Models not yet associated.", + syncer::SEARCH_ENGINES); return error; } DCHECK(loaded_); diff --git a/chrome/browser/search_engines/template_url_service_sync_unittest.cc b/chrome/browser/search_engines/template_url_service_sync_unittest.cc index ccd2203..0e0c549 100644 --- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc +++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc @@ -124,7 +124,10 @@ syncer::SyncError TestChangeProcessor::ProcessSyncChanges( const syncer::SyncChangeList& change_list) { if (erroneous_) return syncer::SyncError( - FROM_HERE, "Some error.", syncer::SEARCH_ENGINES); + FROM_HERE, + syncer::SyncError::DATATYPE_ERROR, + "Some error.", + syncer::SEARCH_ENGINES); change_map_.erase(change_map_.begin(), change_map_.end()); for (syncer::SyncChangeList::const_iterator iter = change_list.begin(); -- cgit v1.1