diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 19:44:25 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 19:44:25 +0000 |
commit | 310512cc361ab20d11a236095664fafae2250fac (patch) | |
tree | ce779afc56fb845f043ea7f54e905c7ff4d8d697 /sync/internal_api/public/sessions | |
parent | 126f1d652abfd11204fb7b4aed48dcb9999903d9 (diff) | |
download | chromium_src-310512cc361ab20d11a236095664fafae2250fac.zip chromium_src-310512cc361ab20d11a236095664fafae2250fac.tar.gz chromium_src-310512cc361ab20d11a236095664fafae2250fac.tar.bz2 |
[Sync] Add support for performing a GetKey on startup.
The functionality is behind the --sync-keystore-encryption flag, and the key
is not currently consumed by anything, but this lays the groundwork for testing
the server and client interaction.
We request a key anytime we perform a GetUpdates while the cryptographer
does not have a keystore key. But, it is considered an error to request a key
and not receive one, putting us into a state of backoff.
BUG=129665
TEST=sync_unit_tests, running against python server
Review URL: https://chromiumcodereview.appspot.com/10455012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/sessions')
-rw-r--r-- | sync/internal_api/public/sessions/model_neutral_state.cc | 1 | ||||
-rw-r--r-- | sync/internal_api/public/sessions/model_neutral_state.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sync/internal_api/public/sessions/model_neutral_state.cc b/sync/internal_api/public/sessions/model_neutral_state.cc index b25d3c7..9ae8436 100644 --- a/sync/internal_api/public/sessions/model_neutral_state.cc +++ b/sync/internal_api/public/sessions/model_neutral_state.cc @@ -15,6 +15,7 @@ ModelNeutralState::ModelNeutralState() num_reflected_updates_downloaded_total(0), num_local_overwrites(0), num_server_overwrites(0), + last_get_key_result(UNSET), last_download_updates_result(UNSET), commit_result(UNSET), conflicts_resolved(false), diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h index 6b0cec8..c1d8862 100644 --- a/sync/internal_api/public/sessions/model_neutral_state.h +++ b/sync/internal_api/public/sessions/model_neutral_state.h @@ -48,7 +48,9 @@ struct ModelNeutralState { // Any protocol errors that we received during this sync session. SyncProtocolError sync_protocol_error; - // Records the most recent results of PostCommit and GetUpdates commands. + // Records the most recent results of GetKey, PostCommit and GetUpdates + // commands. + SyncerError last_get_key_result; SyncerError last_download_updates_result; SyncerError commit_result; |