Add 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 Review URL: https://codereview.chromium.org/659973002 Cr-Commit-Position: refs/heads/master@{#299890}
Showing
Please register or sign in to comment