| 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_URL_REQUEST_JOB_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 ServiceWorkerURLRequestJob( | 63 ServiceWorkerURLRequestJob( |
| 64 net::URLRequest* request, | 64 net::URLRequest* request, |
| 65 net::NetworkDelegate* network_delegate, | 65 net::NetworkDelegate* network_delegate, |
| 66 const std::string& client_id, | 66 const std::string& client_id, |
| 67 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 67 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
| 68 const ResourceContext* resource_context, | 68 const ResourceContext* resource_context, |
| 69 FetchRequestMode request_mode, | 69 FetchRequestMode request_mode, |
| 70 FetchCredentialsMode credentials_mode, | 70 FetchCredentialsMode credentials_mode, |
| 71 FetchRedirectMode redirect_mode, | 71 FetchRedirectMode redirect_mode, |
| 72 const std::string& integrity, |
| 72 ResourceType resource_type, | 73 ResourceType resource_type, |
| 73 RequestContextType request_context_type, | 74 RequestContextType request_context_type, |
| 74 RequestContextFrameType frame_type, | 75 RequestContextFrameType frame_type, |
| 75 scoped_refptr<ResourceRequestBody> body, | 76 scoped_refptr<ResourceRequestBody> body, |
| 76 ServiceWorkerFetchType fetch_type, | 77 ServiceWorkerFetchType fetch_type, |
| 77 const base::Optional<base::TimeDelta>& timeout, | 78 const base::Optional<base::TimeDelta>& timeout, |
| 78 Delegate* delegate); | 79 Delegate* delegate); |
| 79 | 80 |
| 80 ~ServiceWorkerURLRequestJob() override; | 81 ~ServiceWorkerURLRequestJob() override; |
| 81 | 82 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 std::string client_id_; | 295 std::string client_id_; |
| 295 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; | 296 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; |
| 296 const ResourceContext* resource_context_; | 297 const ResourceContext* resource_context_; |
| 297 // Only one of |blob_reader_| and |data_pipe_reader_| can be non-null. | 298 // Only one of |blob_reader_| and |data_pipe_reader_| can be non-null. |
| 298 std::unique_ptr<ServiceWorkerBlobReader> blob_reader_; | 299 std::unique_ptr<ServiceWorkerBlobReader> blob_reader_; |
| 299 std::unique_ptr<ServiceWorkerDataPipeReader> data_pipe_reader_; | 300 std::unique_ptr<ServiceWorkerDataPipeReader> data_pipe_reader_; |
| 300 | 301 |
| 301 FetchRequestMode request_mode_; | 302 FetchRequestMode request_mode_; |
| 302 FetchCredentialsMode credentials_mode_; | 303 FetchCredentialsMode credentials_mode_; |
| 303 FetchRedirectMode redirect_mode_; | 304 FetchRedirectMode redirect_mode_; |
| 305 std::string integrity_; |
| 304 const ResourceType resource_type_; | 306 const ResourceType resource_type_; |
| 305 RequestContextType request_context_type_; | 307 RequestContextType request_context_type_; |
| 306 RequestContextFrameType frame_type_; | 308 RequestContextFrameType frame_type_; |
| 307 bool fall_back_required_; | 309 bool fall_back_required_; |
| 308 // ResourceRequestBody has a collection of BlobDataHandles attached to it | 310 // ResourceRequestBody has a collection of BlobDataHandles attached to it |
| 309 // using the userdata mechanism. So we have to keep it not to free the blobs. | 311 // using the userdata mechanism. So we have to keep it not to free the blobs. |
| 310 scoped_refptr<ResourceRequestBody> body_; | 312 scoped_refptr<ResourceRequestBody> body_; |
| 311 std::unique_ptr<storage::BlobDataHandle> request_body_blob_data_handle_; | 313 std::unique_ptr<storage::BlobDataHandle> request_body_blob_data_handle_; |
| 312 ServiceWorkerFetchType fetch_type_; | 314 ServiceWorkerFetchType fetch_type_; |
| 313 base::Optional<base::TimeDelta> timeout_; | 315 base::Optional<base::TimeDelta> timeout_; |
| 314 | 316 |
| 315 ResponseBodyType response_body_type_ = UNKNOWN; | 317 ResponseBodyType response_body_type_ = UNKNOWN; |
| 316 bool did_record_result_ = false; | 318 bool did_record_result_ = false; |
| 317 | 319 |
| 318 bool response_is_in_cache_storage_ = false; | 320 bool response_is_in_cache_storage_ = false; |
| 319 std::string response_cache_storage_cache_name_; | 321 std::string response_cache_storage_cache_name_; |
| 320 | 322 |
| 321 ServiceWorkerHeaderList cors_exposed_header_names_; | 323 ServiceWorkerHeaderList cors_exposed_header_names_; |
| 322 | 324 |
| 323 std::unique_ptr<FileSizeResolver> file_size_resolver_; | 325 std::unique_ptr<FileSizeResolver> file_size_resolver_; |
| 324 | 326 |
| 325 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 327 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
| 326 | 328 |
| 327 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 329 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
| 328 }; | 330 }; |
| 329 | 331 |
| 330 } // namespace content | 332 } // namespace content |
| 331 | 333 |
| 332 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 334 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
| OLD | NEW |