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

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

Issue 2710983003: Move HistoryItem handling to DocumentLoader (Closed)
Patch Set: Experiment to fix DCHECKing tests 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..d08a23e26c31776aee8b99a69b6c08c684399842 100644
--- a/third_party/WebKit/Source/core/loader/HistoryItem.cpp
+++ b/third_party/WebKit/Source/core/loader/HistoryItem.cpp
@@ -162,10 +162,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.get());
yhirano 2017/03/29 09:38:13 get() is not needed.
Nate Chapin 2017/03/29 18:23:06 Done.
+ request.setHTTPContentType(m_formContentType);
+ request.addHTTPOriginIfNeeded(m_referrer.referrer);
+ }
+ return request;
}
DEFINE_TRACE(HistoryItem) {

Powered by Google App Engine
This is Rietveld 408576698