Commit 5a3884b6 authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[Sync] Use forwarding delegate for PRINTERS sync

Printers sync runs on the UI thread but so far uses a proxy delegate
that posts tasks from UI thread to UI thread.

This CL simplifies that and employs a forwarding delegate that runs
tasks synchronously. After this CL, all data types running on the UI
thread will have forwarding delegates.

Bug: 867801
Change-Id: I08e261323a9caa816899dd924f09ecdee69ec936
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621907
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Auto-Submit: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661732}
parent 21422bfb
......@@ -335,18 +335,8 @@ ProfileSyncComponentsFactoryImpl::CreateCommonDataTypeControllers(
#if defined(OS_CHROMEOS)
if (!disabled_types.Has(syncer::PRINTERS)) {
// TODO(crbug.com/867801) This still uses a proxy delegate even though the
// model lives on the UI thread. Switching to forwarding delegate causes
// cryptic test failures on chromeos. Fix that and switch to the forwarding
// delegate.
controllers.push_back(std::make_unique<ModelTypeController>(
syncer::PRINTERS,
std::make_unique<syncer::ProxyModelTypeControllerDelegate>(
ui_thread_,
base::BindRepeating(&browser_sync::BrowserSyncClient::
GetControllerDelegateForModelType,
base::Unretained(sync_client_),
syncer::PRINTERS))));
controllers.push_back(
CreateModelTypeControllerForModelRunningOnUIThread(syncer::PRINTERS));
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment