| 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // explicit way within content layer, e.g. have ResourceRequestInfoImpl | 44 // explicit way within content layer, e.g. have ResourceRequestInfoImpl |
| 45 // own it. | 45 // own it. |
| 46 static void InitializeHandler( | 46 static void InitializeHandler( |
| 47 net::URLRequest* request, | 47 net::URLRequest* request, |
| 48 ServiceWorkerContextWrapper* context_wrapper, | 48 ServiceWorkerContextWrapper* context_wrapper, |
| 49 storage::BlobStorageContext* blob_storage_context, | 49 storage::BlobStorageContext* blob_storage_context, |
| 50 int process_id, | 50 int process_id, |
| 51 int provider_id, | 51 int provider_id, |
| 52 bool skip_service_worker, | 52 bool skip_service_worker, |
| 53 FetchRequestMode request_mode, | 53 FetchRequestMode request_mode, |
| 54 FetchCredentialsMode credentials_mode, |
| 54 ResourceType resource_type, | 55 ResourceType resource_type, |
| 55 scoped_refptr<ResourceRequestBody> body); | 56 scoped_refptr<ResourceRequestBody> body); |
| 56 | 57 |
| 57 // Returns the handler attached to |request|. This may return NULL | 58 // Returns the handler attached to |request|. This may return NULL |
| 58 // if no handler is attached. | 59 // if no handler is attached. |
| 59 static ServiceWorkerRequestHandler* GetHandler( | 60 static ServiceWorkerRequestHandler* GetHandler( |
| 60 net::URLRequest* request); | 61 net::URLRequest* request); |
| 61 | 62 |
| 62 // Creates a protocol interceptor for ServiceWorker. | 63 // Creates a protocol interceptor for ServiceWorker. |
| 63 static scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); | 64 static scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 88 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; | 89 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; |
| 89 ResourceType resource_type_; | 90 ResourceType resource_type_; |
| 90 | 91 |
| 91 private: | 92 private: |
| 92 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestHandler); | 93 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestHandler); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace content | 96 } // namespace content |
| 96 | 97 |
| 97 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ | 98 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
| OLD | NEW |