summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
authordglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-11 23:39:31 +0000
committerdglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-11 23:39:31 +0000
commit579f8970ea79d64a3d76c9201f28c9b0c8ed5862 (patch)
tree105e82072d7ef7855869fdb5f1bbaa2cabffc842 /webkit/glue/webframe_impl.cc
parenta8038816209e01e619e97f46e22bf1b216dc22cd (diff)
downloadchromium_src-579f8970ea79d64a3d76c9201f28c9b0c8ed5862.zip
chromium_src-579f8970ea79d64a3d76c9201f28c9b0c8ed5862.tar.gz
chromium_src-579f8970ea79d64a3d76c9201f28c9b0c8ed5862.tar.bz2
Use HistoryItem::lastVisitWasFailure to replace fakeHistoryItem semantics.
Review URL: http://codereview.chromium.org/14014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6844 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index bdb43b4..520dca8 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -395,12 +395,9 @@ void WebFrameImpl::InternalLoadRequest(const WebRequest* request,
// work.
if (!current_item) {
current_item = HistoryItem::create();
+ current_item->setLastVisitWasFailure(true);
frame_->loader()->setCurrentHistoryItem(current_item);
frame_->page()->backForwardList()->setCurrentItem(current_item.get());
-
- // Mark the item as fake, so that we don't attempt to save its state and
- // end up with about:blank in the navigation history.
- frame_->page()->backForwardList()->setCurrentItemFake(true);
}
frame_->loader()->goToItem(request_impl->history_item().get(),
@@ -482,11 +479,8 @@ bool WebFrameImpl::GetPreviousHistoryState(std::string* history_state) const {
// only get saved to history when it becomes the previous item. The caller
// is expected to query the history state after a navigation occurs, after
// the desired history item has become the previous entry.
- if (frame_->page()->backForwardList()->isPreviousItemFake())
- return false;
-
RefPtr<HistoryItem> item = frame_->page()->backForwardList()->previousItem();
- if (!item)
+ if (!item || item->lastVisitWasFailure())
return false;
static StatsCounterTimer history_timer("GetHistoryTimer");