Chromium Code Reviews| 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..1a3e753e07e2a890d18171eb6a852c2724ed11e2 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,14 @@ 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. |
|
falken
2015/01/27 06:39:58
can we DCHECK(!http_response_info_)
horo
2015/01/27 06:48:15
Done.
|
| + http_response_info_.reset(new net::HttpResponseInfo()); |
| + http_response_info_->ssl_info = |
| + provider_host_->active_version()->GetMainScriptSSLInfo(); |
| + |
| // Set up a request for reading the stream. |
| if (response.stream_url.is_valid()) { |
| DCHECK(response.blob_uuid.empty()); |
| @@ -610,7 +618,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(); |
| } |