Chromium Code Reviews| Index: components/sync/engine_impl/model_type_worker.h |
| diff --git a/components/sync/engine_impl/model_type_worker.h b/components/sync/engine_impl/model_type_worker.h |
| index 4d480415e6d4a96e9119fb49e70a73e7abd0ba2c..f033414fdec1ea69a06512deaccea3796ffd0bc1 100644 |
| --- a/components/sync/engine_impl/model_type_worker.h |
| +++ b/components/sync/engine_impl/model_type_worker.h |
| @@ -88,6 +88,10 @@ class ModelTypeWorker : public UpdateHandler, |
| std::unique_ptr<CommitContribution> GetContribution( |
| size_t max_entries) override; |
| + // An alternative way way to drive sending data to the processor, that should |
|
maxbogue
2016/10/19 22:15:43
s/way way/way
skym
2016/10/20 15:47:15
Done.
|
| + // be called when a new encryption mechanism is ready. |
| + void EncryptionAcceptedApplyUpdates(); |
| + |
| // Callback for when our contribution gets a response. |
| void OnCommitResponse(CommitResponseDataList* response_list); |
| @@ -109,6 +113,10 @@ class ModelTypeWorker : public UpdateHandler, |
| // settings in a good state. |
| bool CanCommitItems() const; |
| + // Returns true if this type should stop communicating because of outstanding |
| + // encryption issues. Must wait for keys to be updated. |
|
maxbogue
2016/10/19 22:15:43
issues and must wait
skym
2016/10/20 15:47:15
Done.
|
| + bool BlockForEncryption() const; |
| + |
| // Takes |commit_entity| populated from fields of WorkerEntityTracker and |
| // adjusts some fields before committing to server. Adjustments include |
| // generating client-assigned ID, encrypting data, etc. |
| @@ -120,6 +128,17 @@ class ModelTypeWorker : public UpdateHandler, |
| // keys to the processor to trigger re-encryption if necessary. |
| void OnCryptographerUpdated(); |
| + // Returns whether the encryption key name is different between |
|
maxbogue
2016/10/19 22:15:43
The way this is phrased does not make it immediate
skym
2016/10/20 15:47:15
Done.
|
| + // |cryptographer_| and |model_type_state_|. When a difference is found, the |
| + // value in |cryptographer_| is copied to |model_type_state_|. |
| + bool UpdateEncryptionKeyName(); |
| + |
| + // Iterates through all elements in |entities_| and tries to decrypt anything |
| + // that has encrytped data. Also updates |has_encryted_updates_| to reflect |
|
maxbogue
2016/10/19 22:15:43
encrypted
skym
2016/10/20 15:47:15
Done.
|
| + // whether anything in |entities_| was not decryptable by |cryptographer_|. |
| + // Should only be called during a GetUpdates cycle. |
| + void DecryptedStoredEntities(); |
| + |
| // Attempts to decrypt the given specifics and return them in the |out| |
| // parameter. Assumes cryptographer_->CanDecrypt(specifics) returned true. |
| // |
| @@ -173,6 +192,9 @@ class ModelTypeWorker : public UpdateHandler, |
| // they can all be sent to the processor at once. |
| UpdateResponseDataList pending_updates_; |
| + // If there are outstanding encrypted updates in |entities_|. |
|
maxbogue
2016/10/19 22:15:43
s/If/Whether
skym
2016/10/20 15:47:15
Done.
|
| + bool has_encryted_updates_; |
|
skym
2016/10/19 19:22:16
incorrectly spelled.
skym
2016/10/20 15:47:15
Done.
|
| + |
| base::ThreadChecker thread_checker_; |
| base::WeakPtrFactory<ModelTypeWorker> weak_ptr_factory_; |
| }; |