Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Unified Diff: components/sync/engine_impl/model_type_worker.h

Issue 2401083003: [Sync] Adding integration tests for USS encryption and fixing a worker bug. (Closed)
Patch Set: Removing "Encryptoin keys" capitalization fix. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 46a69b6560b9fac25c1fc10a39ec8bf0356dfa4c..ffb23deb9cad80dc57e1586bfe48bc146f9acb60 100644
--- a/components/sync/engine_impl/model_type_worker.h
+++ b/components/sync/engine_impl/model_type_worker.h
@@ -109,6 +109,10 @@ class ModelTypeWorker : public UpdateHandler,
// settings in a good state.
bool CanCommitItems() const;
+ // Returns true if this type should stop communicating because of outstanding
+ // encyrption issues. Must wait for keys to be updated.
maxbogue 2016/10/11 15:56:39 "encryption"
skym 2016/10/11 16:41:00 Spelling it hard :(
+ 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.
@@ -173,6 +177,11 @@ class ModelTypeWorker : public UpdateHandler,
// they can all be sent to the processor at once.
UpdateResponseDataList pending_updates_;
+ // Flag to remember if all entities in get updates responses have been
+ // successfully decrypted or not. Data stops flowing out of the worker when
+ // this flag is set to false.
+ bool decrypted_everything_;
maxbogue 2016/10/11 15:56:39 I keep reading this as "decrypt_everything_". Coul
skym 2016/10/11 16:41:00 Done.
+
base::ThreadChecker thread_checker_;
base::WeakPtrFactory<ModelTypeWorker> weak_ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698