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

Unified Diff: content/browser/service_worker/service_worker_version.h

Issue 877623002: [ServiceWorker] Fills SSLInfo of the response from a SW with the SSLInfo of the SW script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated falken's comment Created 5 years, 11 months 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: content/browser/service_worker/service_worker_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 6954a4208010e064ca83afbc39d6aa48f6eec63f..259d60eb73777f4dec6e05ab517756db144961c2 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -24,6 +24,7 @@
#include "content/common/content_export.h"
#include "content/common/service_worker/service_worker_status_code.h"
#include "content/common/service_worker/service_worker_types.h"
+#include "net/ssl/ssl_info.h"
#include "third_party/WebKit/public/platform/WebGeofencingEventType.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
@@ -292,6 +293,12 @@ class CONTENT_EXPORT ServiceWorkerVersion
void SetDevToolsAttached(bool attached);
+ // Sets the SSLInfo of the main script. This SSLInfo will be used to fill the
+ // SSLInfo of HttpResponseInfo of the response which will be sent back from
+ // the ServiceWorker to the page to show the HTTPS padlock.
+ void SetMainScriptSSLInfo(const net::SSLInfo& ssl_info);
+ const net::SSLInfo& GetMainScriptSSLInfo();
+
private:
class GetClientDocumentsCallback;
@@ -409,6 +416,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
bool is_doomed_;
std::vector<int> pending_skip_waiting_requests_;
bool skip_waiting_;
+ net::SSLInfo main_script_ssl_info_;
base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698