Index: components/sync_driver/glue/sync_backend_registrar.h |
diff --git a/components/sync_driver/glue/sync_backend_registrar.h b/components/sync_driver/glue/sync_backend_registrar.h |
index 8e3674f3eb37cd0b9e88daafe9d7efbf8a8fc77e..e5c64f710dbcb826fcdad47501e816a1fe4e72cc 100644 |
--- a/components/sync_driver/glue/sync_backend_registrar.h |
+++ b/components/sync_driver/glue/sync_backend_registrar.h |
@@ -8,6 +8,7 @@ |
#include <stdint.h> |
#include <map> |
+#include <string> |
#include <vector> |
#include "base/compiler_specific.h" |
@@ -67,6 +68,12 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate, |
// released. |
~SyncBackendRegistrar() override; |
+ // Adds |type| to set of non-blocking types. These types are assigned to |
+ // GROUP_NON_BLOCKING model safe group and will be treated differently in |
+ // ModelTypeRegistry. Unlike directory types, non-blocking types always stay |
+ // assigned to GROUP_NON_BLOCKING group. |
+ void RegisterNonBlockingType(syncer::ModelType type); |
+ |
// Informs the SyncBackendRegistrar of the currently enabled set of types. |
// These types will be placed in the passive group. This function should be |
// called exactly once during startup. |
@@ -166,6 +173,11 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate, |
bool IsOnThreadForGroup(syncer::ModelType type, |
syncer::ModelSafeGroup group) const; |
+ // Returns model safe group that should be assigned to type when it is first |
+ // configured (before activation). Returns GROUP_PASSIVE for directory types |
+ // and GROUP_NON_BLOCKING for non-blocking types. |
+ syncer::ModelSafeGroup GetInitialGroupForType(syncer::ModelType type) const; |
+ |
// Name used for debugging. |
const std::string name_; |
@@ -209,6 +221,10 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate, |
// workers, etc. |
scoped_ptr<base::Thread> sync_thread_; |
+ // Set of types with non-blocking implementation (as opposed to directory |
+ // based). |
+ syncer::ModelTypeSet non_blocking_types_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); |
}; |