Remove unnecessary |result| argument from AllowCertificateError()
ContentBrowserClient::AllowCertificateError() previously took a |result|
argument, which looks like it was basically a shortcut to save embedders
from having to call the callback. When an embedder set the |result|
argument, SSLPolicy would call the appropriate SSLCertErrorHandler
method to continue or cancel the request. If the embedder didn't set the
|result| argument, then the embedder was responsible for calling the
callback, which would in turn call the appropriate SSLCertErrorHandler
method.
This CL removes the |result| argument and changes the |callback|
argument from a bool to an enum so that the embedder has a little bit
more control over how the callback cancels the request.
In addition to being a general clean-up/simplification, this change
paves the way for making SSLErrorHandler not-refcounted. A follow-up CL
will make SSLErrorHandler live on the UI thread only, and
AllowCertificateError()'s |callback| will take ownership of the
SSLErrorHandler. (Right now, the SSLErrorHandler is shared between
SSLPolicy and the callback. Removing the |result| argument means that
SSLPolicy no longer needs to retain a reference to the SSLErrorHandler.)
BUG=558491
Review-Url: https://codereview.chromium.org/2220603003
Cr-Commit-Position: refs/heads/master@{#410560}
24 files changed