summaryrefslogtreecommitdiffstats
path: root/chrome/browser/prefs
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-10 23:46:45 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-10 23:46:45 +0000
commit786009d47328ac4672c86e5a3964d56fc36b3d74 (patch)
treee4994d54c0fac1f093200f08edeea4d1f4fc4170 /chrome/browser/prefs
parent99800f2ad6f7518143b15092f711670253fbcfc8 (diff)
downloadchromium_src-786009d47328ac4672c86e5a3964d56fc36b3d74.zip
chromium_src-786009d47328ac4672c86e5a3964d56fc36b3d74.tar.gz
chromium_src-786009d47328ac4672c86e5a3964d56fc36b3d74.tar.bz2
[Sync] Add location parameter to SyncChange in Sync API.
SyncChanges now require the location they were created as a parameter. This is then used in the case that the change violates and invariant. We display the location and type of erroneous change in about:sync, in addition to disabling the offending datatype. TBR=kalman@chromium.org, mnissler@chromium.org, isherman@chromium.org BUG=135108 TEST=unit_tests Review URL: https://chromiumcodereview.appspot.com/10766016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prefs')
-rw-r--r--chrome/browser/prefs/pref_model_associator.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc
index 0ed80e1..5edab25 100644
--- a/chrome/browser/prefs/pref_model_associator.cc
+++ b/chrome/browser/prefs/pref_model_associator.cc
@@ -80,7 +80,9 @@ void PrefModelAssociator::InitPrefAndAssociate(
return;
}
sync_changes->push_back(
- syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(FROM_HERE,
+ syncer::SyncChange::ACTION_UPDATE,
+ sync_data));
}
} else if (pref->IsUserControlled()) {
// The server does not know about this preference and should be added
@@ -91,7 +93,9 @@ void PrefModelAssociator::InitPrefAndAssociate(
return;
}
sync_changes->push_back(
- syncer::SyncChange(syncer::SyncChange::ACTION_ADD, sync_data));
+ syncer::SyncChange(FROM_HERE,
+ syncer::SyncChange::ACTION_ADD,
+ sync_data));
} else {
// This pref does not have a sync value but also does not have a user
// controlled value (either it's a default value or it's policy controlled,
@@ -428,7 +432,9 @@ void PrefModelAssociator::ProcessPrefChange(const std::string& name) {
return;
}
changes.push_back(
- syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
+ syncer::SyncChange(FROM_HERE,
+ syncer::SyncChange::ACTION_UPDATE,
+ sync_data));
}
syncer::SyncError error =