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

Unified Diff: sync/internal_api/sync_manager_impl.cc

Issue 452283003: sync: Finish non-blocking type encryption support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cryptographer testing Created 6 years, 4 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
« no previous file with comments | « sync/engine/model_type_sync_worker_impl_unittest.cc ('k') | sync/protocol/proto_value_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager_impl.cc
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index e12ec8f7c236ca49a40fcbcb601500b191550517..5f2c3de5618460f26e8750338a0c5090fb6daa07 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -388,6 +388,7 @@ void SyncManagerImpl::Init(InitArgs* args) {
model_type_registry_.reset(
new ModelTypeRegistry(args->workers, directory(), this));
+ sync_encryption_handler_->AddObserver(model_type_registry_.get());
// Bind the SyncContext WeakPtr to this thread. This helps us crash earlier
// if the pointer is misused in debug mode.
@@ -608,6 +609,10 @@ void SyncManagerImpl::ShutdownOnSyncThread(ShutdownReason reason) {
scheduler_.reset();
session_context_.reset();
+
+ if (model_type_registry_)
+ sync_encryption_handler_->RemoveObserver(model_type_registry_.get());
+
model_type_registry_.reset();
if (sync_encryption_handler_) {
« no previous file with comments | « sync/engine/model_type_sync_worker_impl_unittest.cc ('k') | sync/protocol/proto_value_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698