Commit cf28c919 authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

Revert "[Sync] Use forwarding delegate for PRINTERS sync"

This reverts commit 5a3884b6.

Reason for revert: Causes flakiness in ChromeLauncherControllerWithArcTest.Arc* unit-tests

Original change's description:
> [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: Mikel Astiz <mastiz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#661732}

TBR=jkrcal@chromium.org,mastiz@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 867801
Change-Id: Id0e4aab7bd4aca4c697fcfaa213cea8ef809f3a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663496Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670035}
parent f959ae2e
...@@ -320,8 +320,18 @@ ProfileSyncComponentsFactoryImpl::CreateCommonDataTypeControllers( ...@@ -320,8 +320,18 @@ ProfileSyncComponentsFactoryImpl::CreateCommonDataTypeControllers(
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
if (!disabled_types.Has(syncer::PRINTERS)) { if (!disabled_types.Has(syncer::PRINTERS)) {
controllers.push_back( // TODO(crbug.com/867801) This still uses a proxy delegate even though the
CreateModelTypeControllerForModelRunningOnUIThread(syncer::PRINTERS)); // 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))));
} }
#endif #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