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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: Addressed comments + changes to NavigationHandleImpl following 2364943002 Created 4 years, 3 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/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 98d0113c26b6db1e4fd8d35eb6cd7a7d290f1d54..cc2cc708921a3d770324339a66288d181cd66bf1 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -78,6 +78,7 @@
#include "content/common/view_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/global_request_id.h"
+#include "content/public/browser/navigation_ui_data.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "content/public/browser/resource_request_details.h"
@@ -2070,6 +2071,7 @@ void ResourceDispatcherHostImpl::FinishedWithResourcesForRequest(
void ResourceDispatcherHostImpl::BeginNavigationRequest(
ResourceContext* resource_context,
const NavigationRequestInfo& info,
+ std::unique_ptr<NavigationUIData> navigation_ui_data,
NavigationURLLoaderImplCore* loader,
ServiceWorkerNavigationHandleCore* service_worker_handle_core) {
// PlzNavigate: BeginNavigationRequest currently should only be used for the
@@ -2191,6 +2193,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
// If in the future this changes this should be updated to somehow get a
// meaningful value.
false); // initiated_in_secure_context
+ extra_info->set_navigation_ui_data(std::move(navigation_ui_data));
+
// Request takes ownership.
extra_info->AssociateWithRequest(new_request.get());
@@ -2394,6 +2398,7 @@ void ResourceDispatcherHostImpl::StartLoading(
"456331 ResourceDispatcherHostImpl::StartLoading"));
ResourceLoader* loader_ptr = loader.get();
+ DCHECK(pending_loaders_[info->GetGlobalRequestID()] == nullptr);
pending_loaders_[info->GetGlobalRequestID()] = std::move(loader);
loader_ptr->StartRequest();

Powered by Google App Engine
This is Rietveld 408576698