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..1561cd32114a1959aa1d370ef4dfe2d2702fefd1 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,16 @@ void ServiceWorkerURLRequestJob::DidDispatchFetchEvent( |
fetch_end_time_ = base::TimeTicks::Now(); |
load_timing_info_.send_end = fetch_end_time_; |
+ // Creates a new HttpResponseInfo using the the ServiceWorker script's |
+ // HttpResponseInfo 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_); |
+ const net::HttpResponseInfo* main_script_http_info = |
+ provider_host_->active_version()->GetMainScriptHttpResponseInfo(); |
+ DCHECK(main_script_http_info); |
+ http_response_info_.reset(new net::HttpResponseInfo(*main_script_http_info)); |
+ |
// Set up a request for reading the stream. |
if (response.stream_url.is_valid()) { |
DCHECK(response.blob_uuid.empty()); |
@@ -610,8 +620,11 @@ 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_); |
+ http_response_info_->vary_data = net::HttpVaryData(); |
+ http_response_info_->metadata = nullptr; |
NotifyHeadersComplete(); |
Ryan Sleevi
2015/01/30 23:20:43
My understanding is that |request_time| and |respo
horo
2015/01/31 08:34:07
Ah, in current implementation, info->request_time
|
} |