Make ArcNavigationThrottle a content::WebContentsObserver.
This CL ensures that querying for ARC apps is gracefully aborted if the owning WebContents is destroyed during the asynchronous process. ArcNavigationThrottle is converted to be a self-owning object with a private constructor and destructor. When the static app query methods are invoked, an instance of the object is instantiated to handle the querying. By overriding WebContentsDestroyed(), it can cancel all in-flight callbacks upon WebContents destruction and safely bail out of querying. BUG=824598 TBR=sky@chromium.org Change-Id: I2ba6d391b9babec46b277cbcebe567786215bf5a Reviewed-on: https://chromium-review.googlesource.com/1003432 Commit-Queue: Dominick Ng <dominickn@chromium.org> Reviewed-by:Yusuke Sato <yusukes@chromium.org> Reviewed-by:
David Jacobo <djacobo@chromium.org> Cr-Commit-Position: refs/heads/master@{#551537}
Showing
This diff is collapsed.
Please register or sign in to comment