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

Unified Diff: sync/engine/conflict_resolver.cc

Issue 1664643003: Change sync conflict resolution for extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test changes, added integration test Created 4 years, 10 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: sync/engine/conflict_resolver.cc
diff --git a/sync/engine/conflict_resolver.cc b/sync/engine/conflict_resolver.cc
index 0af30977c331e8840fe7ef27a77362114de875af..c321c0e5660f1af12f27e579b372653f22a77a34 100644
--- a/sync/engine/conflict_resolver.cc
+++ b/sync/engine/conflict_resolver.cc
@@ -116,7 +116,10 @@ void ConflictResolver::ProcessSimpleConflict(WriteTransaction* trans,
// f) Otherwise, it's in general safer to ignore local changes, with the
// exception of deletion conflicts (choose to undelete) and conflicts
// where the non_unique_name or parent don't match.
- if (!entry.GetServerIsDel()) {
+ // e) Except for the case of extensions and apps, where we want uninstalls to
+ // win over local modifications to avoid "back from the dead" reinstalls.
+ ModelType type = entry.GetModelType();
+ if (!entry.GetServerIsDel() || (type == EXTENSIONS || type == APPS)) {
Nicolas Zea 2016/02/18 19:28:55 The more I think about it, the more I think it wou
// TODO(nick): The current logic is arbitrary; instead, it ought to be made
// consistent with the ModelAssociator behavior for a datatype. It would
// be nice if we could route this back to ModelAssociator code to pick one
« no previous file with comments | « chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698