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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_impl.cc

Issue 1368683003: USS SyncContextProxy / data type activation refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 5 years, 3 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: chrome/browser/sync/glue/sync_backend_host_impl.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.cc b/chrome/browser/sync/glue/sync_backend_host_impl.cc
index 920a25f21df4c8a41c356e0db0df33249d38ddaa..b1d6b647fa8292cc4132a3375e1329977e105eba 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc
@@ -25,6 +25,7 @@
#include "components/sync_driver/sync_prefs.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
+#include "sync/internal_api/public/activation_context.h"
#include "sync/internal_api/public/base_transaction.h"
#include "sync/internal_api/public/events/protocol_event.h"
#include "sync/internal_api/public/http_bridge.h"
@@ -452,16 +453,28 @@ void SyncBackendHostImpl::EnableEncryptEverything() {
base::Bind(&SyncBackendHostCore::DoEnableEncryptEverything, core_.get()));
}
-void SyncBackendHostImpl::ActivateDataType(
- syncer::ModelType type, syncer::ModelSafeGroup group,
+void SyncBackendHostImpl::ActivateDirectoryDataType(
+ syncer::ModelType type,
+ syncer::ModelSafeGroup group,
sync_driver::ChangeProcessor* change_processor) {
registrar_->ActivateDataType(type, group, change_processor, GetUserShare());
}
-void SyncBackendHostImpl::DeactivateDataType(syncer::ModelType type) {
+void SyncBackendHostImpl::DeactivateDirectoryDataType(syncer::ModelType type) {
registrar_->DeactivateDataType(type);
}
+void SyncBackendHostImpl::ActivateNonBlockingDataType(
+ syncer::ModelType type,
+ scoped_ptr<syncer_v2::ActivationContext> activation_context) {
+ sync_context_proxy_->ConnectTypeToSync(type, activation_context.Pass());
+}
+
+void SyncBackendHostImpl::DeactivateNonBlockingDataType(
+ syncer::ModelType type) {
+ sync_context_proxy_->Disconnect(type);
+}
+
syncer::UserShare* SyncBackendHostImpl::GetUserShare() const {
return core_->sync_manager()->GetUserShare();
}
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.h ('k') | chrome/browser/sync/glue/sync_backend_host_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698