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

Unified Diff: chrome/browser/sync/glue/bookmark_model_associator.cc

Issue 18132003: [Sync] Trigger unapply + getupdates for persistence errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 7 years, 6 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/sync/glue/bookmark_model_associator.cc
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index 891d06e62cba9f0111825d683c3f9df398ee6341..103edeae78bd015b7f4038c7514890021e624b7a 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -712,7 +712,7 @@ syncer::SyncError BookmarkModelAssociator::CheckModelSyncState() const {
int64 native_version = syncer::syncable::kInvalidTransactionVersion;
int64 sync_version = trans.GetModelVersion(syncer::BOOKMARKS);
if (base::StringToInt64(version_str, &native_version) &&
- native_version != sync_version) {
+ (native_version != sync_version || native_version != 0)) {
tim (not reviewing) 2013/07/01 21:10:18 So.. this is !(native_version == sync_version &&
Nicolas Zea 2013/07/01 23:27:45 Done.
UMA_HISTOGRAM_ENUMERATION("Sync.LocalModelOutOfSync",
ModelTypeToHistogramInt(syncer::BOOKMARKS),
syncer::MODEL_TYPE_COUNT);
@@ -723,7 +723,7 @@ syncer::SyncError BookmarkModelAssociator::CheckModelSyncState() const {
// If the native version is higher, there was a sync persistence failure,
// and we need to delay association until after a GetUpdates.
- if (sync_version < native_version) {
+ if (sync_version < native_version || native_version != 0) {
DVLOG(1) << "Native version (" << native_version << ") does not match "
<< "sync version (" << sync_version << ").";
return syncer::SyncError(FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698