diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-16 02:49:56 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-16 02:49:56 +0000 |
commit | 43c5b440368df98a6b86addfec02b1a2be55b629 (patch) | |
tree | 4bcc7a487ae5b145d68828ab93b25f722545b4dc /sync/engine/syncer.cc | |
parent | bcd76261fdfb10b6d9cb813aa1c6140946ff79c7 (diff) | |
download | chromium_src-43c5b440368df98a6b86addfec02b1a2be55b629.zip chromium_src-43c5b440368df98a6b86addfec02b1a2be55b629.tar.gz chromium_src-43c5b440368df98a6b86addfec02b1a2be55b629.tar.bz2 |
Extend sync protocol to report hierarchy conflicts
This commit adds a new submessage to the protocol buffer that can be
used to report the client's status to the server. The first status
indicator to be implemented is 'hierarchy_conflict_detected', which is
an implicit call for help. In the future, the server should respond to
this flag by tring to resolve the hierarchy conflicts.
To help manually test the new field, this change also modified the proto
to DictionaryValue conversion functions to no longer print unset fields.
This is important because the client must leave the
'hierarchy_conflict_detected' field unset until it has tried to apply
updates at least once. This also had some implications for the unit
tests.
BUG=152464
Review URL: https://chromiumcodereview.appspot.com/11090052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/engine/syncer.cc')
-rw-r--r-- | sync/engine/syncer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc index 8e178cb..7b09c3f6 100644 --- a/sync/engine/syncer.cc +++ b/sync/engine/syncer.cc @@ -162,6 +162,10 @@ void Syncer::SyncShare(sessions::SyncSession* session, ApplyUpdatesCommand apply_updates; apply_updates.Execute(session); + + session->context()->set_hierarchy_conflict_detected( + session->status_controller().num_hierarchy_conflicts() > 0); + session->SendEventNotification(SyncEngineEvent::STATUS_CHANGED); if (last_step == APPLY_UPDATES) { // We're in configuration mode, but we still need to run the |