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 "content/browser/service_worker/service_worker_context_core.h" | 9 #include "content/browser/service_worker/service_worker_context_core.h" |
10 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 10 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 void ServiceWorkerRequestHandler::InitializeHandler( | 56 void ServiceWorkerRequestHandler::InitializeHandler( |
57 net::URLRequest* request, | 57 net::URLRequest* request, |
58 ServiceWorkerContextWrapper* context_wrapper, | 58 ServiceWorkerContextWrapper* context_wrapper, |
59 webkit_blob::BlobStorageContext* blob_storage_context, | 59 webkit_blob::BlobStorageContext* blob_storage_context, |
60 int process_id, | 60 int process_id, |
61 int provider_id, | 61 int provider_id, |
62 ResourceType::Type resource_type) { | 62 ResourceType resource_type) { |
63 if (!IsSchemeAndMethodSupportedForAppCache(request)) { | 63 if (!IsSchemeAndMethodSupportedForAppCache(request)) { |
64 return; | 64 return; |
65 } | 65 } |
66 | 66 |
67 if (!context_wrapper || !context_wrapper->context() || | 67 if (!context_wrapper || !context_wrapper->context() || |
68 provider_id == kInvalidServiceWorkerProviderId) { | 68 provider_id == kInvalidServiceWorkerProviderId) { |
69 return; | 69 return; |
70 } | 70 } |
71 | 71 |
72 ServiceWorkerProviderHost* provider_host = | 72 ServiceWorkerProviderHost* provider_host = |
(...skipping 22 matching lines...) Expand all Loading... |
95 new ServiceWorkerRequestInterceptor); | 95 new ServiceWorkerRequestInterceptor); |
96 } | 96 } |
97 | 97 |
98 ServiceWorkerRequestHandler::~ServiceWorkerRequestHandler() { | 98 ServiceWorkerRequestHandler::~ServiceWorkerRequestHandler() { |
99 } | 99 } |
100 | 100 |
101 ServiceWorkerRequestHandler::ServiceWorkerRequestHandler( | 101 ServiceWorkerRequestHandler::ServiceWorkerRequestHandler( |
102 base::WeakPtr<ServiceWorkerContextCore> context, | 102 base::WeakPtr<ServiceWorkerContextCore> context, |
103 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 103 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
104 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context, | 104 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context, |
105 ResourceType::Type resource_type) | 105 ResourceType resource_type) |
106 : context_(context), | 106 : context_(context), |
107 provider_host_(provider_host), | 107 provider_host_(provider_host), |
108 blob_storage_context_(blob_storage_context), | 108 blob_storage_context_(blob_storage_context), |
109 resource_type_(resource_type) { | 109 resource_type_(resource_type) { |
110 } | 110 } |
111 | 111 |
112 } // namespace content | 112 } // namespace content |
OLD | NEW |