Secondary user login overrides the pref service used by UIProxyConfigService |
|||
Issue description
UIProxyConfigService is currently used:
1. by networking_private_api to calculate the effective proxy settings
for a network - more specifically, to override user proxy settings
defined in shill with proxy config from prefs (which could be set
either by policy or an extension)
2. by system tray to display the "Network might be monitored" warning
when a proxy is used
The active UIProxyConfigService is recreated with new user prefs on each user login (by network_pref_state_observer.cc, which observes NOTIFICATION_LOGIN_USER_PROFILE_PREPARED to determine when the config service should be recreated). This means that UIProxyConfigService will use prefs from the last logged in user, which is not the desired behavior in either case:
For network_private_api, generally the primary user's prefs should be used (though, there's no need to use the cached prefs pointer in this case - networking_private_api can get the appropriate pref service from the extension function context, and pass it to the UIProxyConfigService).
For system tray, the active user prefs would be preferred (given that the proxy setting can differ for primary and secondary users).
Currently, when used by system tray, the user prefs are ignored all together - see https://crbug.com/919691
,
Jan 11
Available, but no owner or component? Please find a component, as no one will ever find this without one.
,
Jan 11
Yeah, I think so, too. Though, secondary user's profile seems to use it's own proxy config (rather than the primary user's one)- https://cs.chromium.org/chromium/src/chrome/browser/net/proxy_config_monitor.cc?rcl=5173a50d9c7bac6890ee3070a49a437c43275e00&l=46 I'll file a bug to reconsider/fix that.
,
Jan 15
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3461819377e0854580bb8bd35d4f3d9429b0a8f3 commit 3461819377e0854580bb8bd35d4f3d9429b0a8f3 Author: Toni Barzic <tbarzic@chromium.org> Date: Tue Jan 15 00:15:47 2019 Have UIProxyConfigService track the primary profile prefs only Makes NetworkPrefsStateObserver re-initialzie NetworkHandler prefs, and by extension, re-create UIProxyConfigService for primary profile only. Previously, this was done on every user login, which meant that UIProxyConfigService kept track of the last logged in user's prefs, even though UIProxyConfigService is currently required for usages with the primary profile only. BUG=921100 Change-Id: I4195e44a8c24fe68fd3d0918f88ea87be6d8fe57 Reviewed-on: https://chromium-review.googlesource.com/c/1407500 Commit-Queue: Toni Baržić <tbarzic@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#622641} [modify] https://crrev.com/3461819377e0854580bb8bd35d4f3d9429b0a8f3/chrome/browser/chromeos/net/network_pref_state_observer.cc [modify] https://crrev.com/3461819377e0854580bb8bd35d4f3d9429b0a8f3/chrome/browser/chromeos/net/network_pref_state_observer_unittest.cc |
|||
►
Sign in to add a comment |
|||
Comment 1 by steve...@chromium.org
, Jan 11