| Index: content/browser/service_worker/service_worker_context_core.cc
|
| diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc
|
| index 376db13a90dd0354695fce9fc649a87515fccb47..1dfec3772e580dc3e43df815dc18760a5bc1626b 100644
|
| --- a/content/browser/service_worker/service_worker_context_core.cc
|
| +++ b/content/browser/service_worker/service_worker_context_core.cc
|
| @@ -22,6 +22,8 @@
|
| #include "content/browser/service_worker/service_worker_registration.h"
|
| #include "content/browser/service_worker/service_worker_storage.h"
|
| #include "content/public/browser/browser_thread.h"
|
| +#include "net/http/http_response_headers.h"
|
| +#include "net/http/http_response_info.h"
|
| #include "storage/browser/quota/quota_manager_proxy.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -501,6 +503,20 @@ void ServiceWorkerContextCore::OnVersionStateChanged(
|
| version->version_id(), version->status());
|
| }
|
|
|
| +void ServiceWorkerContextCore::OnMainScriptHttpResponseInfoSet(
|
| + ServiceWorkerVersion* version) {
|
| + if (!observer_list_.get())
|
| + return;
|
| + const net::HttpResponseInfo* info = version->GetMainScriptHttpResponseInfo();
|
| + DCHECK(info);
|
| + base::Time lastModified;
|
| + if (info->headers)
|
| + info->headers->GetLastModifiedValue(&lastModified);
|
| + observer_list_->Notify(
|
| + FROM_HERE, &ServiceWorkerContextObserver::OnMainScriptHttpResponseInfoSet,
|
| + version->version_id(), info->response_time, lastModified);
|
| +}
|
| +
|
| void ServiceWorkerContextCore::OnErrorReported(
|
| ServiceWorkerVersion* version,
|
| const base::string16& error_message,
|
|
|