Index: content/browser/service_worker/service_worker_fetch_dispatcher.cc |
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.cc b/content/browser/service_worker/service_worker_fetch_dispatcher.cc |
index f3faf3e6af73f9dcafdb91c4e69cd2bdd383b605..fefc7137f6e953a3a34b43563943dc094bab16ab 100644 |
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.cc |
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.cc |
@@ -8,6 +8,7 @@ |
#include <utility> |
#include "base/bind.h" |
+#include "base/command_line.h" |
#include "base/time/time.h" |
#include "base/trace_event/trace_event.h" |
#include "content/browser/service_worker/embedded_worker_status.h" |
@@ -228,7 +229,7 @@ void ServiceWorkerFetchDispatcher::DispatchFetchEvent() { |
// |dispatcher| is owned by |version_|. So it is safe to pass the unretained |
// raw pointer of |version_| to OnFetchEventFinished callback. |
dispatcher->DispatchFetchEvent( |
- fetch_event_id, *request_, |
+ fetch_event_id, *request_, std::move(preload_handle_), |
base::Bind(&OnFetchEventFinished, base::Unretained(version_.get()), |
event_finish_id)); |
} |
@@ -270,6 +271,19 @@ void ServiceWorkerFetchDispatcher::Complete( |
fetch_callback.Run(status, fetch_result, response, version); |
} |
+void ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload( |
+ net::URLRequest* original_request) { |
+ if (resource_type_ != RESOURCE_TYPE_MAIN_FRAME && |
+ resource_type_ != RESOURCE_TYPE_SUB_FRAME) { |
+ return; |
+ } |
+ if (!version_->navigation_preload_enabled()) |
+ return; |
+ // TODO(horo): Implement this to start the preload request for the navigation |
+ // request and set |preload_handle_|. |
+ NOTIMPLEMENTED(); |
+} |
+ |
ServiceWorkerMetrics::EventType ServiceWorkerFetchDispatcher::GetEventType() |
const { |
if (request_->fetch_type == ServiceWorkerFetchType::FOREIGN_FETCH) |