DescriptionAdd missing dependency on TemplateURLService from PrefMetricsService
There is an indirect dependency from PrefMetricsService on TemplateURLService
that cause an incorrect ordering of the factories instantiation when using a
TestingProfile, as can be seen in the following callstack:
TemplateURLServiceFactory::GetForProfile(Profile*)
chrome::(anonymous namespace)::GetDefaultSearchProviderTemplateURL(Profile*)
chrome::(anonymous namespace)::NewTabURLDetails::ForProfile(Profile*)1
chrome::HandleNewTabURLRewrite(GURL*, content::BrowserContext*)
content::BrowserURLHandlerImpl::RewriteURLIfNecessary(GURL*, content::BrowserContext*, bool*)
(anonymous namespace)::SampleNewTabPageURL(Profile*)
PrefMetricsService::RecordLaunchPrefs()
PrefMetricsService::PrefMetricsService(Profile*)
PrefMetricsService::Factory::BuildServiceInstanceFor(content::BrowserContext*)
Add an explicit dependency to fix the ordering.
BUG=373326
Committed: https://crrev.com/15a8709fe24ebb55e15ed88b306d76ad72412931
Cr-Commit-Position: refs/heads/master@{#299890}
Patch Set 1 #
Messages
Total messages: 12 (5 generated)
|