Chromium Code Reviews| Index: content/browser/devtools/protocol/security_handler.h |
| diff --git a/content/browser/devtools/protocol/security_handler.h b/content/browser/devtools/protocol/security_handler.h |
| index 2d32c687a40374a5df7980595827ee2711f067d6..458aeb28af02f7ea18f1ad55af35167c8d6718b0 100644 |
| --- a/content/browser/devtools/protocol/security_handler.h |
| +++ b/content/browser/devtools/protocol/security_handler.h |
| @@ -5,9 +5,12 @@ |
| #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ |
| #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_ |
| +#include <unordered_map> |
| + |
| #include "base/macros.h" |
| #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
| #include "content/browser/devtools/protocol/security.h" |
| +#include "content/public/browser/certificate_request_result_type.h" |
| #include "content/public/browser/web_contents_observer.h" |
| namespace content { |
| @@ -29,16 +32,26 @@ class SecurityHandler : public DevToolsDomainHandler, |
| Response Enable() override; |
| Response Disable() override; |
| Response ShowCertificateViewer() override; |
| + Response HandleCertificateError(int event_id, const String& action) override; |
| + Response SetOverrideCertificateErrors(bool override) override; |
| private: |
| void AttachToRenderFrameHost(); |
| + using CertErrorCallbackMap = std::unordered_map<int, CertErrorCallback>; |
| + |
| // WebContentsObserver overrides |
| void DidChangeVisibleSecurityState() override; |
| + bool NotifyCertificateError(int cert_error, |
| + const GURL& request_url, |
| + CertErrorCallback callback) override; |
| std::unique_ptr<Security::Frontend> frontend_; |
| bool enabled_; |
| RenderFrameHostImpl* host_; |
| + int last_cert_error_id_; |
|
pfeldman
2017/02/14 19:00:24
nit: you can now say = 0; here!
irisu
2017/02/16 00:24:30
Done.
|
| + CertErrorCallbackMap callbacks_; |
| + bool certificate_error_enabled_; |
|
pfeldman
2017/02/14 19:00:24
nit: = false; !
irisu
2017/02/16 00:24:30
Done.
|
| DISALLOW_COPY_AND_ASSIGN(SecurityHandler); |
| }; |