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

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: 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..a3c85dfbfcfc64af18c216e4c345f0fee4228ef8 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -33,6 +33,10 @@ namespace blink {
struct WebCircularGeofencingRegion;
}
+namespace net {
+class HttpResponseInfo;
+}
+
namespace content {
class EmbeddedWorkerRegistry;
@@ -292,6 +296,13 @@ class CONTENT_EXPORT ServiceWorkerVersion
void SetDevToolsAttached(bool attached);
+ // Sets the HttpResponseInfo used to load the main script.
+ // This HttpResponseInfo will be used for all responses sent back from the
+ // service worker, as the effective security of these responses is equivalent
+ // to that of the ServiceWorker.
+ void SetMainScriptHttpResponseInfo(const net::HttpResponseInfo& http_info);
+ const net::HttpResponseInfo* GetMainScriptHttpResponseInfo();
+
private:
class GetClientDocumentsCallback;
@@ -409,6 +420,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
bool is_doomed_;
std::vector<int> pending_skip_waiting_requests_;
bool skip_waiting_;
+ scoped_ptr<net::HttpResponseInfo> main_script_http_info_;
base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698