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

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

Issue 1108273002: Add Client Attribute to FetchEvent- Chromium Side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 net::URLRequest* request, 54 net::URLRequest* request,
55 net::NetworkDelegate* network_delegate, 55 net::NetworkDelegate* network_delegate,
56 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 56 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
57 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 57 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
58 const ResourceContext* resource_context, 58 const ResourceContext* resource_context,
59 FetchRequestMode request_mode, 59 FetchRequestMode request_mode,
60 FetchCredentialsMode credentials_mode, 60 FetchCredentialsMode credentials_mode,
61 bool is_main_resource_load, 61 bool is_main_resource_load,
62 RequestContextType request_context_type, 62 RequestContextType request_context_type,
63 RequestContextFrameType frame_type, 63 RequestContextFrameType frame_type,
64 const ServiceWorkerClientInfo& client_info,
64 scoped_refptr<ResourceRequestBody> body); 65 scoped_refptr<ResourceRequestBody> body);
65 66
66 // Sets the response type. 67 // Sets the response type.
67 void FallbackToNetwork(); 68 void FallbackToNetwork();
68 void ForwardToServiceWorker(); 69 void ForwardToServiceWorker();
69 70
70 bool ShouldFallbackToNetwork() const { 71 bool ShouldFallbackToNetwork() const {
71 return response_type_ == FALLBACK_TO_NETWORK; 72 return response_type_ == FALLBACK_TO_NETWORK;
72 } 73 }
73 bool ShouldForwardToServiceWorker() const { 74 bool ShouldForwardToServiceWorker() const {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 scoped_refptr<Stream> stream_; 194 scoped_refptr<Stream> stream_;
194 GURL waiting_stream_url_; 195 GURL waiting_stream_url_;
195 scoped_refptr<net::IOBuffer> stream_pending_buffer_; 196 scoped_refptr<net::IOBuffer> stream_pending_buffer_;
196 int stream_pending_buffer_size_; 197 int stream_pending_buffer_size_;
197 198
198 FetchRequestMode request_mode_; 199 FetchRequestMode request_mode_;
199 FetchCredentialsMode credentials_mode_; 200 FetchCredentialsMode credentials_mode_;
200 bool is_main_resource_load_; 201 bool is_main_resource_load_;
201 RequestContextType request_context_type_; 202 RequestContextType request_context_type_;
202 RequestContextFrameType frame_type_; 203 RequestContextFrameType frame_type_;
204 ServiceWorkerClientInfo client_info_;
203 bool fall_back_required_; 205 bool fall_back_required_;
204 // ResourceRequestBody has a collection of BlobDataHandles attached to it 206 // ResourceRequestBody has a collection of BlobDataHandles attached to it
205 // using the userdata mechanism. So we have to keep it not to free the blobs. 207 // using the userdata mechanism. So we have to keep it not to free the blobs.
206 scoped_refptr<ResourceRequestBody> body_; 208 scoped_refptr<ResourceRequestBody> body_;
207 scoped_ptr<storage::BlobDataHandle> request_body_blob_data_handle_; 209 scoped_ptr<storage::BlobDataHandle> request_body_blob_data_handle_;
208 scoped_refptr<ServiceWorkerVersion> streaming_version_; 210 scoped_refptr<ServiceWorkerVersion> streaming_version_;
209 211
210 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; 212 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
211 213
212 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); 214 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
213 }; 215 };
214 216
215 } // namespace content 217 } // namespace content
216 218
217 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 219 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698