| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void OnBeforeNetworkStart(net::URLRequest* request, bool* defer) override; | 101 void OnBeforeNetworkStart(net::URLRequest* request, bool* defer) override; |
| 102 void OnResponseStarted(net::URLRequest* request) override; | 102 void OnResponseStarted(net::URLRequest* request) override; |
| 103 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; | 103 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; |
| 104 | 104 |
| 105 // StreamObserver override: | 105 // StreamObserver override: |
| 106 void OnDataAvailable(Stream* stream) override; | 106 void OnDataAvailable(Stream* stream) override; |
| 107 | 107 |
| 108 // StreamRegisterObserver override: | 108 // StreamRegisterObserver override: |
| 109 void OnStreamRegistered(Stream* stream) override; | 109 void OnStreamRegistered(Stream* stream) override; |
| 110 | 110 |
| 111 const net::HttpResponseInfo* http_info() const; | |
| 112 | |
| 113 void GetExtraResponseInfo( | 111 void GetExtraResponseInfo( |
| 114 bool* was_fetched_via_service_worker, | 112 bool* was_fetched_via_service_worker, |
| 115 bool* was_fallback_required_by_service_worker, | 113 bool* was_fallback_required_by_service_worker, |
| 116 GURL* original_url_via_service_worker, | 114 GURL* original_url_via_service_worker, |
| 117 blink::WebServiceWorkerResponseType* response_type_via_service_worker, | 115 blink::WebServiceWorkerResponseType* response_type_via_service_worker, |
| 118 base::TimeTicks* fetch_start_time, | 116 base::TimeTicks* fetch_start_time, |
| 119 base::TimeTicks* fetch_ready_time, | 117 base::TimeTicks* fetch_ready_time, |
| 120 base::TimeTicks* fetch_end_time) const; | 118 base::TimeTicks* fetch_end_time) const; |
| 121 | 119 |
| 122 protected: | 120 protected: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // Creates |http_response_info_| using |http_response_headers_| and calls | 154 // Creates |http_response_info_| using |http_response_headers_| and calls |
| 157 // NotifyHeadersComplete. | 155 // NotifyHeadersComplete. |
| 158 void CommitResponseHeader(); | 156 void CommitResponseHeader(); |
| 159 | 157 |
| 160 // Creates and commits a response header indicating error. | 158 // Creates and commits a response header indicating error. |
| 161 void DeliverErrorResponse(); | 159 void DeliverErrorResponse(); |
| 162 | 160 |
| 163 // Releases the resources for streaming. | 161 // Releases the resources for streaming. |
| 164 void ClearStream(); | 162 void ClearStream(); |
| 165 | 163 |
| 164 const net::HttpResponseInfo* http_info() const; |
| 165 |
| 166 base::WeakPtr<ServiceWorkerProviderHost> provider_host_; | 166 base::WeakPtr<ServiceWorkerProviderHost> provider_host_; |
| 167 | 167 |
| 168 // Timing info to show on the popup in Devtools' Network tab. | 168 // Timing info to show on the popup in Devtools' Network tab. |
| 169 net::LoadTimingInfo load_timing_info_; | 169 net::LoadTimingInfo load_timing_info_; |
| 170 base::TimeTicks fetch_start_time_; | 170 base::TimeTicks fetch_start_time_; |
| 171 base::TimeTicks fetch_ready_time_; | 171 base::TimeTicks fetch_ready_time_; |
| 172 base::TimeTicks fetch_end_time_; | 172 base::TimeTicks fetch_end_time_; |
| 173 base::Time response_time_; | 173 base::Time response_time_; |
| 174 | 174 |
| 175 ResponseType response_type_; | 175 ResponseType response_type_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 205 scoped_refptr<ServiceWorkerVersion> streaming_version_; | 205 scoped_refptr<ServiceWorkerVersion> streaming_version_; |
| 206 | 206 |
| 207 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 207 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
| 208 | 208 |
| 209 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 209 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 } // namespace content | 212 } // namespace content |
| 213 | 213 |
| 214 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 214 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
| OLD | NEW |