• David Benjamin's avatar
    Simplify SSL client certificate selector logic · 9740f4b3
    David Benjamin authored
    We currently have a C++ views object owning an Cocoa object which then owns a
    bridge back into some other C++ interfaces. We can simplify this by having the
    top-level C++ object handle those interfaces and leave the Cocoa object to
    purely manage the SFChooseIdentityPanel.
    
    This doesn't fix the https://crbug.com/987744 but is some cleanup along the
    way. Before we add more cases to that logic, reduce the number of places we
    spread that logic out.
    
    This does result in some RunUntilIdle() calls in the tests no longer quite
    waiting long enough, I suspect because the Cocoa event loop is involved. I've
    switched them to specifically wait for the relevant object to be destroyed,
    which seems more robust in general. It seems that was also the cause of the
    lifetime mismatch in https://crbug.com/1041175 so now we don't need a WeakPtr.
    
    Unfortunately the diff here is kind of hard to read. I had to reorder some of
    the classes so they could refer to each other. (Note the old bridge object was
    similarly interleaved between the @interface and @implementation.)
    
    Bug: 987744, 1041175
    Change-Id: Icccc9e18cdfc64444a6496748dc106be6233896a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978946
    Commit-Queue: David Benjamin <davidben@chromium.org>
    Reviewed-by: default avatarRyan Sleevi <rsleevi@chromium.org>
    Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#734237}
    9740f4b3
ssl_client_auth_observer.h 2.84 KB