Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: content/browser/frame_host/navigation_request.cc

Issue 1257553002: [Proof-of-concept] PlzNavigate and Service Worker Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass navigation_provider_id Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 6844c431e5047ef1663e868e4dd262d647a26686..daf64d408eefd20b6286c19bd6e5264be60749c7 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -12,6 +12,7 @@
#include "content/browser/loader/navigation_url_loader.h"
#include "content/browser/site_instance_impl.h"
#include "content/common/resource_request_body.h"
+#include "content/common/service_worker/service_worker_types.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/stream_handle.h"
#include "content/public/common/content_client.h"
@@ -188,7 +189,8 @@ bool NavigationRequest::BeginNavigation() {
// it immediately.
state_ = RESPONSE_STARTED;
frame_tree_node_->navigator()->CommitNavigation(
- frame_tree_node_, nullptr, scoped_ptr<StreamHandle>());
+ frame_tree_node_, nullptr, scoped_ptr<StreamHandle>(),
+ kInvalidServiceWorkerProviderId);
return false;
// TODO(davidben): Fire (and add as necessary) observer methods such as
@@ -209,11 +211,12 @@ void NavigationRequest::OnRequestRedirected(
void NavigationRequest::OnResponseStarted(
const scoped_refptr<ResourceResponse>& response,
- scoped_ptr<StreamHandle> body) {
+ scoped_ptr<StreamHandle> body,
+ int navigation_provider_id) {
DCHECK(state_ == STARTED);
state_ = RESPONSE_STARTED;
- frame_tree_node_->navigator()->CommitNavigation(frame_tree_node_,
- response.get(), body.Pass());
+ frame_tree_node_->navigator()->CommitNavigation(
+ frame_tree_node_, response.get(), body.Pass(), navigation_provider_id);
}
void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache,

Powered by Google App Engine
This is Rietveld 408576698