| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/service_worker/service_worker_context_core.h" | 5 #include "content/browser/service_worker/service_worker_context_core.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 const ServiceWorkerContext::CheckHasServiceWorkerCallback callback, | 906 const ServiceWorkerContext::CheckHasServiceWorkerCallback callback, |
| 907 scoped_refptr<ServiceWorkerRegistration> registration) { | 907 scoped_refptr<ServiceWorkerRegistration> registration) { |
| 908 if (!registration->active_version() && !registration->waiting_version()) { | 908 if (!registration->active_version() && !registration->waiting_version()) { |
| 909 callback.Run(ServiceWorkerCapability::NO_SERVICE_WORKER); | 909 callback.Run(ServiceWorkerCapability::NO_SERVICE_WORKER); |
| 910 return; | 910 return; |
| 911 } | 911 } |
| 912 | 912 |
| 913 CheckFetchHandlerOfInstalledServiceWorker(callback, registration); | 913 CheckFetchHandlerOfInstalledServiceWorker(callback, registration); |
| 914 } | 914 } |
| 915 | 915 |
| 916 void ServiceWorkerContextCore::BindWorkerFetchContext( |
| 917 int render_process_id, |
| 918 int service_worker_provider_id, |
| 919 mojom::ServiceWorkerClientAssociatedPtrInfo client_ptr_info) { |
| 920 ServiceWorkerProviderHost* provider_host = |
| 921 GetProviderHost(render_process_id, service_worker_provider_id); |
| 922 if (!provider_host) |
| 923 return; |
| 924 provider_host->BindWorkerFetchContext(std::move(client_ptr_info)); |
| 925 } |
| 926 |
| 916 } // namespace content | 927 } // namespace content |
| OLD | NEW |