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

Unified Diff: third_party/WebKit/Source/core/loader/HistoryItem.cpp

Issue 2130623003: Teach HistoryItem about a request's initiator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: String, not RefPtr, because lifetimes... Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/HistoryItem.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/HistoryItem.cpp
diff --git a/third_party/WebKit/Source/core/loader/HistoryItem.cpp b/third_party/WebKit/Source/core/loader/HistoryItem.cpp
index 373ed46f31a0e047f9b78f44df8c72864ff492a3..b382b7909dedde24584c30f61227e6f0260ded1f 100644
--- a/third_party/WebKit/Source/core/loader/HistoryItem.cpp
+++ b/third_party/WebKit/Source/core/loader/HistoryItem.cpp
@@ -28,6 +28,7 @@
#include "core/dom/Document.h"
#include "core/html/forms/FormController.h"
#include "platform/network/ResourceRequest.h"
+#include "platform/weborigin/SecurityOrigin.h"
#include "platform/weborigin/SecurityPolicy.h"
#include "wtf/Assertions.h"
#include "wtf/CurrentTime.h"
@@ -75,6 +76,11 @@ const String& HistoryItem::target() const
return m_target;
}
+PassRefPtr<SecurityOrigin> HistoryItem::requestorOrigin() const
+{
+ return SecurityOrigin::createFromString(m_requestorOrigin);
+}
+
void HistoryItem::setURLString(const String& urlString)
{
if (m_urlString != urlString)
@@ -92,6 +98,11 @@ void HistoryItem::setReferrer(const Referrer& referrer)
m_referrer = SecurityPolicy::generateReferrer(referrer.referrerPolicy, url(), referrer.referrer);
}
+void HistoryItem::setRequestorOrigin(PassRefPtr<SecurityOrigin> origin)
+{
+ m_requestorOrigin = origin->toString();
+}
+
void HistoryItem::setTarget(const String& target)
{
m_target = target;
« no previous file with comments | « third_party/WebKit/Source/core/loader/HistoryItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698