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_; |