| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // was a main resource. | 93 // was a main resource. |
| 94 virtual void MainResourceLoadFailed() {} | 94 virtual void MainResourceLoadFailed() {} |
| 95 | 95 |
| 96 // Returns the origin of the page/context which initiated this request. | 96 // Returns the origin of the page/context which initiated this request. |
| 97 virtual GURL GetRequestingOrigin() = 0; | 97 virtual GURL GetRequestingOrigin() = 0; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 ServiceWorkerURLRequestJob( | 100 ServiceWorkerURLRequestJob( |
| 101 net::URLRequest* request, | 101 net::URLRequest* request, |
| 102 net::NetworkDelegate* network_delegate, | 102 net::NetworkDelegate* network_delegate, |
| 103 const std::string& client_id, | |
| 104 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 103 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
| 105 const ResourceContext* resource_context, | 104 const ResourceContext* resource_context, |
| 106 FetchRequestMode request_mode, | 105 FetchRequestMode request_mode, |
| 107 FetchCredentialsMode credentials_mode, | 106 FetchCredentialsMode credentials_mode, |
| 108 FetchRedirectMode redirect_mode, | 107 FetchRedirectMode redirect_mode, |
| 109 bool is_main_resource_load, | 108 bool is_main_resource_load, |
| 110 RequestContextType request_context_type, | 109 RequestContextType request_context_type, |
| 111 RequestContextFrameType frame_type, | 110 RequestContextFrameType frame_type, |
| 112 scoped_refptr<ResourceRequestBody> body, | 111 scoped_refptr<ResourceRequestBody> body, |
| 113 Delegate* delegate); | 112 Delegate* delegate); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 net::HttpByteRange byte_range_; | 242 net::HttpByteRange byte_range_; |
| 244 scoped_ptr<net::HttpResponseInfo> range_response_info_; | 243 scoped_ptr<net::HttpResponseInfo> range_response_info_; |
| 245 scoped_ptr<net::HttpResponseInfo> http_response_info_; | 244 scoped_ptr<net::HttpResponseInfo> http_response_info_; |
| 246 // Headers that have not yet been committed to |http_response_info_|. | 245 // Headers that have not yet been committed to |http_response_info_|. |
| 247 scoped_refptr<net::HttpResponseHeaders> http_response_headers_; | 246 scoped_refptr<net::HttpResponseHeaders> http_response_headers_; |
| 248 GURL response_url_; | 247 GURL response_url_; |
| 249 blink::WebServiceWorkerResponseType service_worker_response_type_; | 248 blink::WebServiceWorkerResponseType service_worker_response_type_; |
| 250 | 249 |
| 251 // Used when response type is FORWARD_TO_SERVICE_WORKER. | 250 // Used when response type is FORWARD_TO_SERVICE_WORKER. |
| 252 scoped_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_; | 251 scoped_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_; |
| 253 std::string client_id_; | |
| 254 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; | 252 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; |
| 255 const ResourceContext* resource_context_; | 253 const ResourceContext* resource_context_; |
| 256 scoped_ptr<net::URLRequest> blob_request_; | 254 scoped_ptr<net::URLRequest> blob_request_; |
| 257 scoped_refptr<Stream> stream_; | 255 scoped_refptr<Stream> stream_; |
| 258 GURL waiting_stream_url_; | 256 GURL waiting_stream_url_; |
| 259 scoped_refptr<net::IOBuffer> stream_pending_buffer_; | 257 scoped_refptr<net::IOBuffer> stream_pending_buffer_; |
| 260 int stream_pending_buffer_size_; | 258 int stream_pending_buffer_size_; |
| 261 | 259 |
| 262 FetchRequestMode request_mode_; | 260 FetchRequestMode request_mode_; |
| 263 FetchCredentialsMode credentials_mode_; | 261 FetchCredentialsMode credentials_mode_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 276 bool did_record_result_ = false; | 274 bool did_record_result_ = false; |
| 277 | 275 |
| 278 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 276 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
| 279 | 277 |
| 280 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 278 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
| 281 }; | 279 }; |
| 282 | 280 |
| 283 } // namespace content | 281 } // namespace content |
| 284 | 282 |
| 285 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 283 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
| OLD | NEW |