| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_request_handler.h" | 5 #include "content/browser/service_worker/service_worker_request_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/profiler/scoped_tracker.h" | |
| 10 #include "content/browser/service_worker/service_worker_context_core.h" | 9 #include "content/browser/service_worker/service_worker_context_core.h" |
| 11 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 10 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 12 #include "content/browser/service_worker/service_worker_provider_host.h" | 11 #include "content/browser/service_worker/service_worker_provider_host.h" |
| 13 #include "content/browser/service_worker/service_worker_registration.h" | 12 #include "content/browser/service_worker/service_worker_registration.h" |
| 14 #include "content/browser/service_worker/service_worker_url_request_job.h" | 13 #include "content/browser/service_worker/service_worker_url_request_job.h" |
| 15 #include "content/browser/service_worker/service_worker_utils.h" | 14 #include "content/browser/service_worker/service_worker_utils.h" |
| 16 #include "content/common/resource_request_body.h" | 15 #include "content/common/resource_request_body.h" |
| 17 #include "content/common/service_worker/service_worker_types.h" | 16 #include "content/common/service_worker/service_worker_types.h" |
| 18 #include "content/public/browser/resource_context.h" | 17 #include "content/public/browser/resource_context.h" |
| 19 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 storage::BlobStorageContext* blob_storage_context, | 56 storage::BlobStorageContext* blob_storage_context, |
| 58 int process_id, | 57 int process_id, |
| 59 int provider_id, | 58 int provider_id, |
| 60 bool skip_service_worker, | 59 bool skip_service_worker, |
| 61 FetchRequestMode request_mode, | 60 FetchRequestMode request_mode, |
| 62 FetchCredentialsMode credentials_mode, | 61 FetchCredentialsMode credentials_mode, |
| 63 ResourceType resource_type, | 62 ResourceType resource_type, |
| 64 RequestContextType request_context_type, | 63 RequestContextType request_context_type, |
| 65 RequestContextFrameType frame_type, | 64 RequestContextFrameType frame_type, |
| 66 scoped_refptr<ResourceRequestBody> body) { | 65 scoped_refptr<ResourceRequestBody> body) { |
| 67 // TODO(pkasting): Remove ScopedTracker below once crbug.com/456331 is fixed. | |
| 68 tracked_objects::ScopedTracker tracking_profile( | |
| 69 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
| 70 "456331 ServiceWorkerRequestHandler::InitializeHandler")); | |
| 71 if (!request->url().SchemeIsHTTPOrHTTPS()) | 66 if (!request->url().SchemeIsHTTPOrHTTPS()) |
| 72 return; | 67 return; |
| 73 | 68 |
| 74 if (!context_wrapper || !context_wrapper->context() || | 69 if (!context_wrapper || !context_wrapper->context() || |
| 75 provider_id == kInvalidServiceWorkerProviderId) { | 70 provider_id == kInvalidServiceWorkerProviderId) { |
| 76 return; | 71 return; |
| 77 } | 72 } |
| 78 | 73 |
| 79 ServiceWorkerProviderHost* provider_host = | 74 ServiceWorkerProviderHost* provider_host = |
| 80 context_wrapper->context()->GetProviderHost(process_id, provider_id); | 75 context_wrapper->context()->GetProviderHost(process_id, provider_id); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 ResourceType resource_type) | 163 ResourceType resource_type) |
| 169 : context_(context), | 164 : context_(context), |
| 170 provider_host_(provider_host), | 165 provider_host_(provider_host), |
| 171 blob_storage_context_(blob_storage_context), | 166 blob_storage_context_(blob_storage_context), |
| 172 resource_type_(resource_type), | 167 resource_type_(resource_type), |
| 173 old_process_id_(0), | 168 old_process_id_(0), |
| 174 old_provider_id_(kInvalidServiceWorkerProviderId) { | 169 old_provider_id_(kInvalidServiceWorkerProviderId) { |
| 175 } | 170 } |
| 176 | 171 |
| 177 } // namespace content | 172 } // namespace content |
| OLD | NEW |