session: api to allow handling certificate verification

This commit is contained in:
Robo 2015-11-05 19:36:36 +05:30
parent ce0167756e
commit d072e61282
14 changed files with 231 additions and 17 deletions

View file

@ -7,6 +7,7 @@
#include <string>
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/client_certificate_delegate.h"
@ -16,12 +17,19 @@ class WebContents;
namespace net {
class SSLCertRequestInfo;
class X509Certificate;
}
namespace atom {
class LoginHandler;
// A callback specialisation used by AtomCertVerifier during verification.
using CertificateVerifier =
base::Callback<void(const std::string&,
scoped_refptr<net::X509Certificate>,
const base::Callback<void(bool)>&)>;
class BrowserObserver {
public:
// The browser is about to close all windows.
@ -62,6 +70,9 @@ class BrowserObserver {
// The browser requests HTTP login.
virtual void OnLogin(LoginHandler* login_handler) {}
virtual void OnSetCertificateVerifier(const CertificateVerifier& handler) {}
virtual void OnRemoveCertificateVerifier() {}
protected:
virtual ~BrowserObserver() {}
};