| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // StreamRegisterObserver override: | 109 // StreamRegisterObserver override: |
| 110 void OnStreamRegistered(Stream* stream) override; | 110 void OnStreamRegistered(Stream* stream) override; |
| 111 | 111 |
| 112 void GetExtraResponseInfo( | 112 void GetExtraResponseInfo( |
| 113 bool* was_fetched_via_service_worker, | 113 bool* was_fetched_via_service_worker, |
| 114 bool* was_fallback_required_by_service_worker, | 114 bool* was_fallback_required_by_service_worker, |
| 115 GURL* original_url_via_service_worker, | 115 GURL* original_url_via_service_worker, |
| 116 blink::WebServiceWorkerResponseType* response_type_via_service_worker, | 116 blink::WebServiceWorkerResponseType* response_type_via_service_worker, |
| 117 base::TimeTicks* worker_start_time) const; | 117 base::TimeTicks* worker_start_time) const; |
| 118 | 118 |
| 119 const base::TimeTicks& worker_start_time() const { |
| 120 return worker_start_time_; |
| 121 } |
| 122 |
| 119 protected: | 123 protected: |
| 120 ~ServiceWorkerURLRequestJob() override; | 124 ~ServiceWorkerURLRequestJob() override; |
| 121 | 125 |
| 122 private: | 126 private: |
| 123 enum ResponseType { | 127 enum ResponseType { |
| 124 NOT_DETERMINED, | 128 NOT_DETERMINED, |
| 125 FALLBACK_TO_NETWORK, | 129 FALLBACK_TO_NETWORK, |
| 126 FORWARD_TO_SERVICE_WORKER, | 130 FORWARD_TO_SERVICE_WORKER, |
| 127 }; | 131 }; |
| 128 | 132 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 scoped_refptr<ServiceWorkerVersion> streaming_version_; | 208 scoped_refptr<ServiceWorkerVersion> streaming_version_; |
| 205 | 209 |
| 206 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 210 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
| 207 | 211 |
| 208 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 212 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
| 209 }; | 213 }; |
| 210 | 214 |
| 211 } // namespace content | 215 } // namespace content |
| 212 | 216 |
| 213 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 217 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
| OLD | NEW |