Index: content/browser/service_worker/service_worker_url_request_job.cc |
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc |
index ecac952807c5e12ea09151ff96629d61d62c9215..d6e1581cbe647ec2a112beb8313fe14671eedf7f 100644 |
--- a/content/browser/service_worker/service_worker_url_request_job.cc |
+++ b/content/browser/service_worker/service_worker_url_request_job.cc |
@@ -538,6 +538,15 @@ void ServiceWorkerURLRequestJob::DidDispatchFetchEvent( |
fetch_end_time_ = base::TimeTicks::Now(); |
load_timing_info_.send_end = fetch_end_time_; |
+ // Fills SSLInfo using the ServiceWorker script's SSLInfo to show HTTPS |
+ // padlock. |
+ // TODO(horo): When we support mixed-content (HTTP) no-cors requests from a |
+ // ServiceWorker, we have to check the security level of the responses. |
+ DCHECK(!http_response_info_); |
+ http_response_info_.reset(new net::HttpResponseInfo()); |
+ http_response_info_->ssl_info = |
+ provider_host_->active_version()->GetMainScriptSSLInfo(); |
Ryan Sleevi
2015/01/28 01:04:02
Why do you only copy the SSLInfo? Why not the full
horo
2015/01/28 02:32:05
Done.
|
+ |
// Set up a request for reading the stream. |
if (response.stream_url.is_valid()) { |
DCHECK(response.blob_uuid.empty()); |
@@ -610,7 +619,8 @@ void ServiceWorkerURLRequestJob::CreateResponseHeader( |
} |
void ServiceWorkerURLRequestJob::CommitResponseHeader() { |
- http_response_info_.reset(new net::HttpResponseInfo()); |
+ if (!http_response_info_) |
+ http_response_info_.reset(new net::HttpResponseInfo()); |
http_response_info_->headers.swap(http_response_headers_); |
NotifyHeadersComplete(); |
} |