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

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

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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 a5d4da9b0678315e8ed550154fe038a03891d995..d49707809a51eb1a0d21afe0354c7b41c9a5fa7b 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1407,6 +1407,12 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest(
new_request->set_first_party_for_cookies(
request_data.first_party_for_cookies);
+
+ // The initiator should normally be present, unless this is a navigation in a
+ // top-level frame. It may be null for some top-level navigations (eg:
+ // browser-initiated ones).
+ DCHECK(request_data.request_initiator.has_value() ||
+ request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME);
new_request->set_initiator(request_data.request_initiator);
if (request_data.originated_from_service_worker) {

Powered by Google App Engine
This is Rietveld 408576698