Commit 31920083 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Remove direct uses of TestingFunctionFactory

Replace them with uses of TestingFactory which is based
on base::Callback<> instead of function pointers.

This converts uses in /chrome/browser/sync.

This CL was uploaded by git cl split.

R=tschumann@chromium.org

Bug: 809610
Change-Id: If489e869a7f9143528ef89411b1a8d7c6e24b79b
Reviewed-on: https://chromium-review.googlesource.com/c/1245729Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596227}
parent 2435dfd0
......@@ -693,19 +693,20 @@ void SyncTest::SetUpInvalidations(int index) {
}
case SERVER_TYPE_UNDECIDED:
case LOCAL_PYTHON_SERVER:
BrowserContextKeyedServiceFactory::TestingFactoryFunction
invalidation_provider =
BrowserContextKeyedServiceFactory::TestingFactory invalidation_provider =
base::BindRepeating(
TestUsesSelfNotifications()
? BuildSelfNotifyingP2PProfileInvalidationProvider
: BuildRealisticP2PProfileInvalidationProvider;
? &BuildSelfNotifyingP2PProfileInvalidationProvider
: &BuildRealisticP2PProfileInvalidationProvider);
if (fcm_invalidations_enabled) {
invalidation::ProfileInvalidationProviderFactory::GetInstance()
->SetTestingFactoryAndUse(GetProfile(index), invalidation_provider);
->SetTestingFactoryAndUse(GetProfile(index),
std::move(invalidation_provider));
} else {
invalidation::DeprecatedProfileInvalidationProviderFactory::
GetInstance()
->SetTestingFactoryAndUse(GetProfile(index),
invalidation_provider);
std::move(invalidation_provider));
}
}
}
......
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