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

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

Issue 2710983003: Move HistoryItem handling to DocumentLoader (Closed)
Patch Set: Address kinuko's comments Created 3 years, 9 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: 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 8e68e7c0c552391803e5e859661d4c4bc4dbcfe5..91e97241bfa2d8baecf2105bbce42651a6430dd3 100644
--- a/third_party/WebKit/Source/core/loader/HistoryItem.cpp
+++ b/third_party/WebKit/Source/core/loader/HistoryItem.cpp
@@ -25,7 +25,6 @@
#include "core/loader/HistoryItem.h"
-#include "core/dom/Document.h"
#include "core/html/forms/FormController.h"
#include "platform/loader/fetch/ResourceRequest.h"
#include "platform/weborigin/SecurityPolicy.h"
@@ -162,10 +161,18 @@ EncodedFormData* HistoryItem::formData() {
return m_formData.get();
}
-bool HistoryItem::isCurrentDocument(Document* doc) const {
- // FIXME: We should find a better way to check if this is the current
- // document.
- return equalIgnoringFragmentIdentifier(url(), doc->url());
+ResourceRequest HistoryItem::generateResourceRequest(
+ WebCachePolicy cachePolicy) {
+ ResourceRequest request(m_urlString);
+ request.setHTTPReferrer(m_referrer);
+ request.setCachePolicy(cachePolicy);
+ if (m_formData) {
+ request.setHTTPMethod(HTTPNames::POST);
+ request.setHTTPBody(m_formData);
+ request.setHTTPContentType(m_formContentType);
+ request.addHTTPOriginIfNeeded(m_referrer.referrer);
+ }
+ return request;
}
DEFINE_TRACE(HistoryItem) {
« no previous file with comments | « third_party/WebKit/Source/core/loader/HistoryItem.h ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698