| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestInterceptor); | 43 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestInterceptor); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| 47 | 47 |
| 48 void ServiceWorkerRequestHandler::InitializeHandler( | 48 void ServiceWorkerRequestHandler::InitializeHandler( |
| 49 net::URLRequest* request, | 49 net::URLRequest* request, |
| 50 ServiceWorkerContextWrapper* context_wrapper, | 50 ServiceWorkerContextWrapper* context_wrapper, |
| 51 webkit_blob::BlobStorageContext* blob_storage_context, | 51 storage::BlobStorageContext* blob_storage_context, |
| 52 int process_id, | 52 int process_id, |
| 53 int provider_id, | 53 int provider_id, |
| 54 ResourceType resource_type, | 54 ResourceType resource_type, |
| 55 scoped_refptr<ResourceRequestBody> body) { | 55 scoped_refptr<ResourceRequestBody> body) { |
| 56 if (!request->url().SchemeIsHTTPOrHTTPS()) | 56 if (!request->url().SchemeIsHTTPOrHTTPS()) |
| 57 return; | 57 return; |
| 58 | 58 |
| 59 if (!context_wrapper || !context_wrapper->context() || | 59 if (!context_wrapper || !context_wrapper->context() || |
| 60 provider_id == kInvalidServiceWorkerProviderId) { | 60 provider_id == kInvalidServiceWorkerProviderId) { |
| 61 return; | 61 return; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 86 return scoped_ptr<net::URLRequestInterceptor>( | 86 return scoped_ptr<net::URLRequestInterceptor>( |
| 87 new ServiceWorkerRequestInterceptor); | 87 new ServiceWorkerRequestInterceptor); |
| 88 } | 88 } |
| 89 | 89 |
| 90 ServiceWorkerRequestHandler::~ServiceWorkerRequestHandler() { | 90 ServiceWorkerRequestHandler::~ServiceWorkerRequestHandler() { |
| 91 } | 91 } |
| 92 | 92 |
| 93 ServiceWorkerRequestHandler::ServiceWorkerRequestHandler( | 93 ServiceWorkerRequestHandler::ServiceWorkerRequestHandler( |
| 94 base::WeakPtr<ServiceWorkerContextCore> context, | 94 base::WeakPtr<ServiceWorkerContextCore> context, |
| 95 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 95 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
| 96 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context, | 96 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
| 97 ResourceType resource_type) | 97 ResourceType resource_type) |
| 98 : context_(context), | 98 : context_(context), |
| 99 provider_host_(provider_host), | 99 provider_host_(provider_host), |
| 100 blob_storage_context_(blob_storage_context), | 100 blob_storage_context_(blob_storage_context), |
| 101 resource_type_(resource_type) { | 101 resource_type_(resource_type) { |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace content | 104 } // namespace content |
| OLD | NEW |