| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // The following are intended for use by ServiceWorker(Blob|Stream)Reader. | 142 // The following are intended for use by ServiceWorker(Blob|Stream)Reader. |
| 143 void OnResponseStarted(); | 143 void OnResponseStarted(); |
| 144 void OnReadRawDataComplete(int bytes_read); | 144 void OnReadRawDataComplete(int bytes_read); |
| 145 void RecordResult(ServiceWorkerMetrics::URLRequestJobResult result); | 145 void RecordResult(ServiceWorkerMetrics::URLRequestJobResult result); |
| 146 //---------------------------------------------------------------------------- | 146 //---------------------------------------------------------------------------- |
| 147 | 147 |
| 148 base::WeakPtr<ServiceWorkerURLRequestJob> GetWeakPtr(); | 148 base::WeakPtr<ServiceWorkerURLRequestJob> GetWeakPtr(); |
| 149 | 149 |
| 150 private: | 150 private: |
| 151 class FileSizeResolver; | 151 class FileSizeResolver; |
| 152 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTestP, | 152 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, |
| 153 LostActiveVersion); | 153 LostActiveVersion); |
| 154 | 154 |
| 155 enum ResponseType { | 155 enum ResponseType { |
| 156 NOT_DETERMINED, | 156 NOT_DETERMINED, |
| 157 FAIL_DUE_TO_LOST_CONTROLLER, | 157 FAIL_DUE_TO_LOST_CONTROLLER, |
| 158 FALLBACK_TO_NETWORK, | 158 FALLBACK_TO_NETWORK, |
| 159 FALLBACK_TO_RENDERER, // Use this when falling back with CORS check | 159 FALLBACK_TO_RENDERER, // Use this when falling back with CORS check |
| 160 FORWARD_TO_SERVICE_WORKER | 160 FORWARD_TO_SERVICE_WORKER |
| 161 }; | 161 }; |
| 162 | 162 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 EmbeddedWorkerStatus initial_worker_status_ = EmbeddedWorkerStatus::STOPPED; | 295 EmbeddedWorkerStatus initial_worker_status_ = EmbeddedWorkerStatus::STOPPED; |
| 296 | 296 |
| 297 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; | 297 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; |
| 298 | 298 |
| 299 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); | 299 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); |
| 300 }; | 300 }; |
| 301 | 301 |
| 302 } // namespace content | 302 } // namespace content |
| 303 | 303 |
| 304 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ | 304 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ |
| OLD | NEW |