| Index: content/browser/service_worker/service_worker_dispatcher_host.cc
|
| diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| index 12a1dfc1631b86b179d60343a2ce3ac777c94f78..12659bfd2e9370b2c0bfe12fe3a2aed0cbd92a68 100644
|
| --- a/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| @@ -746,7 +746,8 @@ void ServiceWorkerDispatcherHost::DispatchExtendableMessageEvent(
|
| void ServiceWorkerDispatcherHost::OnProviderCreated(
|
| int provider_id,
|
| int route_id,
|
| - ServiceWorkerProviderType provider_type) {
|
| + ServiceWorkerProviderType provider_type,
|
| + bool is_parent_frame_secure) {
|
| // TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed.
|
| tracked_objects::ScopedTracker tracking_profile(
|
| FROM_HERE_WITH_EXPLICIT_FUNCTION(
|
| @@ -768,8 +769,10 @@ void ServiceWorkerDispatcherHost::OnProviderCreated(
|
| // Retrieve the provider host previously created for navigation requests.
|
| ServiceWorkerNavigationHandleCore* navigation_handle_core =
|
| GetContext()->GetNavigationHandleCore(provider_id);
|
| - if (navigation_handle_core != nullptr)
|
| + if (navigation_handle_core != nullptr) {
|
| provider_host = navigation_handle_core->RetrievePreCreatedHost();
|
| + provider_host->set_parent_frame_secure(is_parent_frame_secure);
|
| + }
|
|
|
| // If no host is found, the navigation has been cancelled in the meantime.
|
| // Just return as the navigation will be stopped in the renderer as well.
|
| @@ -786,8 +789,8 @@ void ServiceWorkerDispatcherHost::OnProviderCreated(
|
| }
|
| provider_host = std::unique_ptr<ServiceWorkerProviderHost>(
|
| new ServiceWorkerProviderHost(render_process_id_, route_id, provider_id,
|
| - provider_type, GetContext()->AsWeakPtr(),
|
| - this));
|
| + provider_type, is_parent_frame_secure,
|
| + GetContext()->AsWeakPtr(), this));
|
| }
|
| GetContext()->AddProviderHost(std::move(provider_host));
|
| }
|
|
|