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

Unified Diff: chrome/browser/extensions/syncable_extension_settings_storage.cc

Issue 8341043: Extension settings API: send ACTION_UPDATE rather than ACTION_ADD when a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 2 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
« no previous file with comments | « chrome/browser/extensions/extension_settings_sync_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/syncable_extension_settings_storage.cc
diff --git a/chrome/browser/extensions/syncable_extension_settings_storage.cc b/chrome/browser/extensions/syncable_extension_settings_storage.cc
index 8ec5d178941d6d24a1bd4d8bcc4cdbdc46492e49..cf5776665e98e1ca4e782320d7d6b9672c2f7f89 100644
--- a/chrome/browser/extensions/syncable_extension_settings_storage.cc
+++ b/chrome/browser/extensions/syncable_extension_settings_storage.cc
@@ -174,7 +174,10 @@ SyncError SyncableExtensionSettingsStorage::OverwriteLocalSettingsWithSync(
scoped_ptr<Value> sync_value(orphaned_sync_value);
Value* local_value = NULL;
settings.GetWithoutPathExpansion(*it, &local_value);
- if (!sync_value->Equals(local_value)) {
+ if (sync_value->Equals(local_value)) {
+ // Sync and local values are the same, no changes to send.
+ synced_keys_.insert(*it);
+ } else {
// Sync value is different, update local setting with new value.
changes.push_back(
ExtensionSettingSyncData(
« no previous file with comments | « chrome/browser/extensions/extension_settings_sync_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698