Fix crash on referencing deleted SignedInDevicesManager observer
Each profile creates new instance of SignedInDevicesManager so, for example, opening incognito window and then closing it, destroyes an instance of SignedInDevicesManager created for this profile. The code has forgot to remove itself from the list of observers in EventRouter. That caused crash when that event was triggered later in a normal profile as EventRouter would reference stale pointer. In tests observer is not added and profile_ is null so null-checking it. R=rdevlin.cronin@chromium.org BUG= Review URL: https://codereview.chromium.org/980663002 Cr-Commit-Position: refs/heads/master@{#319755}
Showing
Please register or sign in to comment