Hello Content Owners,
I'm moving a lot of code from //chrome to //content. A big part of that migration involves using
ContentClient instead of Chrome APIs.
To make sure I'm using
ContentClient correctly, I want to use it now, before I actually move all the code, but
content::GetContentClient() is
not exposed outside of //content.
I could do it by making instances of classes like ChromeContentBrowserClient, but that could have side effects. It's meant to be a singleton after all.
I noticed content::GetContentClientForTesting() is exposed, and defined exactly the same as GetContentClient(). And it works if I use it!
Could I create another variant, maybe GetContentClientForMigration(), maybe taking base::NotFatalUntil? Or do you have any other ideas? (Technically I could probably get away with using GetContentClientForTesting() if I put a "// IN-TEST" comment on it 🙃 I just need this for a couple of weeks)
Thanks,
Ryan