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/sessions/sync_session_context.h | |
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/sessions/sync_session_context.h')
-rw-r--r-- | sync/sessions/sync_session_context.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h index 16d3a61..e1933c7 100644 --- a/sync/sessions/sync_session_context.h +++ b/sync/sessions/sync_session_context.h @@ -26,6 +26,7 @@ #include "sync/engine/syncer_types.h" #include "sync/engine/traffic_recorder.h" #include "sync/internal_api/public/engine/model_safe_worker.h" +#include "sync/protocol/sync.pb.h" #include "sync/sessions/debug_info_getter.h" namespace syncer { @@ -123,6 +124,14 @@ class SyncSessionContext { return keystore_encryption_enabled_; } + void set_hierarchy_conflict_detected(bool value) { + client_status_.set_hierarchy_conflict_detected(value); + } + + const sync_pb::ClientStatus& client_status() const { + return client_status_; + } + private: // Rather than force clients to set and null-out various context members, we // extend our encapsulation boundary to scoped helpers that take care of this @@ -167,6 +176,9 @@ class SyncSessionContext { TrafficRecorder* traffic_recorder_; + // Satus information to be sent up to the server. + sync_pb::ClientStatus client_status_; + // Temporary variable while keystore encryption is behind a flag. True if // we should attempt performing keystore encryption related work, false if // the experiment is not enabled. |