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 136811a58f61e0ad2a05877aac12cd1ffeb66681..9d845c6e0acf3da09447ed98642e14ca0a7cd889 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 { |
@@ -32,16 +35,31 @@ class SecurityHandler : public DevToolsDomainHandler, |
Response Enable() override; |
estark
2017/02/28 23:34:01
optional nit: while you're here, if you wouldn't m
irisu
2017/03/06 11:56:49
Done.
|
Response Disable() override; |
Response ShowCertificateViewer() override; |
+ Response HandleCertificateError(int event_id, const String& action) override; |
+ Response SetOverrideCertificateErrors(bool override) override; |
+ |
+ using CertErrorCallback = |
estark
2017/02/28 23:34:01
per https://engdoc.corp.google.com/eng/doc/devguid
irisu
2017/03/06 11:56:49
Done.
|
+ base::Callback<void(content::CertificateRequestResultType)>; |
+ using CertErrorCallbackMap = std::unordered_map<int, CertErrorCallback>; |
estark
2017/02/28 23:34:01
this one could be private, right?
irisu
2017/03/06 11:56:49
Done.
|
+ |
+ bool NotifyCertificateError(int cert_error, |
estark
2017/02/28 23:34:01
Please document (especially what the return value
irisu
2017/03/06 11:56:48
Done.
|
+ const GURL& request_url, |
+ CertErrorCallback callback); |
private: |
void AttachToRenderFrameHost(); |
+ void FlushPendingRequests(); |
estark
2017/02/28 23:34:01
nit: maybe FlushPendingCertificateErrorNotificatio
irisu
2017/03/06 11:56:49
Done.
|
// WebContentsObserver overrides |
void DidChangeVisibleSecurityState() override; |
+ void DidFinishNavigation(NavigationHandle* navigation_handle) override; |
std::unique_ptr<Security::Frontend> frontend_; |
bool enabled_; |
RenderFrameHostImpl* host_; |
+ int last_cert_error_id_ = 0; |
+ CertErrorCallbackMap callbacks_; |
+ bool certificate_errors_overriden_ = false; |
DISALLOW_COPY_AND_ASSIGN(SecurityHandler); |
}; |