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

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

Issue 2335133003: PlzNavigate: support the WebRequest API (Closed)
Patch Set: Rebase + addressed nit 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 aa3e925279af49ac2a2fa2325b33d27bd28001aa..f2c1ac98e8cd6387941ada630c8b712ed8d68600 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -77,6 +77,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"
@@ -2046,6 +2047,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
@@ -2167,6 +2169,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());
@@ -2371,6 +2375,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();
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698