Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: content/browser/service_worker/service_worker_url_request_job.h

Issue 2941883003: [ServiceWorker] Fetch event should return integrity value (Closed)
Patch Set: Rebase and address shimazu and yhirano's comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 ServiceWorkerURLRequestJob( 62 ServiceWorkerURLRequestJob(
63 net::URLRequest* request, 63 net::URLRequest* request,
64 net::NetworkDelegate* network_delegate, 64 net::NetworkDelegate* network_delegate,
65 const std::string& client_id, 65 const std::string& client_id,
66 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 66 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
67 const ResourceContext* resource_context, 67 const ResourceContext* resource_context,
68 FetchRequestMode request_mode, 68 FetchRequestMode request_mode,
69 FetchCredentialsMode credentials_mode, 69 FetchCredentialsMode credentials_mode,
70 FetchRedirectMode redirect_mode, 70 FetchRedirectMode redirect_mode,
71 const std::string& integrity,
71 ResourceType resource_type, 72 ResourceType resource_type,
72 RequestContextType request_context_type, 73 RequestContextType request_context_type,
73 RequestContextFrameType frame_type, 74 RequestContextFrameType frame_type,
74 scoped_refptr<ResourceRequestBodyImpl> body, 75 scoped_refptr<ResourceRequestBodyImpl> body,
75 ServiceWorkerFetchType fetch_type, 76 ServiceWorkerFetchType fetch_type,
76 const base::Optional<base::TimeDelta>& timeout, 77 const base::Optional<base::TimeDelta>& timeout,
77 Delegate* delegate); 78 Delegate* delegate);
78 79
79 ~ServiceWorkerURLRequestJob() override; 80 ~ServiceWorkerURLRequestJob() override;
80 81
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 std::string client_id_; 294 std::string client_id_;
294 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; 295 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_;
295 const ResourceContext* resource_context_; 296 const ResourceContext* resource_context_;
296 // Only one of |blob_reader_| and |data_pipe_reader_| can be non-null. 297 // Only one of |blob_reader_| and |data_pipe_reader_| can be non-null.
297 std::unique_ptr<ServiceWorkerBlobReader> blob_reader_; 298 std::unique_ptr<ServiceWorkerBlobReader> blob_reader_;
298 std::unique_ptr<ServiceWorkerDataPipeReader> data_pipe_reader_; 299 std::unique_ptr<ServiceWorkerDataPipeReader> data_pipe_reader_;
299 300
300 FetchRequestMode request_mode_; 301 FetchRequestMode request_mode_;
301 FetchCredentialsMode credentials_mode_; 302 FetchCredentialsMode credentials_mode_;
302 FetchRedirectMode redirect_mode_; 303 FetchRedirectMode redirect_mode_;
304 std::string integrity_;
303 const ResourceType resource_type_; 305 const ResourceType resource_type_;
304 RequestContextType request_context_type_; 306 RequestContextType request_context_type_;
305 RequestContextFrameType frame_type_; 307 RequestContextFrameType frame_type_;
306 bool fall_back_required_; 308 bool fall_back_required_;
307 // ResourceRequestBody has a collection of BlobDataHandles attached to it 309 // ResourceRequestBody has a collection of BlobDataHandles attached to it
308 // using the userdata mechanism. So we have to keep it not to free the blobs. 310 // using the userdata mechanism. So we have to keep it not to free the blobs.
309 scoped_refptr<ResourceRequestBodyImpl> body_; 311 scoped_refptr<ResourceRequestBodyImpl> body_;
310 std::unique_ptr<storage::BlobDataHandle> request_body_blob_data_handle_; 312 std::unique_ptr<storage::BlobDataHandle> request_body_blob_data_handle_;
311 ServiceWorkerFetchType fetch_type_; 313 ServiceWorkerFetchType fetch_type_;
312 base::Optional<base::TimeDelta> timeout_; 314 base::Optional<base::TimeDelta> timeout_;
313 315
314 ResponseBodyType response_body_type_ = UNKNOWN; 316 ResponseBodyType response_body_type_ = UNKNOWN;
315 bool did_record_result_ = false; 317 bool did_record_result_ = false;
316 318
317 bool response_is_in_cache_storage_ = false; 319 bool response_is_in_cache_storage_ = false;
318 std::string response_cache_storage_cache_name_; 320 std::string response_cache_storage_cache_name_;
319 321
320 ServiceWorkerHeaderList cors_exposed_header_names_; 322 ServiceWorkerHeaderList cors_exposed_header_names_;
321 323
322 std::unique_ptr<FileSizeResolver> file_size_resolver_; 324 std::unique_ptr<FileSizeResolver> file_size_resolver_;
323 325
324 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; 326 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
325 327
326 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); 328 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
327 }; 329 };
328 330
329 } // namespace content 331 } // namespace content
330 332
331 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 333 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698