Skip to content

Commit

Permalink
Stub out Control Types
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed May 10, 2019
1 parent c00e256 commit 9a9b5f7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 31 deletions.
12 changes: 12 additions & 0 deletions patches/components-sync-base-model_type.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/components/sync/base/model_type.h b/components/sync/base/model_type.h
index ca6acf4cdbded08bbd1a69c27827ecf0374a0d11..56f2ae314dfff6d8df3df67ec1edd9b92d1d9d93 100644
--- a/components/sync/base/model_type.h
+++ b/components/sync/base/model_type.h
@@ -271,6 +271,7 @@ constexpr ModelTypeSet ProxyTypes() {
// - They support custom update application and conflict resolution logic.
// - All change processing occurs on the sync thread (GROUP_PASSIVE).
constexpr ModelTypeSet ControlTypes() {
+ return ModelTypeSet(UNSPECIFIED);
return ModelTypeSet::FromRange(FIRST_CONTROL_MODEL_TYPE,
LAST_CONTROL_MODEL_TYPE);
}
21 changes: 11 additions & 10 deletions patches/components-sync-driver-data_type_manager_impl.cc.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
diff --git a/components/sync/driver/data_type_manager_impl.cc b/components/sync/driver/data_type_manager_impl.cc
index 9dc9226269704e8a2412634b231a6d54c8bc93f6..b40ac1bbef7ccb7b29022176d11e725a86ac7835 100644
index 9dc9226269704e8a2412634b231a6d54c8bc93f6..c746e46fdec8c992fcafb87f3e89927979165019 100644
--- a/components/sync/driver/data_type_manager_impl.cc
+++ b/components/sync/driver/data_type_manager_impl.cc
@@ -596,7 +596,8 @@ ModelTypeSet DataTypeManagerImpl::PrepareConfigureParams(
DCHECK(Intersection(downloaded_types_, types_to_journal).Empty());
DCHECK(Intersection(downloaded_types_, crypto_types).Empty());
// |downloaded_types_| was already updated to include all enabled types.
- DCHECK(downloaded_types_.HasAll(types_to_download));
+ // TODO(darkdh): fix Control Type download
+ // DCHECK(downloaded_types_.HasAll(types_to_download));
@@ -546,8 +546,8 @@ ModelTypeSet DataTypeManagerImpl::PrepareConfigureParams(
types_to_download.PutAll(clean_types);
types_to_download.RemoveAll(ProxyTypes());
types_to_download.RemoveAll(CommitOnlyTypes());
- if (!types_to_download.Empty())
- types_to_download.Put(NIGORI);
+ // if (!types_to_download.Empty())
+ // types_to_download.Put(NIGORI);

DVLOG(1) << "Types " << ModelTypeSetToString(types_to_download)
<< " added; calling ConfigureDataTypes";
// TODO(sync): crbug.com/137550.
// It's dangerous to configure types that have progress markers. Types with
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/components/sync/driver/glue/sync_backend_host_core.cc b/components/sync/driver/glue/sync_backend_host_core.cc
index 9f962da6b18298365c01e8b9154d39a5c43afc38..3b6e42c0ac23fac125e7e4b57f15d30cdd408a75 100644
index 9f962da6b18298365c01e8b9154d39a5c43afc38..f020379378dce7a5b27dcf3f807fd191cd2ee0f7 100644
--- a/components/sync/driver/glue/sync_backend_host_core.cc
+++ b/components/sync/driver/glue/sync_backend_host_core.cc
@@ -353,6 +353,7 @@ void SyncBackendHostCore::DoInitialize(SyncEngine::InitParams params) {
Expand All @@ -10,23 +10,3 @@ index 9f962da6b18298365c01e8b9154d39a5c43afc38..3b6e42c0ac23fac125e7e4b57f15d30c
sync_manager_->Init(&args);
base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
this, "SyncDirectory", base::ThreadTaskRunnerHandle::Get());
@@ -412,12 +413,13 @@ void SyncBackendHostCore::DoInitialProcessControlTypes() {
return;
}

- if (!sync_manager_->InitialSyncEndedTypes().HasAll(ControlTypes())) {
- LOG(ERROR) << "Failed to download control types";
- host_.Call(FROM_HERE,
- &SyncEngineImpl::HandleInitializationFailureOnFrontendLoop);
- return;
- }
+ // TODO(darkdh): move device record into control type
+ // if (!sync_manager_->InitialSyncEndedTypes().HasAll(ControlTypes())) {
+ // LOG(ERROR) << "Failed to download control types";
+ // host_.Call(FROM_HERE,
+ // &SyncEngineImpl::HandleInitializationFailureOnFrontendLoop);
+ // return;
+ // }

DCHECK_EQ(user_share->directory->cache_guid(), sync_manager_->cache_guid());
host_.Call(

0 comments on commit 9a9b5f7

Please sign in to comment.