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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 88 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
89 const ResourceContext* resource_context, | 89 const ResourceContext* resource_context, |
90 FetchRequestMode request_mode, | 90 FetchRequestMode request_mode, |
91 FetchCredentialsMode credentials_mode, | 91 FetchCredentialsMode credentials_mode, |
92 FetchRedirectMode redirect_mode, | 92 FetchRedirectMode redirect_mode, |
93 ResourceType resource_type, | 93 ResourceType resource_type, |
94 RequestContextType request_context_type, | 94 RequestContextType request_context_type, |
95 RequestContextFrameType frame_type, | 95 RequestContextFrameType frame_type, |
96 scoped_refptr<ResourceRequestBodyImpl> body, | 96 scoped_refptr<ResourceRequestBodyImpl> body, |
97 ServiceWorkerFetchType fetch_type, | 97 ServiceWorkerFetchType fetch_type, |
98 const MojoURLLoaderFactoryGetter& url_loader_factory_getter, | |
99 Delegate* delegate); | 98 Delegate* delegate); |
100 | 99 |
101 ~ServiceWorkerURLRequestJob() override; | 100 ~ServiceWorkerURLRequestJob() override; |
102 | 101 |
103 const ResourceContext* resource_context() const { return resource_context_; } | 102 const ResourceContext* resource_context() const { return resource_context_; } |
104 | 103 |
105 // Sets the response type. | 104 // Sets the response type. |
106 // When an in-flight request possibly needs CORS check, use | 105 // When an in-flight request possibly needs CORS check, use |
107 // FallbackToNetworkOrRenderer. This method will decide whether the request | 106 // FallbackToNetworkOrRenderer. This method will decide whether the request |
108 // can directly go to the network or should fallback to a renderer to send | 107 // can directly go to the network or should fallback to a renderer to send |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 bool response_is_in_cache_storage_ = false; | 277 bool response_is_in_cache_storage_ = false; |
279 std::string response_cache_storage_cache_name_; | 278 std::string response_cache_storage_cache_name_; |
280 | 279 |
281 ServiceWorkerHeaderList cors_exposed_header_names_; | 280 ServiceWorkerHeaderList cors_exposed_header_names_; |
282 | 281 |
283 std::unique_ptr<BlobConstructionWaiter> blob_construction_waiter_; | 282 std::unique_ptr<BlobConstructionWaiter> blob_construction_waiter_; |
284 | 283 |
285 bool worker_already_activated_ = false; | 284 bool worker_already_activated_ = false; |
286 EmbeddedWorkerStatus initial_worker_status_ = EmbeddedWorkerStatus::STOPPED; | 285 EmbeddedWorkerStatus initial_worker_status_ = EmbeddedWorkerStatus::STOPPED; |
287 | 286 |
288 // This is used for Navigation Preload. It may be a null callback in some | |
289 // unittests or for Foreign Fetch. | |
290 const MojoURLLoaderFactoryGetter url_loader_factory_getter_; | |
291 | |
292 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 287 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
293 | 288 |
294 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 289 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
295 }; | 290 }; |
296 | 291 |
297 } // namespace content | 292 } // namespace content |
298 | 293 |
299 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 294 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
OLD | NEW |