| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "content/browser/service_worker/foreign_fetch_request_handler.h" | 5 #include "content/browser/service_worker/foreign_fetch_request_handler.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 8 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 9 #include "content/browser/service_worker/service_worker_url_request_job.h" | 9 #include "content/browser/service_worker/service_worker_url_request_job.h" |
| 10 #include "content/common/resource_request_body.h" | 10 #include "content/common/resource_request_body.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 ServiceWorkerMetrics::URLRequestJobResult* result) { | 207 ServiceWorkerMetrics::URLRequestJobResult* result) { |
| 208 // TODO(mek): Figure out what should happen if the active worker changes or | 208 // TODO(mek): Figure out what should happen if the active worker changes or |
| 209 // gets uninstalled before this point is reached. | 209 // gets uninstalled before this point is reached. |
| 210 if (!target_worker_) { | 210 if (!target_worker_) { |
| 211 *result = ServiceWorkerMetrics::REQUEST_JOB_ERROR_NO_ACTIVE_VERSION; | 211 *result = ServiceWorkerMetrics::REQUEST_JOB_ERROR_NO_ACTIVE_VERSION; |
| 212 return nullptr; | 212 return nullptr; |
| 213 } | 213 } |
| 214 return target_worker_.get(); | 214 return target_worker_.get(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 GURL ForeignFetchRequestHandler::GetRequestingOrigin() { | |
| 218 // TODO(mek): Implement this. | |
| 219 return GURL(); | |
| 220 } | |
| 221 | |
| 222 void ForeignFetchRequestHandler::ClearJob() { | 217 void ForeignFetchRequestHandler::ClearJob() { |
| 223 job_.reset(); | 218 job_.reset(); |
| 224 target_worker_ = nullptr; | 219 target_worker_ = nullptr; |
| 225 } | 220 } |
| 226 | 221 |
| 227 } // namespace content | 222 } // namespace content |
| OLD | NEW |