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

Unified Diff: content/renderer/history_controller.cc

Issue 1157863005: Use WebFrame::loadRequest for reloads and history navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Charlie's comments Created 5 years, 7 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 | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/history_controller.cc
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc
index 5f53009158b24e4d5a4e14ca3b8a41525c8cae7d..a890e34abfced8e0fdac74dff1424c2fdfbc5e74 100644
--- a/content/renderer/history_controller.cc
+++ b/content/renderer/history_controller.cc
@@ -38,6 +38,7 @@
#include "content/common/navigation_params.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_view_impl.h"
+#include "third_party/WebKit/public/web/WebFrameLoadType.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
using blink::WebFrame;
@@ -89,9 +90,10 @@ void HistoryController::GoToEntry(
continue;
render_frame->SetPendingNavigationParams(make_scoped_ptr(
new NavigationParams(*navigation_params_.get())));
- frame->loadHistoryItem(item.second,
- blink::WebHistorySameDocumentLoad,
- cache_policy);
+ WebURLRequest request = frame->toWebLocalFrame()->requestFromHistoryItem(
+ item.second, cache_policy);
+ frame->loadRequest(request, blink::BackForward, item.second,
+ blink::WebHistorySameDocumentLoad);
}
for (const auto& item : different_document_loads) {
WebFrame* frame = item.first;
@@ -100,9 +102,10 @@ void HistoryController::GoToEntry(
continue;
render_frame->SetPendingNavigationParams(make_scoped_ptr(
new NavigationParams(*navigation_params_.get())));
- frame->loadHistoryItem(item.second,
- blink::WebHistoryDifferentDocumentLoad,
- cache_policy);
+ WebURLRequest request = frame->toWebLocalFrame()->requestFromHistoryItem(
+ item.second, cache_policy);
+ frame->loadRequest(request, blink::BackForward, item.second,
+ blink::WebHistoryDifferentDocumentLoad);
}
}
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698