Handle incognito mode properly in iOS IdentityManager factories
https://chromium-review.googlesource.com/c/chromium/src/+/1090277 fixed //chrome's IdentityManagerFactory to properly handle incognito Profiles. The factories in //ios need to be fixed as well. After discussion with sdefresne@, I now realize that it's a safer pattern to have the //chrome-level class tying IdentityManager to KeyedService *wrap* IdentityManager rather than *hold* IdentityManager. The concrete reason is that that way all of the KeyedServiceFactory methods will Just Work as expected rather than needing custom code in the factory subclass to deal with the holder (as I had previously directed should be added to //chrome for dealing with incognito Profiles). This CL thus changes all the IdentityManager factories to have a private *subclass* of IdentityManager rather than a private *holder* of IdentityManager. By doing this, we also ensure that incognito mode will now be handled properly in the iOS IdentityManager factories without requiring any custom code (i.e., it will simply use the default KeyedServiceFactory infrastructure, which returns nullptr from GetServiceForBrowserState() when the browser state is incognito). Bug: 796544 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: I2a11fafd28f9c1003a40bcfd2cea50403276ea90 Reviewed-on: https://chromium-review.googlesource.com/1092497Reviewed-by:David Roger <droger@chromium.org> Reviewed-by:
Sylvain Defresne <sdefresne@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#566788}
Showing
Please register or sign in to comment