Index: chrome/browser/sync/glue/sync_backend_host.cc |
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc |
index 1c4368308e5d4856eeba271ceeed24d18a9b4758..0534770807fa602d8307738647453cb49f1543e6 100644 |
--- a/chrome/browser/sync/glue/sync_backend_host.cc |
+++ b/chrome/browser/sync/glue/sync_backend_host.cc |
@@ -819,11 +819,8 @@ void SyncBackendHost::Core::HandleSyncCycleCompletedOnFrontendLoop( |
// Process any changes to the datatypes we're syncing. |
// TODO(sync): add support for removing types. |
- syncable::ModelTypeSet to_add; |
- if (host_->initialized() && |
- sync_manager()->ReceivedExperimentalTypes(&to_add)) { |
- host_->frontend_->OnDataTypesChanged(to_add); |
- } |
+ if (host_->initialized()) |
+ host_->AddExperimentalTypes(); |
// If we are waiting for a configuration change, check here to see |
// if this sync cycle has initialized all of the types we've been |
@@ -874,6 +871,13 @@ void SyncBackendHost::Core::FinishConfigureDataTypesOnFrontendLoop() { |
host_->FinishConfigureDataTypesOnFrontendLoop(); |
} |
+void SyncBackendHost::AddExperimentalTypes() { |
+ CHECK(initialized()); |
+ syncable::ModelTypeSet to_add; |
+ if (core_->sync_manager()->ReceivedExperimentalTypes(&to_add)) |
+ frontend_->OnDataTypesChanged(to_add); |
+} |
+ |
void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop( |
const WeakHandle<JsBackend>& js_backend, bool success) { |
DCHECK_NE(NOT_ATTEMPTED, initialization_state_); |
@@ -924,6 +928,10 @@ void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop( |
break; |
case REFRESHING_ENCRYPTION: |
initialization_state_ = INITIALIZED; |
+ // Now that we've downloaded the nigori node, we can see if there are any |
+ // experimental types to enable. This should be done before we inform |
+ // the frontend to ensure they're visible in the customize screen. |
+ AddExperimentalTypes(); |
frontend_->OnBackendInitialized(js_backend, true); |
// Now that we're fully initialized, kick off a server |
// reachability check. |