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, | |
103 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 104 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
104 const ResourceContext* resource_context, | 105 const ResourceContext* resource_context, |
105 FetchRequestMode request_mode, | 106 FetchRequestMode request_mode, |
106 FetchCredentialsMode credentials_mode, | 107 FetchCredentialsMode credentials_mode, |
107 FetchRedirectMode redirect_mode, | 108 FetchRedirectMode redirect_mode, |
108 bool is_main_resource_load, | 109 bool is_main_resource_load, |
109 RequestContextType request_context_type, | 110 RequestContextType request_context_type, |
110 RequestContextFrameType frame_type, | 111 RequestContextFrameType frame_type, |
111 scoped_refptr<ResourceRequestBody> body, | 112 scoped_refptr<ResourceRequestBody> body, |
112 Delegate* delegate); | 113 Delegate* delegate); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 | 221 |
221 // Invoke callbacks before invoking corresponding URLRequestJob methods. | 222 // Invoke callbacks before invoking corresponding URLRequestJob methods. |
222 void NotifyHeadersComplete(); | 223 void NotifyHeadersComplete(); |
223 void NotifyStartError(net::URLRequestStatus status); | 224 void NotifyStartError(net::URLRequestStatus status); |
224 void NotifyRestartRequired(); | 225 void NotifyRestartRequired(); |
225 | 226 |
226 // Wrapper that gathers parameters to |on_start_completed_callback_| and then | 227 // Wrapper that gathers parameters to |on_start_completed_callback_| and then |
227 // calls it. | 228 // calls it. |
228 void OnStartCompleted() const; | 229 void OnStartCompleted() const; |
229 | 230 |
231 std::string client_id_; | |
falken
2016/01/14 02:30:15
nit: I like to order things in the same order as t
jungkees
2016/01/14 04:56:46
Done.
| |
232 | |
230 // Not owned. | 233 // Not owned. |
231 Delegate* delegate_; | 234 Delegate* delegate_; |
232 | 235 |
233 // Timing info to show on the popup in Devtools' Network tab. | 236 // Timing info to show on the popup in Devtools' Network tab. |
234 net::LoadTimingInfo load_timing_info_; | 237 net::LoadTimingInfo load_timing_info_; |
235 base::TimeTicks worker_start_time_; | 238 base::TimeTicks worker_start_time_; |
236 base::TimeTicks worker_ready_time_; | 239 base::TimeTicks worker_ready_time_; |
237 base::Time response_time_; | 240 base::Time response_time_; |
238 | 241 |
239 ResponseType response_type_; | 242 ResponseType response_type_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 bool did_record_result_ = false; | 277 bool did_record_result_ = false; |
275 | 278 |
276 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 279 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
277 | 280 |
278 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 281 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
279 }; | 282 }; |
280 | 283 |
281 } // namespace content | 284 } // namespace content |
282 | 285 |
283 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 286 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
OLD | NEW |