PersonalDataManager and other classes are sometimes obtained from |profile|, and other times from |profile->GetOriginalProfile()|. The latter of which allows us to use the non-incognito's class instance even when in incognito.
In the case of PersonalDataManager, it is often obtained via GetOriginalProfile() so that Autofill may work in incognito with the data from the "original, non-incognito profile". Note that PersonalDataManager has other checks so it doesn't save data in incognito.
We should audit the code so that the behavior is correct in incognito. It may also be fine to return nullptr in incognito for certain cases, for example the Google Payments save-related functionality.
Comment 1 by rhalavati@chromium.org
, Oct 30Components: Privacy>Incognito