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

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

Issue 1271733002: [2/3 chromium] Support redirect option of Request and "opaqueredirect" response type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add _MODE to avoid compile error at Windows. Created 5 years, 4 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public StreamRegisterObserver { 53 public StreamRegisterObserver {
54 public: 54 public:
55 ServiceWorkerURLRequestJob( 55 ServiceWorkerURLRequestJob(
56 net::URLRequest* request, 56 net::URLRequest* request,
57 net::NetworkDelegate* network_delegate, 57 net::NetworkDelegate* network_delegate,
58 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 58 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
59 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 59 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
60 const ResourceContext* resource_context, 60 const ResourceContext* resource_context,
61 FetchRequestMode request_mode, 61 FetchRequestMode request_mode,
62 FetchCredentialsMode credentials_mode, 62 FetchCredentialsMode credentials_mode,
63 FetchRedirectMode redirect_mode,
63 bool is_main_resource_load, 64 bool is_main_resource_load,
64 RequestContextType request_context_type, 65 RequestContextType request_context_type,
65 RequestContextFrameType frame_type, 66 RequestContextFrameType frame_type,
66 scoped_refptr<ResourceRequestBody> body); 67 scoped_refptr<ResourceRequestBody> body);
67 68
68 // Sets the response type. 69 // Sets the response type.
69 void FallbackToNetwork(); 70 void FallbackToNetwork();
70 void ForwardToServiceWorker(); 71 void ForwardToServiceWorker();
71 72
72 bool ShouldFallbackToNetwork() const { 73 bool ShouldFallbackToNetwork() const {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; 205 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_;
205 const ResourceContext* resource_context_; 206 const ResourceContext* resource_context_;
206 scoped_ptr<net::URLRequest> blob_request_; 207 scoped_ptr<net::URLRequest> blob_request_;
207 scoped_refptr<Stream> stream_; 208 scoped_refptr<Stream> stream_;
208 GURL waiting_stream_url_; 209 GURL waiting_stream_url_;
209 scoped_refptr<net::IOBuffer> stream_pending_buffer_; 210 scoped_refptr<net::IOBuffer> stream_pending_buffer_;
210 int stream_pending_buffer_size_; 211 int stream_pending_buffer_size_;
211 212
212 FetchRequestMode request_mode_; 213 FetchRequestMode request_mode_;
213 FetchCredentialsMode credentials_mode_; 214 FetchCredentialsMode credentials_mode_;
215 FetchRedirectMode redirect_mode_;
214 const bool is_main_resource_load_; 216 const bool is_main_resource_load_;
215 RequestContextType request_context_type_; 217 RequestContextType request_context_type_;
216 RequestContextFrameType frame_type_; 218 RequestContextFrameType frame_type_;
217 bool fall_back_required_; 219 bool fall_back_required_;
218 // ResourceRequestBody has a collection of BlobDataHandles attached to it 220 // ResourceRequestBody has a collection of BlobDataHandles attached to it
219 // using the userdata mechanism. So we have to keep it not to free the blobs. 221 // using the userdata mechanism. So we have to keep it not to free the blobs.
220 scoped_refptr<ResourceRequestBody> body_; 222 scoped_refptr<ResourceRequestBody> body_;
221 scoped_ptr<storage::BlobDataHandle> request_body_blob_data_handle_; 223 scoped_ptr<storage::BlobDataHandle> request_body_blob_data_handle_;
222 scoped_refptr<ServiceWorkerVersion> streaming_version_; 224 scoped_refptr<ServiceWorkerVersion> streaming_version_;
223 225
224 ResponseBodyType response_body_type_ = UNKNOWN; 226 ResponseBodyType response_body_type_ = UNKNOWN;
225 bool did_record_result_ = false; 227 bool did_record_result_ = false;
226 228
227 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; 229 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
228 230
229 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); 231 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
230 }; 232 };
231 233
232 } // namespace content 234 } // namespace content
233 235
234 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 236 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698