Updates preference.onPrefChaged dispatch to split incognito profile
Fixes two issues with how incognito extension prefs changes are dispatched when the extension is in split incognito mode: 1. If an extension was incognito split, but not incognito enabled, the incognito prefs changes were dispatched to the the extension's original profile instance (even though extension in the original profile generally cannot access incognito prefs). This CL does not dispatch incognito pref changes to extensions that are not incognito enabled. 2. If an incognito pref change was dispatched to an incognito split extension when OTR profile was not around, in order to restrict the preference to the OTR profile, DispatchEventToExtensions() function would call Profile::GetOffTheRecordProfile which would create an OTR profile instance. This cl avoids this issue by dropping the events that are expected to be restricted to a non-existent OTR profiles (Note: if the pref value changed in the original profile, and there is no incognito specific pref value, the value change is reported for the incognito pref, too), BUG=796814,805480 Change-Id: I093949c9f9123e3baaab56932903f4f2be55903c Reviewed-on: https://chromium-review.googlesource.com/882508 Commit-Queue: Toni Barzic <tbarzic@chromium.org> Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#532128}
Showing
Please register or sign in to comment