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

Unified Diff: webkit/glue/webframe_impl.cc

Issue 113758: Remove the HistoryState property of WebRequest.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | « webkit/glue/webframe_impl.h ('k') | webkit/glue/weburlrequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframe_impl.cc
===================================================================
--- webkit/glue/webframe_impl.cc (revision 16741)
+++ webkit/glue/webframe_impl.cc (working copy)
@@ -408,12 +408,21 @@
}
void WebFrameImpl::LoadRequest(WebRequest* request) {
- SubstituteData data;
- InternalLoadRequest(request, data, false);
+ InternalLoadRequest(request, SubstituteData(), NULL, false);
}
+void WebFrameImpl::LoadHistoryState(const std::string& history_state) {
+ RefPtr<HistoryItem> history_item =
+ webkit_glue::HistoryItemFromString(history_state);
+ DCHECK(history_item.get());
+
+ WebRequestImpl dummy_request;
+ InternalLoadRequest(&dummy_request, SubstituteData(), history_item, false);
+}
+
void WebFrameImpl::InternalLoadRequest(const WebRequest* request,
const SubstituteData& data,
+ PassRefPtr<HistoryItem> history_item,
bool replace) {
const WebRequestImpl* request_impl =
static_cast<const WebRequestImpl*>(request);
@@ -460,7 +469,7 @@
// loaded page.
frame_->loader()->setReplacing();
}
- } else if (request_impl->history_item()) {
+ } else if (history_item.get()) {
// Use the history item if we have one, otherwise fall back to standard
// load.
RefPtr<HistoryItem> current_item = frame_->loader()->currentHistoryItem();
@@ -476,7 +485,7 @@
GetWebViewImpl()->SetCurrentHistoryItem(current_item.get());
}
- frame_->loader()->goToItem(request_impl->history_item().get(),
+ frame_->loader()->goToItem(history_item.get(),
WebCore::FrameLoadTypeIndexedBackForward);
} else if (resource_request.cachePolicy() == ReloadIgnoringCacheData) {
frame_->loader()->reload();
@@ -503,7 +512,7 @@
webkit_glue::GURLToKURL(display_url));
DCHECK(subst_data.isValid());
- InternalLoadRequest(request, subst_data, replace);
+ InternalLoadRequest(request, subst_data, NULL, replace);
}
GURL WebFrameImpl::GetURL() const {
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/weburlrequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698