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

Unified Diff: content/common/navigation_params.h

Issue 2099243002: PlzNavigate: properly set the initiator of the navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed issue in SW preload Created 4 years 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/common/navigation_params.h
diff --git a/content/common/navigation_params.h b/content/common/navigation_params.h
index 0937e4202609deb9abcc219e0e62ffd7c4a8c2ff..4354a658d88459d496cf215d64301fe118511758 100644
--- a/content/common/navigation_params.h
+++ b/content/common/navigation_params.h
@@ -11,6 +11,7 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "base/optional.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
@@ -23,6 +24,7 @@
#include "content/public/common/resource_response.h"
#include "ui/base/page_transition_types.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace content {
@@ -150,8 +152,10 @@ struct CONTENT_EXPORT BeginNavigationParams {
BeginNavigationParams(std::string headers,
int load_flags,
bool skip_service_worker,
- RequestContextType request_context_type);
+ RequestContextType request_context_type,
+ const base::Optional<url::Origin>& initiator);
BeginNavigationParams(const BeginNavigationParams& other);
+ ~BeginNavigationParams();
// Additional HTTP request headers.
std::string headers;
@@ -168,6 +172,11 @@ struct CONTENT_EXPORT BeginNavigationParams {
// See WebSearchableFormData for a description of these.
GURL searchable_form_url;
std::string searchable_form_encoding;
+
+ // Indicates the initiator of the request. In auxilliary navigations, this is
+ // the origin of the document that triggered the navigation. This parameter
+ // can be null during browser-initiated navigations.
+ base::Optional<url::Origin> initiator;
};
// Provided by the browser -----------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698