Normalize Profile DoFinalInit sequence

Profiles are created by one of two ProfileManager functions:
CreateProfileHelper and CreateProfileAsyncHelper.

Also two DoFinalInit functions exists one in ProfileImpl
and one in ProfileManager.

In case of sync profile creation ProfileManager::DoFinalInit
is called after ProfileImpl::DoFinalInit. In case of async
profile creation ProfileManager::DoFinalInit is called
inside ProfileImpl::DoFinalInit through Profile::Delegate.

This CL moves delegate calls to end of ProfileImpl::DoFinalInit
and normalise profile initialization sequence.

In Yandex we have trouble with recently added
io_data_.InitializeDataReductionProxy()
because it was inserted after calling Profile::Delegate.

Change-Id: I3ca408e41ca13421d7899f66d5db8b8a06d77eb4
Reviewed-on: https://chromium-review.googlesource.com/c/1417874
Commit-Queue: Aleksei Loshkarev <lixan@yandex-team.ru>
Reviewed-by: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624471}
1 file changed