Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: extensions/browser/api/web_request/web_request_api_helpers.h

Issue 2156763003: Extend the webRequest.onCompleted event details object with TLS/SSL information Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use BoringSSL's SSL_CIPHER_get_rfc_name Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/web_request/web_request_api_helpers.h
diff --git a/extensions/browser/api/web_request/web_request_api_helpers.h b/extensions/browser/api/web_request/web_request_api_helpers.h
index fae87e724ae8931d27dbd89c23cae47e6b006112..42fa5b24d086f8833dfa4fdd20c34df42a45fb75 100644
--- a/extensions/browser/api/web_request/web_request_api_helpers.h
+++ b/extensions/browser/api/web_request/web_request_api_helpers.h
@@ -19,8 +19,10 @@
#include "content/public/common/resource_type.h"
#include "extensions/browser/warning_set.h"
#include "net/base/auth.h"
+#include "net/cert/x509_certificate.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
+#include "net/ssl/ssl_info.h"
#include "url/gurl.h"
namespace base {
@@ -34,6 +36,7 @@ class Extension;
namespace net {
class NetLogWithSource;
+class X509Certificate;
}
namespace extension_web_request_api_helpers {
@@ -343,6 +346,15 @@ const char* ResourceTypeToString(content::ResourceType type);
bool ParseResourceType(const std::string& type_str,
std::vector<content::ResourceType>* types);
+// Returns a list of dictionaries containing various information about the chain
+// of certificates referenced by |cert|. Ownership is passed to the caller.
+base::ListValue* ExtractCertificateChain(
+ scoped_refptr<net::X509Certificate> cert);
+
+// Returns a list of SSL errors contained within |status|. Ownership is passed
palmer 2017/01/21 01:16:30 I'd say "X.509 validation errors" rather than "SSL
+// to the caller.
+base::ListValue* ParseCertificateStatusErrors(net::CertStatus status);
+
} // namespace extension_web_request_api_helpers
#endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_

Powered by Google App Engine
This is Rietveld 408576698