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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.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/inspector/InspectorResourceContentLoader.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
index 0428a059b1e25cce4f88d9ef673c8d1b365d1081..03f144c6d9fe0d65fef8cfa8d233cba84083830e 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
@@ -11,6 +11,7 @@
#include "core/inspector/InspectedFrames.h"
#include "core/inspector/InspectorCSSAgent.h"
#include "core/inspector/InspectorPageAgent.h"
+#include "core/loader/DocumentLoader.h"
#include "core/loader/resource/CSSStyleSheetResource.h"
#include "core/loader/resource/StyleSheetResourceClient.h"
#include "core/page/Page.h"
@@ -109,10 +110,10 @@ void InspectorResourceContentLoader::start() {
ResourceRequest resourceRequest;
HistoryItem* item =
- document->frame() ? document->frame()->loader().currentItem() : nullptr;
+ document->loader() ? document->loader()->historyItem() : nullptr;
if (item) {
- resourceRequest = FrameLoader::resourceRequestFromHistoryItem(
- item, WebCachePolicy::ReturnCacheDataDontLoad);
+ resourceRequest = item->generateResourceRequest(
+ WebCachePolicy::ReturnCacheDataDontLoad);
} else {
resourceRequest = document->url();
resourceRequest.setCachePolicy(WebCachePolicy::ReturnCacheDataDontLoad);

Powered by Google App Engine
This is Rietveld 408576698